JP3709598B2 - Dither matrix creation method - Google Patents

Dither matrix creation method Download PDF

Info

Publication number
JP3709598B2
JP3709598B2 JP03676196A JP3676196A JP3709598B2 JP 3709598 B2 JP3709598 B2 JP 3709598B2 JP 03676196 A JP03676196 A JP 03676196A JP 3676196 A JP3676196 A JP 3676196A JP 3709598 B2 JP3709598 B2 JP 3709598B2
Authority
JP
Japan
Prior art keywords
pixel
matrix
region
density
binarization
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
JP03676196A
Other languages
Japanese (ja)
Other versions
JPH09233328A (en
Inventor
昌史 上田
量平 小宮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP03676196A priority Critical patent/JP3709598B2/en
Priority to US08/803,959 priority patent/US5953459A/en
Publication of JPH09233328A publication Critical patent/JPH09233328A/en
Application granted granted Critical
Publication of JP3709598B2 publication Critical patent/JP3709598B2/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】
【発明の属する技術分野】
本発明は、多値画像を2値画像化するためのディザマトリックスの作成方法に関する。
【0002】
【従来の技術】
画像を構成するデータは通常8ビット程度の濃淡階調で表現されている。しかし、この画像データを人が見ることのできる画像として出力する機器、例えばプリンタなどの出力機器においては、機構が簡単であることや制御の容易性から、インク等の色素を記録紙にドットとして付着させるか否かしか行わない、いわゆる2値記録が一般的である。
【0003】
このような2値記録の出力機器を使用して、8ビット濃淡階調で表された画像を記録する場合には、単に各画素の値を閾値で判断してインクを付着させるか否かを決定することになる。しかし、このように閾値で単純に2値化するだけでは、8ビット濃淡階調が持つ豊富な濃淡状態(1色なら256階調、3原色が各256階調ならば、約1670万色を表すことができる。)を表現することは不可能となる。そのため、このような2値記録の出力機器でも疑似的に濃淡状態を表現する方法が考えられている。すなわち、所定の面積の中で配置されるドット数によって濃淡を表現しようと言う面積階調の考え方である。
【0004】
この考え方を実現する方法としては種々の提案がなされている。例えば、誤差拡散法、乱数発生型ディザ法、組織的ディザ法等である。
【0005】
【発明が解決しようとする課題】
しかし、これらの方法には、次のような問題があった。
すなわち、誤差拡散法は、誤差拡散あるいは誤差分配演算のために、2値化の処理が遅くなり、また2値化された画像に独特の紋様が発生し易かった。乱数発生型ディザ法は、ディザマトリックスを使用するために高速であるが、乱数を用いるため、画質が非常にノイジー、すなわち、多くのノイズが画像に満ちているような画質となると言う問題が有った。
【0006】
ディザマトリックスを用いる他の方法として、組織的ディザ法に属する渦巻型があるが、この渦巻型は、ドットが密集し易く、密集したものが大きなドットと認識されるので解像度が悪化し易かった。組織的ディザ法の内で、ベイヤー(Bayer)法があるが、このベイヤー(Bayer)法は、ドットが分散するので解像度は良いが、独特な紋様が発生し、暗部の階調性も悪いものであった。
【0007】
また、ディザマトリックスの大きさよりも広い画像を処理する場合には、図16に示すごとく、画像の部分部分を順次、ディザマトリックスの大きさの領域DM毎に2値化処理することになるが、この処理の境界近傍部分BD1,BD2で色むらや明暗むらが生じて、白線などの疑似的な境界線が現れてしまう場合があった。
【0008】
本発明は、ディザ法を用いても、ノイジーとならず、解像度が悪化せず、紋様の発生を抑制し、更にディザマトリックスにより処理された領域間に疑似的な境界線も生じないディザマトリックスを作成することを目的とするものである。
【0009】
【課題を解決するための手段及び発明の効果】
本発明のディザマトリックス作成方法は、画素において表すことができる濃度範囲内に設定された所定範囲において離散的に設定された複数の濃度値の各々を、複数の均一濃度画素マトリックスの各々における全画素の濃度値として、均一濃度画素マトリックス毎に誤差拡散法にて濃度値をオン/オフのいずれかに2値化し、この2値化された均一濃度画素マトリックスの一部の特定領域の濃度値に基づいて、ディザマトリックスにおける各画素の閾値を設定している。
【0010】
このようにして閾値が設定されたディザマトリックスによって画像を2値化すると、人間の目に対してノイジーとならず、解像度が悪化せず、紋様の発生を抑制した2値化画像を生成することができる。
誤差拡散法により生じる2値の並びは、一見不規則に見えるけれども、まったくのでたらめではない。すなわち、紋様はできにくいがノイジーな画像にはなりにくい性質がある。このように本発明のディザマトリックス作成方法は、誤差拡散法により生じる2値の並びを利用することにより、ディザマトリックスにも誤差拡散法における2値の並びの性質を取り込んで作成されたものである。
【0011】
したがって、2値化の計算処理が高速に可能となるディザマトリックスにおいて、前述のごとく誤差拡散法により、不規則ではあるがまったくのでたらめではない適切な閾値の分布を形成しているので、人間の目に対してノイジーとならず、かつ解像度が悪化せず、更に、紋様の発生を抑制した2値化画像を生成することができたものと考えられる。
【0012】
更に、本発明において、前記均一濃度画素マトリックスは、求められるディザマトリックスよりも大きいマトリックスであり、前記誤差拡散法による2値化後に、2値化の結果に基づいて、ディザマトリックスにおける各画素の閾値を設定している。このため、誤差拡散処理の初期における誤差拡散あるいは誤差分配の歪みがディザマトリックスへ影響し難くなり、でき上がったディザマトリックスを使用して画像を2値化しても、ドットの偏りや紋様の発生を抑制することができる。尚、2値化の結果に基づくディザマトリックスの閾値の設定は、例えば、2値化された均一濃度画素マトリックスの一部の特定領域の濃度値を、均一濃度画素マトリックスのすべてについて同一位置の画素毎に集積し、この同一位置の画素毎の集積結果に基づいて行っても良い。
【0013】
更に、本発明において、前記特定領域と前記特定領域以外の外部領域との境界に接する前記特定領域内の縁部領域、または前記境界に接する前記外部領域の縁部領域に対して、前記境界を挟んだ前記2値化処理の連続性を維持する境界処理を行っている。
【0014】
ディザマトリックスで処理された領域の境界で色むらや明暗のむらが生じるのは、ディザマトリックスの左右の縁部や上下の縁部において縁部同士の連続性が無いからである。特に、上述のごとく誤差拡散法による2値化処理にてディザマトリックスを作成する場合には、誤差拡散法の2値化処理の主走査方向における縁部同士の誤差拡散処理の不連続性が色むらや明暗むらに大きく影響する。これを境界処理により連続性を維持させれば、ディザマトリックスで処理された領域の境界での色むらや明暗むらが抑制でき、疑似的な境界線の発生を抑制できる。
【0015】
この境界処理としては、特に、2値化の主走査方向の処理が前記特定領域から前記外部領域へ横切る境界に接する前記特定領域内の後方縁部領域または前記外部領域の前方縁部領域に対して行われることが好ましい。
前記境界処理としては、例えば、前記外部領域の前方縁部領域に、2値化の主走査方向の処理が前記外部領域から前記特定領域へ横切る境界に接する前記特定領域内の前方縁部領域における直前の2値化結果を複写する処理とすることができる。
【0016】
このように、外部領域の前方縁部領域に特定領域内の前方縁部領域の2値化結果を複写することにより、結果として、特定領域内の前方縁部領域の2値化結果が、誤差拡散法における誤差分配処理により特定領域内の後方縁部領域へ反映される。したがって、特定領域内の前方縁部領域と後方縁部領域との2値化処理の連続性が維持され、形成されたディザマトリックスを繰り返し用いて画像を2値化した場合にも疑似的な境界線が発生するのを防止できる。
【0017】
この場合、更に、前記2値化処理が、前記境界を挟んで連続する前記特定領域内の後方縁部領域および前記外部領域の前方縁部領域からなる領域については、主走査方向を逆転させることが好ましい。このことにより、特定領域内の前方縁部領域の2値化結果が、一層、特定領域内の後方縁部領域へ反映され易くなる。したがって、特定領域内の後方縁部領域と外部領域の前方縁部領域との2値化処理の連続性が一層強く維持され、前記疑似的境界線の発生が一層抑制される。
【0018】
尚、前記特定領域は、前記誤差拡散法の処理が開始された先頭画素ライン部分の集積結果を含まないことにすると、誤差拡散の初期における誤差拡散あるいは誤差分配の歪みがディザマトリックスへ影響し難くなり、でき上がったディザマトリックスを使用して画像を2値化しても、一層、ドットの偏りや紋様の発生を抑制することができる。更に、この場合、できるだけ前記歪みの影響を無くすためには、前記特定領域としては、前記先頭画素ライン部分から最も離れたラインである、前記誤差拡散法の処理が終了する最終画素ライン部分の集積結果を含むようにすることが好ましい。
【0019】
また、ある濃度値の均一濃度画素マトリックスの2値化処理を行う場合に、既に2値化された前記均一濃度画素マトリックスの2値化状態に応じて、各画素が2値化処理されることとしても良い。この「既に2値化された均一濃度画素マトリックスの2値化状態に応じてなされる2値化処理」とは、例えば、既に2値化された均一濃度画素マトリックスの内で、2値化処理しようとする均一濃度画素マトリックスに最も近い濃度値の均一濃度画素マトリックスの2値化状態に応じて2値化処理する手法が挙げられる。すなわち、均一濃度画素マトリックスの誤差拡散法による2値化処理がまったく独立に実行されるのではなく、既になされている他の濃度値の均一濃度画素マトリックスにおける2値化状態が反映される。
【0020】
この反映により、単に各均一濃度画素マトリックス独立に2値化している場合に比較して、各画素位置における集積状態が特定の値に偏ることが無く、各種の値に分散化する。したがって、このような集積状態に基づいて最終的に得られるディザマトリックスは、閾値の値が、所定範囲で適度に分散して分布するものとなる。
【0021】
更に具体的には、濃度値iを全画素の濃度値とする均一濃度画素マトリックスにてなされる誤差拡散法において、濃度値i未満で最も濃度値iに近い濃度値について既に2値化されて得られた最近下方2値化画素マトリックスにてオンとなっている画素位置と同じ画素位置は、必ずオンとして誤差拡散処理することにより2値化すれば、前述した効果を得ることができる。この場合、最初に、離散的に設定された複数の濃度値の内の最小値minを全画素の濃度値とする均一濃度画素マトリックスについて、誤差拡散法にて各画素の濃度値をオン/オフのいずれかに2値化し、その後、他の濃度を前記濃度値iとして2値化しても良い。
【0022】
また、濃度値iを全画素の濃度値とする均一濃度画素マトリックスにてなされる誤差拡散法において、濃度値iを越えていて最も濃度値iに近い濃度値について既に2値化されて得られた最近上方2値化画素マトリックスにてオフとなっている画素位置と同じ画素位置は、必ずオフとして誤差拡散処理することにより2値化すれば、前述した効果を得ることができる。この場合、最初に、離散的に設定された複数の濃度値の内の最大値maxを全画素の濃度値とする均一濃度画素マトリックスについて、誤差拡散法にて各画素の濃度値をオン/オフのいずれかに2値化し、その後、他の濃度値を前記濃度値iとして2値化しても良い。
【0023】
また、濃度値iを全画素の濃度値とする均一濃度画素マトリックスにてなされる誤差拡散法において、濃度値i未満で最も濃度値iに近い濃度値について既に2値化されて得られた最近下方2値化画素マトリックスにおいてオンおよび濃度値iを越えていて最も濃度値iに近い濃度値について既に2値化されて得られた最近上方2値化画素マトリックスにおいてもオンとなっている画素位置と同じ画素位置は必ずオンとし、前記最近下方2値化画素マトリックスにおいてオフおよび前記最近上方2値化画素マトリックスにおいてもオフとなっている画素位置と同じ画素位置は必ずオフとして誤差拡散処理することにより2値化しても良く、前述した効果を得ることができる。この場合、最初に、離散的に設定された複数の濃度値の内の最小値minおよび最大値maxを全画素の濃度値とする2つの均一濃度画素マトリックスについて、誤差拡散法にて各画素の濃度値をオン/オフのいずれかに2値化することが好ましい。
【0024】
また、前記濃度値iは、前記最近下方2値化画素マトリックスと前記最近上方2値化画素マトリックスとの各濃度値の中央の整数値に対応させること、あるいはほぼ中央の整数値に対応させることが、得られたディザマトリックスにて処理されて得られた疑似中間調画像の解像度の向上や紋様の抑制の上で好ましい。
【0025】
また、前記所定範囲は、画素において表すことができる濃度範囲に等しいこととしても良い。この場合、前記所定範囲は例えば0〜255の範囲が挙げられる。これは、特に2値化処理対象の画像を構成するデータが8ビットの濃淡階調で表現されている場合に好ましい。
【0026】
また、前述した効果を一層向上させるためには、前記所定範囲に離散的に設定された複数の濃度値が、その最小値minから最大値maxまで1づつ変化させて設定したmax−min+1個の値であることが好ましい。
前記同一位置の画素毎の集積結果としては、例えば、同一位置の画素における2値化された濃度値の内の一方の値の個数であって、この個数に応じてディザマトリックスの各画素の閾値を設定することができる。例えば、2値が「1」(オン)と「0」(オフ)とで表されているとすると、2値化した複数の均一濃度画素マトリックスの同一位置に存在する「1」(オン)をカウントし、そのカウント値を、そのまま、あるいは係数をかけてディザマトリックスの同一位置における閾値として設定しても良い。またカウント値からテーブルに基づいて閾値を設定しても良い。「1」(オン)の代りに「0」(オフ)をカウントしても良い。
【0027】
また、閾値の設定は、上述の方法以外に、離散的に設定された複数の濃度値の内の最小値minの均一濃度画素マトリックスから最大値maxの均一濃度画素マトリックスまで見た場合に、2値化された均一濃度画素マトリックスに最初に「1」(オン)となって現れる画素位置に対して、最初に「1」(オン)となった均一濃度画素マトリックスの濃度値に応じて閾値が設定されることとしても良い。例えば、各画素位置を濃度値の小さい方から順次チェックして、「1」(オン)が最初に現れた均一濃度画素マトリックスの濃度値をそのまま閾値として設定しても良い。またこの濃度値に所定の係数をかけて閾値として設定しても良い。
【0028】
また、閾値の設定は、離散的に設定された複数の濃度値の内の最大値maxの均一濃度画素マトリックスから最小値minの均一濃度画素マトリックスまで見た場合に、2値化された均一濃度画素マトリックスに最初に「0」(オフ)となって現れる画素位置に対して、最初に「0」(オフ)となった均一濃度画素マトリックスの濃度値に応じて閾値が設定されることとしても良い。例えば、各画素位置を濃度値の大きい方から順次チェックして、「0」(オフ)が最初に現れた均一濃度画素マトリックスの濃度値をそのまま閾値として設定しても良い。またこの濃度値に所定の係数をかけて閾値として設定しても良い。
【0029】
【発明の実施の形態】
[実施の形態1]
図1は、ディザマトリックス作成装置2の主要ブロック図である。
このディザマトリックス作成装置2の主体を成すマイクロコンピュータ部11はCPU12、ROMからなるプログラムメモリ13、RAMからなるワーキングメモリ14、RAMからなるディザマトリックス格納メモリ16およびRAMからなる出力イメージメモリ17により構成されている。また、マイクロコンピュータ部11にはシステムバス18を介して入力部10および出力部19が接続されている。
【0030】
入力部10は、キーボードや外部の記憶装置から入力するためのインターフェースを備え、ディザマトリックス作成に必要なデータや指示の入力を行うものである。また、入力部10は、作成されたディザマトリックスの効果を確認するために、各画素が8ビットで表される階調を有する画像データを入力する。
【0031】
CPU12は、後述するごとくディザマトリックスの作成を実行するものであり、プログラムメモリ13は、このCPU12で行う様々な制御を実施するためのプログラムを記憶している。また、ワーキングメモリ14は、CPU12がプログラムメモリ13に記憶されたプログラムを実行するときに必要なデータを一時的に記憶するものである。
【0032】
ディザマトリックス格納メモリ16は、CPU12の処理によって形成されたディザマトリックスデータを記憶する。
出力イメージメモリ17は、CPU12が、ディザマトリックス格納メモリ16に格納されているディザマトリックスを用いて、8ビットで表される階調を有する画像データを2値化した、その2値化された出力イメージデータを記憶する。
【0033】
出力部19は、出力イメージメモリ17に格納した2値化画像データを電子写真方式によりドットの有無で印字する装置である。
次に、ディザマトリックス作成装置2により実行されるディザマトリックス作成処理について説明する。ディザマトリックス作成処理のフローチャートを図2に示す。
【0034】
まず、濃度値iに「0」を設定する(S100)。次に、全画素が濃度値i=0の均一濃度画素マトリックスを2値化処理する(S110)。この均一濃度画素マトリックスは、図4に示すごとく、i=0〜255の256種類の均一濃度画素マトリックスD0〜D255をワーキングメモリ14に読み込んで用いれば良い。
【0035】
このように256種類の均一濃度画素マトリックスを揃える以外に、各均一濃度画素マトリックスにおいて全画素が同じ濃度値iであるので、各画素の濃度値を誤差拡散法における計算に用いる場合に、すべて濃度値iとして扱えば良いことから、i=0〜255までの256個の値のみ記憶しておいても良い。また、濃度値iの下限値「0」、上限値「255」、および下限値と上限値との間に離散的に存在する濃度値iの値を決定するためのステップ値Sp(処理される濃度値iの間隔を示す値、ここではSp=1である)のみでも良い。
【0036】
ステップS110の2値化処理の詳細を図3のフローチャートに示す。
まず、濃度値i=0の均一濃度画素マトリックスにおける注目画素の濃度値(濃度値iに等しい)を読み込む(S112)。最初の注目画素の画素位置は原点位置(0,0)である。以後、ステップS112に処理が戻る毎に、x方向を主走査方向、y方向を副走査方向として注目画素の位置が指定されて2値化処理が進行する。
【0037】
次に、その画素位置が所定領域内か否かが判定される(S114)。本実施の形態1では、この所定領域とは、図5に示した各均一濃度画素マトリックスD0〜D255の一部に設定されている特定領域Aの主走査方向の直後に存在する領域であり、図6の拡大図に示すごとく、特定領域A以外の均一濃度画素マトリックスD0〜D255の領域を外部領域Bとすると、特定領域Aと外部領域Bとの境界の内、2値化の主走査方向の処理が特定領域Aから外部領域Bへ横切る境界CRに接する外部領域Bの前方縁部領域BFを意味する。
【0038】
注目画素が、この所定領域(前方縁部領域BF)内でなければ(S114で「NO」)、次に通常の誤差拡散法により注目画素の2値化がなされるとともに、2値化誤差が計算される。
すなわち、まず、次式1のごとく、濃度値iが周辺画素の2値化誤差和Eにて補正されて補正濃度値Iが計算される。
【0039】
【数1】

Figure 0003709598
【0040】
2値化誤差和Eは、次式2のごとく、係数マトリックスαと周辺画素の2値化誤差eとに基づいて計算される。
【0041】
【数2】
Figure 0003709598
【0042】
係数マトリックスαは、本実施の形態1では、次のようなマトリックスが用いられている。αabは係数マトリックスαの位置(a,b)の係数を表している。またeabは係数マトリックスαの位置(a,b)の係数に対応する位置の周辺画素の2値化誤差を表している。
【0043】
【数3】
Figure 0003709598
【0044】
ここで、*は注目画素の位置を表している。
このようにして求められた補正濃度値Iは閾値t(本実施の形態1では例えばt=128)と比較されて、I>tならば、注目画素をオン(「1」)に2値化し、I≦tならば、注目画素をオフ(「0」)に2値化する。
【0045】
次いで注目画素にオンに2値化した場合、次式の計算により、注目画素の2値化誤差eが求められる。
【0046】
【数4】
Figure 0003709598
【0047】
また、注目画素をオフに2値化した場合には、次式のごとく、注目画素の2値化誤差eにIが設定される。
【0048】
【数5】
Figure 0003709598
【0049】
このようにして、通常の誤差拡散法による2値化処理(S116)を終了し、次に、現在の注目画素が特定領域Aに含まれているか否かが判定される(S118)。特定領域Aとは、図5に示したごとく、集積結果マトリックスM1を形成するために、2値化値のカウント処理を行う領域であり、本実施の形態1では全ての均一濃度画素マトリックスD0〜D255において同一の位置に存在する。
【0050】
この特定領域Aは、誤差拡散処理における先頭画素ラインL0部分は含まず、最終画素ラインLx部分を含んでいる。これは、先頭画素ラインL0部分では、その前のラインが存在しないため2値化誤差の拡散において、後方のラインと比較して2値化誤差の分配に歪みを生じており、ドットの集中や特定のパターンが生じ易いからであり、この2値化誤差拡散の歪みの影響は先頭画素ラインL0から後方に離れるに従って少なくなり、最終画素ラインLx部分では最も影響が少ないからである。
【0051】
現在の注目画素が特定領域Aに含まれていると判定されると(S118で「YES」)、注目画素の2値化値がワーキングメモリ14に保存される(S120)。現在の注目画素が特定領域Aに含まれていないと判定されると(S118で「NO」)、注目画素の2値化値は保存されない。
【0052】
次に濃度値iにおいて未処理の画素が有るか否かが判定されて(S122)、未処理画素が有れば(S122で「YES」)、再度ステップS112に戻り、未処理画素を注目画素として上述の処理を行う。
注目画素が所定領域(前方縁部領域BF)内であると判定されると(S114で「YES」)、次のような2値化処理が行われる(S124)。
【0053】
すなわち、今回の注目画素について、前記式1,2,3,4の演算は行うが、2値化のための補正濃度値Iと閾値tとの比較は実行されず、主走査方向へm画素戻った位置の画素に対する2値化の結果を、そのまま、今回の注目画素の2値化結果として採用する。この2値化結果がオンであれば式3の演算が行われ、オフであれば式4の演算が行われる。すなわち、閾値tとの比較は行わずに、m画素前の2値化結果に応じた誤差拡散法を実行する。
【0054】
前記値mは、特定領域Aの主走査方向での長さである。したがって、前方縁部領域BF内の画素については、特定領域Aの内で主走査方向の2値化処理が外部領域Bから特定領域Aへと横切る境界CFに接する前方縁部領域AFにおける2値化結果がそのまま採用されることになる。すなわち、図6において特定領域Aの右側の境界CRの外側に接する3つの画素列Q1 ,Q2 ,Q3 からなる前方縁部領域BFは、特定領域Aの左側の境界CFの内側に接する3つの画素列P1 ,P2 ,P3 からなる前方縁部領域AFとまったく同じ2値化状態となる。例えば、画素b1 の2値化は、画素a1 の2値化結果がそのまま用いられる。
【0055】
このようにして、各画素の2値化がなされ、濃度値iの均一濃度画素マトリックスの全ての画素について2値化が終了すれば(S122で「NO」)、図2に示すごとく、濃度値i=255か否かを判定する(S130)。最初は濃度値i=0であるので(S130で「NO」)、次に濃度値iがインクリメントされる(S140)。したがって、次に全画素が濃度値i=1の均一濃度画素マトリックスに対して前述した2値化処理を実行する(S110)。
【0056】
以後、順次、濃度値iをインクリメントしつつ(S140)、該当する濃度値iの均一濃度画素マトリックスを前述したように2値化する(S110)処理を繰り返す。
濃度値i=255の均一濃度画素マトリックスの2値化処理(S110)が終了すると図7に示すごとく、ワーキングメモリ14内には、濃度値i=0〜255の256個の2値化画素マトリックスF0〜F255が形成されている。
【0057】
次に濃度値i=255であるので(S130で「YES」)、全ての2値化画素マトリックスについて、同一位置の画素の内、オンに2値化されている数をカウントし、このカウント値を要素とする集積結果マトリックスM1を形成する(S150)。
【0058】
すなわち、図7に示すごとく、左上隅を原点(0,0)として横方向をx軸、縦方向をy軸とすると、まず、全ての2値化画素マトリックスF0〜F255の(0,0)について、オンとなった画素をカウントする。そのカウント結果を、図8に示すごとくワーキングメモリ14内に用意された集積結果マトリックスM1の同一位置(0,0)に格納する。このカウント処理を各画素位置について行い、集積結果マトリックスM1をすべて埋める。このカウント処理は、各画素がオンの場合は「1」に、オフの場合は「0」に2値化されているので、同一位置の画素における数値を合計して求めても良い。
【0059】
次に、集積結果マトリックスM1のカウント値の低い画素位置から、順にディザマトリックス用の閾値を設定し(S160)、その閾値からなるマトリックスをディザマトリックスとして、ディザマトリックス格納メモリ16に保存する(S170)。
【0060】
この閾値の設定の方法としては、カウント値そのものを閾値として設定しても良い。この場合はステップS150のカウント処理がディザマトリックスの閾値設定の処理に該当するので、ステップS160では特に処理は行わない。そして、集積結果マトリックスM1そのものをディザマトリックスとして、ディザマトリックス格納メモリ16に保存する(S170)。
【0061】
ステップS160にては、単に集積結果マトリックスM1の各カウント値自体をそのまま閾値とする代りに、予め用意されたカウント値と閾値とのテーブルに応じて、集積結果マトリックスM1の各カウント値を閾値に変換しても良い。
また、ステップS160にては、カウント値の低い順番から、閾値を「0,1,2,…」と設定して行っても良いし、逆にカウント値の高い順番から、閾値を「255,254,253,…」と設定して行っても良い。この場合、同一のカウント値が2つ以上存在する場合は、それらはすべて同一の閾値が与えられるものとしても良いし、同一のカウント値を順番付けして、異なるカウント値と同様に閾値を設定しても良い。
【0062】
このようにして形成されたディザマトリックスを用いて、中間調のカラー画像を2値化処理し、カラープリンタにて記録したところ、人間の目に対してノイジーとならず、かつ解像度が悪化せず、紋様の発生が抑制された疑似中間調の2値化画像を生成することができた。勿論、ディザ法であり、誤差拡散法のように多数の計算は行わないので、迅速に処理できた。
【0063】
更に、本実施の形態1では、均一濃度画素マトリックスから、先頭画素ラインL0を含まず、かつ最終画素ラインLxを含む特定領域Aの2値化画素マトリックスF0〜F255を求め、この2値化画素マトリックスF0〜F255から、均一濃度画素マトリックスより小さい集積結果マトリックスM1を求めて、この集積結果マトリックスM1に基づいてディザマトリックスを形成している。このため、先頭画素ラインL0部分で生じている誤差分配の歪みの影響が及びにくく、一層、紋様の発生が抑制された疑似中間調の2値化画像を生成することができた。
【0064】
更に、前述のごとく、前方縁部領域BF内の画素については、特定領域Aの前方縁部領域AFの2値化結果がそのまま採用されている。したがって、誤差分配は前記係数マトリックスαの形状に応じた位置の周辺画素から注目画素に2値化誤差が分配されるが、境界CRの左側に接している特定領域Aの後方縁部領域ARについても直接あるいは間接に前方縁部領域BF内の画素からの2値化誤差分配が影響する。この前方縁部領域BFは、特定領域Aの前方縁部領域AFの2値化結果と同じとなっているので、特定領域Aの前方縁部領域AFと特定領域Aの後方縁部領域ARとの処理の連続性が維持される。そのため、以下の処理にて作成されたディザマトリックスを用いて、中間調画像を2値化しても、ディザマトリックスで処理された領域間に色むらや明暗むらを生じるのを抑制でき、疑似的境界の発生を抑制できる。
【0065】
尚、ステップS122での未処理画素の判定は、特定領域A内に未処理画素が有るか否かの判定でも良い。
[実施の形態2]
本実施の形態2は、前記実施の形態1に対して、ステップS110の2値化処理が図9,図10に示すごとくである点と、ステップS1160,S2040,S2050にて行われる誤差拡散法として、注目画素を2値化した場合に2値化の誤差を未だ2値化していない周辺の画素の濃度に分配する方法による点とが異なる。
【0066】
尚、図9においては、ステップS1120,S1180,S1200,S1220の処理は、実施の形態1の図3にしめすステップS112,S118,S120,S122の処理と同じである。以下、特に実施の形態1と異なる点を中心に説明する。
【0067】
まず、ステップS1120の次に、逆転領域RVか否かを判定し(S1122)、逆転領域RVであれば(S1122で「YES」)、逆方向2値化処理(S2000)が行われる。
前記逆転領域RVは、図11に示すごとく、特定領域Aの後方縁部領域AR直前の画素列Pm-3 と、特定領域Aの後方縁部領域ARの全部(画素列Pm-2 ,Pm-1 ,Pm )と、外部領域Bの前方縁部領域BFの全部(画素列Q1 ,Q2 ,Q3 )とからなる領域である。
【0068】
したがって、主走査方向に行われる2値化処理が画素列Pm-3 に達しない内は(S1122で「NO」)、ステップS1160〜S1220の処理が実行され、通常の誤差拡散法により注目画素の2値化がなされるとともに、2値化誤差が計算されて未だ2値化されていない周辺画素に分配される。
【0069】
すなわち、次式5のごとく、既に2値化された周辺画素から注目画素へ分配されている2値化誤差和Eにて濃度値iが補正されて補正濃度値Iが計算される。
【0070】
【数6】
Figure 0003709598
【0071】
このようにして求められた補正濃度値Iは閾値t(本実施の形態2では例えばt=128)と比較されて、I>tならば、注目画素をオン(「1」)に2値化し、I≦tならば、注目画素をオフ(「0」)に2値化する。
次いで注目画素にオンに2値化した場合、次式6の計算により、注目画素の2値化誤差eが求められる。
【0072】
【数7】
Figure 0003709598
【0073】
また、注目画素をオフに2値化した場合には、次式7のごとく、注目画素の2値化誤差eにIが設定される。
【0074】
【数8】
Figure 0003709598
【0075】
次に、2値化誤差eが未2値化の周辺画素に、下に示す係数マトリックスβに基づいて分配される。
【0076】
【数9】
Figure 0003709598
【0077】
ここで、*は注目画素の位置を表し、数値は、数値に対応する位置の注目画素に対して、数値を係数としてかけた2値化誤差eを分配することを表している。次のステップS1180〜ステップS1220の処理は実施の形態1のステップS118〜S122と同じである。
【0078】
主走査方向に行われる2値化処理が画素列Pm-3 に達した場合、すなわち逆転領域RVに入った場合は(S1122で「YES」)、ステップS2000の処理が実行される。
図10のフローチャートに示すごとく、まず、2値化処理対象画素が設定される(S2010)。この設定について、図11に示す「…,a,b,c,d,e,…,R,S,T,U,V,W,X,Y,Z,…」からなる画素行を用いて説明すると、ステップS1220からステップS1120に戻るループにて、注目画素として画素Sが設定されると、その設定とは別に実際の2値化処理対象の画素として画素Yが設定される処理が行われる。次に注目画素として画素Tが設定されると2値化処理対象画素としては画素Xが設定され、注目画素として画素Uが設定されると2値化処理対象画素としては画素Wが設定され、注目画素として画素Vが設定されると2値化処理対象画素としては画素Vが設定され、注目画素として画素Wが設定されると2値化処理対象画素としては画素Uが設定され、注目画素として画素Xが設定されると2値化処理対象画素としては画素Tが設定され、注目画素として画素Yが設定されると2値化処理対象画素としては画素Sが設定される。すなわち、逆転領域RVでは、他の領域とは逆方向に2値化処理が進むことになる。
【0079】
次に、2値化処理対象画素の濃度値と2値化誤差和Eとが新たに読み込まれる(S2015)。そして、次に、誤差拡散法による2値化処理のために、2値化処理対象画素位置に応じた係数マトリックスが指定される(S2020)。前述した逆転領域RV以外で使用する係数マトリックスβを用いないのは、主走査方向が逆転するため、2値化処理対象画素に対する未2値化周辺画素の配置が異なるからである。
【0080】
逆転領域RV内の7つの画素列Pm-3 ,Pm-2 ,Pm-1 ,Pm ,Q1 ,Q2 ,Q3 に対して、係数マトリックスが、それぞれ、未2値化周辺画素の配置に適合させた係数マトリックスβ1 ,β2 ,β3 ,β4 ,β5 から選択されて適用される。各係数マトリックスβ1 ,β2 ,β3 ,β4 ,β5 の一例を下に示す。
【0081】
【数10】
Figure 0003709598
【0082】
【数11】
Figure 0003709598
【0083】
【数12】
Figure 0003709598
【0084】
【数13】
Figure 0003709598
【0085】
【数14】
Figure 0003709598
【0086】
逆転領域RV内の画素列Pm-3 には係数マトリックスβ5 が適用され、画素列Pm-2 には係数マトリックスβ4 が適用され、画素列Pm-1 ,Pm ,Q1 には係数マトリックスβ3 が適用され、画素列Q2 には係数マトリックスβ2 が適用され、画素列Q3 には係数マトリックスβ1 が適用される。
【0087】
次に、ステップS2030の判定にて、ステップS2040あるいはステップS2050が実行される。ステップS2040の処理は、係数マトリックスとしてステップS2020にて指定された係数マトリックスを用いる以外は、前述したステップS1160の処理と同じである。
【0088】
すなわち、今回の注目画素について、前記式5,6,7の演算および2値化誤差eの分配は行うが、2値化のための補正濃度値Iと閾値tとの比較は実行されず、主走査方向へm画素戻った位置の画素に対する2値化の結果を、そのまま、今回の注目画素の2値化結果として採用する。この2値化結果がオンであれば式6の演算が行われ、オフであれば式7の演算が行われる。すなわち、閾値tとの比較は行わずに、m画素前の2値化結果に応じて2値化誤差を算出して、周辺画素に係数マトリックスβに基づいて分配する。
【0089】
前記値mは、特定領域Aの主走査方向での長さである。したがって、前方縁部領域BF内の画素については、特定領域Aの内で主走査方向の2値化処理が外部領域Bから特定領域Aへと横切る境界CFに接する前方縁部領域AFにおける2値化結果がそのまま採用されることになる。すなわち、図6において特定領域Aの右側の境界CRの外側に接する3つの画素列Q1 ,Q2 ,Q3 からなる前方縁部領域BFは、特定領域Aの左側の境界CFの内側に接する3つの画素列P1 ,P2 ,P3 からなる前方縁部領域AFとまったく同じ2値化状態となる。例えば、画素Wの2値化は、画素aの2値化結果がそのまま用いられる。
【0090】
すなわち、画素Rの2値化処理を行った後、次に画素Yの2値化を行うが、画素Yは所定領域(前方縁部領域BF)内であるので(S2030で「YES」)、2値化自体は既に2値化結果が得られている画素cと同じ値を設定し、2値化誤差の分配は、係数マトリックスβ1 にて行う。次に画素Xの2値化となり、ここでも2値化自体は既に2値化結果が得られている画素bと同じ値を設定し、2値化誤差の分配は、係数マトリックスβ2 にて行う。次に画素Wの2値化となり、ここでも2値化自体は既に2値化結果が得られている画素aと同じ値を設定し、2値化誤差の分配は、係数マトリックスβ3 にて行う。
次に画素Vの2値化となるが、画素Vは所定領域(前方縁部領域BF)内ではないので(S2030で「NO」)、閾値tとの比較により2値化し、2値化誤差の分配は、係数マトリックスβ3 にて行う。次の画素Uの処理も画素Vの場合と同じである。次に画素Tの2値化となり、ここでも閾値tとの比較により2値化し、2値化誤差の分配は、係数マトリックスβ4 にて行う。次に画素Sの2値化となり、ここでも閾値tとの比較により2値化し、2値化誤差の分配は、係数マトリックスβ5 にて行う。
【0091】
そして、次に注目画素は逆転領域RV内から出て画素Zとなるので(S1122で「NO」)、画素Z自身の2値化処理となり、ステップS1160の処理に任される。
本実施の形態2は上述のごとく構成されているため、実施の形態1と同じ効果を生じると共に、更に、境界CRを挟んだ逆転領域RVにて2値化の主走査方向を逆転させているため、前記実施の形態1に比較して、境界CRの右側に接している前方縁部領域BF内の画素から境界CRの左側に接している特定領域Aの後方縁部領域ARに対する2値化誤差分配の影響を十分に大きくすることができる。すなわち、前方縁部領域AFから後方縁部領域ARへの2値化誤差分配が十分に効果的なものとなる。このため、誤差拡散法による2値化処理において、特定領域Aの前方縁部領域AFと特定領域Aの後方縁部領域ARとの処理の連続性が十分に維持されるので、本実施の形態2の処理にて作成されたディザマトリックスを用いて、中間調画像を2値化しても、ディザマトリックスによる処理領域間での疑似的境界の発生を十分に抑えることができる。
【0092】
[実施の形態3]
本実施の形態3は、実施の形態1,2と異なる点はディザマトリックス作成処理であり、均一濃度画素マトリックスの各画素の2値化処理が以下のように行われる点である。すなわち、2値化処理しようとする均一濃度画素マトリックスの濃度値i未満で最も濃度値iに近い濃度値の均一濃度画素マトリックスを2値化処理した最近下方2値化画素マトリックスLにおいてオンおよび濃度値iを越えていて最も濃度値iに近い濃度値の均一濃度画素マトリックスを2値化処理した最近上方2値化画素マトリックスHにおいてもオンとなっている画素位置と同じ画素位置は必ずオンとし、最近下方2値化画素マトリックスにおいてオフおよび最近上方2値化画素マトリックスにおいてもオフとなっている画素位置と同じ画素位置は必ずオフとされる条件下に誤差拡散処理される。更に各均一濃度画素マトリックスの2値化処理順序が、処理対象の均一濃度画素マトリックスの濃度値iが、最近下方2値化画素マトリックスと最近上方2値化画素マトリックスとの各濃度値の中央の整数値に対応するようにして、順次処理されている点も異なる。
【0093】
本実施の形態3のディザマトリックス作成処理を図12,13,14に示す。
まず、全画素が濃度値i=0である均一濃度画素マトリックスと、全画素が濃度値i=255である均一濃度画素マトリックスとを誤差拡散法により2値化する(S3080)。この均一濃度画素マトリックスは、図4に示すごとく、i=0,255の2種類の均一濃度画素マトリックスD0,D255をワーキングメモリ14に読み込んで用いれば良い。そして、その2値化画素マトリックスF0,F255(図7)をワーキングメモリ14に保存する(S3090)。ただし、ステップS3080にて行われる濃度値i=0,255の均一濃度画素マトリックスの誤差拡散法による2値化結果は、i=0の場合は全画素「0」(オフ)、i=255の場合は全画素「1」(オン)となるので、特に誤差拡散法による計算はせずに、予め全画素がオフの2値化画素マトリックスと全画素がオンの2値化画素マトリックスとを備えておいて、これらのマトリックスを用いても良い。
【0094】
次に1〜254の濃度値について濃度値配列の作成を行い(S3100)、次にその配列から一つづつ濃度値iに読み込んで(S3105)、ステップS3110の処理を行い、配列の全ての濃度値について処理が終了すれば、ステップS3130で配列終了と判定されて、ステップS3150,S3160,S3170の処理が行われる。このステップS3150,S3160,S3170の処理は実施の形態1のステップS150,S160,S170と同じである。
【0095】
ステップS3100における濃度値の配列は、2値化処理された濃度値の中央の濃度値がiに設定されるように作成される。すなわち、配列の先頭は「0」と「255」の中央の整数値である「128」(もう一つの中央の整数値の「127」でも良い。)、次が、「0」と「128」との中央の「64」、「128」と「255」との中央の「192」(もう一つの中央の整数値の「191」でも良い。)、次が「0」と「64」との中央の「32」、「64」と「128」との中央の「96」、「128」と「192」との中央の「160」、「192」と「255」との中央の「224」(もう一つの中央の整数値の「223」でも良い。)と言うように、前に得られている値の中央の整数値を求めて、「1」〜「254」までの濃度値の配列「128,64,192,32,96,160,224,……」を作成する。この配列は予め計算して配列データとして記憶しておき、本処理時に配列データのみ読み込んで用いても良い。
【0096】
ステップS3105においては、この配列の先頭から順次、濃度値iに設定し、ステップS3110の2値化処理を行い、配列の最後までステップS3110の処理が終了すれば、ステップS3130にて「YES」と判定されて、閾値の設定処理に移る(S3150,S3160,S3170)。
【0097】
次にステップS3110の2値化処理について説明する。本処理は、前記実施の形態1の2値化処理とは、ステップS116の処理が図13のごとくの処理に代りのみで、後の処理は図3にて説明した内容と同じである。
すなわち、ステップS114にて所定領域内でないと判定された場合には、ステップS4200の処理が行われ、2値化済みの濃度値、すなわち既に2値化画素マトリックスが求められている濃度値の内で、最近上方2値化画素マトリックスHと、最近下方2値化画素マトリックスLとをワーキングメモリ14の内容から検索する(S4200)。
【0098】
次に、濃度値iの均一濃度画素マトリックスについて、誤差拡散法により2値化し、2値化画素マトリックスFiを作成する(S4210)。
ただし、次の条件▲1▼,▲2▼の下に2値化される。
▲1▼最近上方2値化画素マトリックスHと最近下方2値化画素マトリックスLとの両者にて共に「1」オンが配置されている画素位置は、必ず「1」オンとする。
【0099】
▲2▼最近上方2値化画素マトリックスHと最近下方2値化画素マトリックスLとの両者にて共に「0」オフが配置されている画素位置は、必ず「0」オフとする。
すなわち、通常、誤差拡散法においては、周辺の画素から分配された誤差と注目画素の濃度とを合計した値を、閾値と比較して、閾値以上であれば「1」オン、閾値未満であれば「0」オフに2値化しているが、前記▲1▼または▲2▼の条件に該当する画素の場合には、その画素については閾値との比較をせずに、前記▲1▼または▲2▼の条件通りに、「1」オンまたは「0」オフに設定する。勿論、この閾値と比較しない設定の結果は2値化誤差に反映され、周辺画素への分配の対象となる。
【0100】
前記条件▲1▼▲2▼により、図14(a)に示すごとく、各画素位置において、濃度値の小さい方から見ると、一旦、オンとなると、以後の濃度値iおいては必ずオンとなる。
前記▲1▼▲2▼の条件を用いない通常の2値化を行うと、図14(b)に示すごとく、オンとなった後も同じ画素位置でオフが出現する。このため、通常の2値化のみでは各画素位置におけるオンの数が、0〜255内の特定の値に偏る傾向が有るが、本実施の形態3では、0〜255の範囲の各種の値に分散して好適な分布となる。したがって、このようにして得られるディザマトリックスは、閾値の値も0〜255の範囲に適度に分散して分布するものとなる。したがって、特に、図14(b)に示したごとく、各均一濃度画素マトリックス独立に2値化している場合に得られるディザマトリックスに比較して、解像度の向上や紋様の抑制を一層改良させたディザマトリックスを得ることができる。
【0101】
更に、本実施の形態3では、既に2値化処理された濃度値の中央の濃度iを順次2値化して行くために、最近上方2値化画素マトリックスと最近下方2値化画素マトリックスとのそれぞれの2値分散の影響を同程度受けることになり、中央の濃度iの2値化画素マトリックスの2値の分散は比較的均一な分布となる。このようにして求めた、均一な分布と条件▲1▼▲2▼とを満たす2値化画素マトリックスに基づいてディザマトリックスは作成されるので、解像度の向上や紋様の抑制上の効果が更に増大する。
【0102】
本実施の形態3では、予め、順次、濃度値iに中央の値が得られるように配列を作成していたが、配列を予め作成する代りにステップS3105の処理にて、中央の値を計算にて順次求めて、濃度値iに設定しても良い。
中央の値を計算にて求める一例を図15に示す。この処理は、図12におけるステップS3100〜S3130の代りに実行される。本処理において、最初は8つの変数I0 〜I7 を「0」で初期化し(S5010〜S5080)、次にI0 〜I7 までを合計して、濃度値iに設定する(S5090)。この濃度値iが「0」であれば、I7 を「128」増加させ(S5120)、次にI7 >128ではないので(S5130で「NO」)、ステップS5090の合計処理で濃度値iに「128」が設定され、i=0でなく(S5100で「NO」)、i=255でもないので(S5110で「NO」)、ステップS3110の処理(図12の処理と同じ)がなされる。
【0103】
次にステップS5120の処理にてI7 =256となり、ステップS5130にて「YES」と判定されて、I6 が「64」増加され(S5140)、I6 =64となり、I6 >64ではないので(S5150で「NO」)、ステップS5080にてI7 =0に初期化され、ステップS5090ではi=64となる。したがって、ステップS5100,S5110からステップS3110に移って、濃度値i=64の均一濃度画素マトリックスについて2値化処理がなされる。
【0104】
次に、ステップS5120にてI7 =128となり、ステップS5130にて「NO」と判定されて、ステップS5090では、I0 〜I5 =0、I6 =64、I7 =128であることから、i=192となり、ステップS5100,S5110の後、濃度値i=192の均一濃度画素マトリックスについて2値化がなされる。
【0105】
次にI0 〜I5 =0、I6 =64、I7 =128であることから、ステップS5120からステップS5160まで進み、ステップS5160でI5 =32となる。I5 >32ではないので(S5170で「NO」)、ステップS5070,S5080が処理されて、I0 〜I4 =0、I5 =32、I6 =0、I7 =0となる。したがって、ステップS5090ではi=32となり、ステップS3110では濃度値i=32の均一濃度画素マトリックスが2値化される。
【0106】
次にI7 =0となったので、ステップS5120,S5130を経て、ステップS5090に戻る。このとき、I0 〜I4 =0、I5 =32、I6 =0、I7 =128となる。したがって、ステップS5090ではi=160となり、ステップS3110では濃度値i=160の均一濃度画素マトリックスが2値化される。
【0107】
次に、ステップS5120〜S5150,S5080が処理されて、I0 〜I4 =0、I5 =32、I6 =64、I7 =0となる。したがって、ステップS5090ではi=96となり、ステップS3110では濃度値i=96の均一濃度画素マトリックスが2値化される。
【0108】
以後、I0 〜I7 の値に応じて、ステップS5020〜S5080,S5120〜S5260のいずれかの処理により、順次、濃度値iに、224、16,144,80,…,127が設定されて、濃度値iの均一濃度画素マトリックスの2値化と保存が行われ、最後に、I0 =1、I1 =2、I2 =4、I3 =8、I4 =16、I5 =32、I6 =64、I7 =128となる。このとき、ステップS5090にて濃度値i=255が設定されるので、ステップS5110にて「YES」と判定されて、ステップS3150の処理に移る。このようにして、計算にても中央の値をたどって、均一濃度画素マトリックスの2値化を行うことができる。
【0109】
尚、本実施の形態2では、中央の整数値をたどって2値化処理したが、完全に中央の整数値でなくても、1:2の位置、1:3の位置、2:1の位置、3:1の位置といったように、2値化済みの2つの濃度値の中間の値では有るが、小側あるいは大側に偏った整数値をたどって2値化処理しても良い。
【0110】
[その他]
前記実施の形態1〜3において、前記カウント値もそのまま集積結果マトリックスM1として用いるのではなく、所定の係数をかけても良い。また、濃度値iの均一濃度画素マトリックスの2値化値Iixy に対して次式のごとく濃度値i毎に異なる係数k(i) を設定して、全ての均一濃度画素マトリックスの合計値Cxyを求めることにより、集積結果マトリックスM1を作成しても良い。
【0111】
【数15】
Figure 0003709598
【0112】
尚、x,yは均一濃度画素マトリックスあるいは集積結果マトリックスM1上の画素位置を表す。
均一濃度画素マトリックスの2値化は、オン(「1」)またはオフ(「0」)への2値化であったが、いかなる値の2値化でも良く、いずれか一方の値の個数をカウントして、集積結果マトリックスM1を形成し、この集積結果マトリックスM1をディザマトリックスに変換すれば良い。また、上述したような個数のカウントではなく、2値化値の合計であっても良い。
【0113】
前記実施の形態1〜3において、2値化値を保存する特定の領域Aは、全ての均一濃度画素マトリックスにおいて同じ位置であったが、均一濃度画素マトリックスに応じて異なっていても良い。これは、均一濃度画素マトリックスを構成する濃度値iに応じて、先頭画素ラインL0部分で生じている誤差拡散の歪みの後方への影響の程度が異なるためである。
【0114】
また、このように濃度値iに応じて、先頭画素ラインL0部分で生じている誤差拡散の歪みが後方へ影響する程度が異なるため、全ての均一濃度画素マトリックスの2値化において誤差拡散の歪みの影響を無くすため、均一濃度画素マトリックスの大きさを濃度値iの値に応じて調整しても良い。
【0115】
前記実施の形態1〜3において、所定領域(前方縁部領域BF)の主走査方向の長さは3画素分であるが、これは係数マトリックスの列数に応じた長さにすることが好ましい。すなわち誤差拡散の影響がある長さに設定することが好ましい。
【0116】
前記実施の形態1における2値化は、2値化時に周辺画素から2値化誤差の分配を受けるタイプの誤差拡散法、いわゆる平均誤差最小法であったが、実施の形態2のごとく、注目画素を2値化した場合に2値化の誤差を未だ2値化していない周辺の画素の濃度に分配する方法による誤差拡散法であっても良い。
【0117】
また逆に、実施の形態2に平均誤差最小法を採用しても良い。この場合には、係数マトリックスβ,β1 ,β2 ,β3 ,β4 ,β5 については、次の内容とする。
【0118】
【数16】
Figure 0003709598
【0119】
【数17】
Figure 0003709598
【0120】
【数18】
Figure 0003709598
【0121】
【数19】
Figure 0003709598
【0122】
【数20】
Figure 0003709598
【0123】
【数21】
Figure 0003709598
【0124】
前記実施の形態3における2値化は、実施の形態1のごとく、2値化時に周辺画素から2値化誤差の分配を受けるタイプの誤差拡散法、いわゆる平均誤差最小法でも良く、実施の形態2のごとく、注目画素を2値化した場合に2値化の誤差を未だ2値化していない周辺の画素の濃度に分配する方法による誤差拡散法であっても良い。
【図面の簡単な説明】
【図1】 実施の形態1のディザマトリックス作成装置の主要ブロック図である。
【図2】 実施の形態1のディザマトリックス作成処理のフローチャートである。
【図3】 実施の形態1の2値化処理のフローチャートである。
【図4】 実施の形態1の均一濃度値画像データを示す説明図である。
【図5】 実施の形態1の均一濃度値の画像と特定領域との関係を示す説明図である。
【図6】 特定領域およびその周辺を拡大して示す説明図である。
【図7】 実施の形態1の均一濃度値画像データを2値化した状態を示す説明図である。
【図8】 実施の形態1の集積結果マトリックスの説明図である。
【図9】 実施の形態2の2値化処理のフローチャートである。
【図10】 実施の形態2の逆方向2値化処理のフローチャートである。
【図11】 特定領域およびその周辺を拡大して示す説明図である。
【図12】 実施の形態3のディザマトリックス作成処理のフローチャートである。
【図13】 実施の形態3の2値化処理の一部を示すフローチャートである。
【図14】 実施の形態3の各画素位置のオン・オフ設定状態の説明図である。
【図15】 実施の形態3の均一濃度画素マトリックスの処理順序を決定する方法の他の例を示すフローチャートである。
【図16】 従来例を示す説明図である。
【符号の説明】
2…ディザマトリックス作成装置 10…入力部
11…マイクロコンピュータ部 12…CPU
13…プログラムメモリ 14…ワーキングメモリ
16…ディザマトリックス格納メモリ
17…出力イメージメモリ 18…システムバス
19…出力部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a method of creating a dither matrix for converting a multi-value image into a binary image.
[0002]
[Prior art]
The data constituting the image is usually expressed in shades of about 8 bits. However, in a device that outputs this image data as an image that can be seen by a person, for example, an output device such as a printer, a dye such as ink is used as dots on recording paper because of its simple mechanism and ease of control. So-called binary recording, in which only the attachment is performed, is common.
[0003]
When using such a binary recording output device to record an image expressed in 8-bit grayscale, whether or not to apply ink by simply determining the value of each pixel based on a threshold value. Will be determined. However, by simply binarizing with the threshold value in this way, the rich shade state possessed by the 8-bit shade gradation (256 gradations for one color and 256 gradations for each of the three primary colors, approximately 16.7 million colors) can be obtained. It is impossible to express. Therefore, a method of expressing a shaded state in a pseudo manner with such a binary recording output device has been considered. In other words, this is the concept of area gradation in which shading is expressed by the number of dots arranged in a predetermined area.
[0004]
Various proposals have been made as methods for realizing this concept. For example, an error diffusion method, a random number generation type dither method, a systematic dither method, or the like.
[0005]
[Problems to be solved by the invention]
However, these methods have the following problems.
That is, in the error diffusion method, the binarization process is slow due to error diffusion or error distribution calculation, and a unique pattern is likely to occur in the binarized image. The random number generation type dither method is fast because it uses a dither matrix, but because it uses random numbers, there is a problem that the image quality is very noisy, that is, the image quality is such that a lot of noise is filled with the image. It was.
[0006]
As another method using the dither matrix, there is a spiral type belonging to the systematic dither method. However, this spiral type easily collects dots, and the dense one is recognized as a large dot, so the resolution is easily deteriorated. Among the systematic dither methods, there is a Bayer method, but this Bayer method has good resolution because dots are dispersed, but a unique pattern is generated, and the gradation of dark parts is also poor. Met.
[0007]
When processing an image wider than the size of the dither matrix, as shown in FIG. 16, the partial portions of the image are sequentially binarized for each region DM having the size of the dither matrix. In some cases, color unevenness or light / darkness unevenness occurs in the boundary portions BD1 and BD2 of this processing, and a pseudo boundary line such as a white line appears.
[0008]
The present invention provides a dither matrix that does not become noisy even when the dither method is used, the resolution does not deteriorate, the generation of a pattern is suppressed, and a pseudo boundary line does not occur between regions processed by the dither matrix. It is intended to create.
[0009]
[Means for Solving the Problems and Effects of the Invention]
In the dither matrix creation method of the present invention, each of a plurality of density values discretely set in a predetermined range set within a density range that can be represented by a pixel is converted into all pixels in each of a plurality of uniform density pixel matrices. For each uniform density pixel matrix, the density value is binarized to either on / off by the error diffusion method, and the density value of a specific region in a part of the binarized uniform density pixel matrix Based on this, the threshold value of each pixel in the dither matrix is set.
[0010]
When the image is binarized by the dither matrix having the threshold value set in this way, a binarized image is generated which is not noisy to human eyes, does not deteriorate in resolution, and suppresses generation of a pattern. Can do.
The binary sequence produced by the error diffusion method looks irregular at first glance, but is not at all random. That is, there is a property that it is difficult to form a pattern, but it is difficult to form a noisy image. As described above, the dither matrix creation method of the present invention is created by incorporating the characteristics of the binary sequence in the error diffusion method into the dither matrix by using the binary sequence generated by the error diffusion method. .
[0011]
Therefore, in the dither matrix that enables the binarization calculation processing at high speed, an appropriate threshold value distribution that is irregular but not random is formed by the error diffusion method as described above. It is considered that a binarized image that is not noisy to the eyes, does not deteriorate in resolution, and further suppresses the generation of patterns can be generated.
[0012]
Further, in the present invention, the uniform density pixel matrix is a matrix larger than a required dither matrix, and after binarization by the error diffusion method, a threshold value of each pixel in the dither matrix is determined based on the binarization result. Is set. For this reason, error diffusion or error distribution distortion in the initial stage of error diffusion processing hardly affects the dither matrix, and even if the image is binarized using the completed dither matrix, the occurrence of dot bias and patterns are suppressed. can do. The threshold value of the dither matrix based on the binarization result is obtained by, for example, setting the density value of a specific area in a part of the binarized uniform density pixel matrix to pixels in the same position for all the uniform density pixel matrix. It is also possible to perform integration based on the integration result for each pixel at the same position.
[0013]
Furthermore, in the present invention, the boundary is defined with respect to an edge region in the specific region that is in contact with a boundary between the specific region and an external region other than the specific region, or an edge region of the external region that is in contact with the boundary. Boundary processing that maintains the continuity of the binarization processing that is sandwiched is performed.
[0014]
The reason why unevenness in color and lightness and darkness occurs at the boundary between regions processed by the dither matrix is that there is no continuity between the edges at the left and right edges and the top and bottom edges of the dither matrix. In particular, when the dither matrix is created by the binarization processing by the error diffusion method as described above, the discontinuity of the error diffusion processing between edges in the main scanning direction of the binarization processing by the error diffusion method is color. It greatly affects unevenness of light and darkness. If this is maintained by boundary processing, color unevenness and light / darkness unevenness at the boundary of the region processed by the dither matrix can be suppressed, and generation of a pseudo boundary line can be suppressed.
[0015]
As the boundary processing, in particular, for the rear edge region in the specific region or the front edge region of the external region that is in contact with the boundary that the processing in the main scanning direction of binarization crosses from the specific region to the external region It is preferable to be performed.
As the boundary processing, for example, in the front edge region of the external region, the processing in the main scanning direction of binarization is performed in the front edge region in the specific region in contact with the boundary crossing from the external region to the specific region. A process of copying the immediately preceding binarization result can be used.
[0016]
In this way, by copying the binarization result of the front edge region in the specific region to the front edge region of the external region, the binarization result of the front edge region in the specific region results in an error. It is reflected in the rear edge region in the specific region by error distribution processing in the diffusion method. Therefore, the continuity of the binarization process between the front edge area and the rear edge area in the specific area is maintained, and even when the image is binarized by repeatedly using the formed dither matrix, a pseudo boundary is generated. The generation of lines can be prevented.
[0017]
In this case, the binarization processing further reverses the main scanning direction for a region composed of the rear edge region in the specific region and the front edge region of the external region that are continuous across the boundary. Is preferred. As a result, the binarization result of the front edge area in the specific area is more easily reflected in the rear edge area in the specific area. Therefore, the continuity of the binarization process between the rear edge region in the specific region and the front edge region of the outer region is further strongly maintained, and the generation of the pseudo boundary line is further suppressed.
[0018]
Note that if the specific region does not include the integration result of the first pixel line portion where the error diffusion method has been started, error diffusion or error distribution distortion at the initial stage of error diffusion hardly affects the dither matrix. Thus, even if the image is binarized using the completed dither matrix, it is possible to further suppress the deviation of dots and the generation of patterns. Further, in this case, in order to eliminate the influence of the distortion as much as possible, the specific region is a line farthest from the head pixel line portion, and the integration of the final pixel line portion where the error diffusion method processing is completed is completed. It is preferable to include the results.
[0019]
Further, when binarization processing of a uniform density pixel matrix having a certain density value is performed, each pixel is binarized according to the binarization state of the uniform density pixel matrix that has already been binarized. It is also good. This “binarization processing performed according to the binarization state of the already binarized uniform density pixel matrix” means, for example, binarization processing within the already binarized uniform density pixel matrix There is a method of performing binarization processing according to the binarization state of the uniform density pixel matrix having the density value closest to the uniform density pixel matrix to be attempted. In other words, the binarization process by the error diffusion method of the uniform density pixel matrix is not executed completely independently, but the binarization state in the uniform density pixel matrix of other density values already made is reflected.
[0020]
As a result of this reflection, the integrated state at each pixel position is not biased to a specific value and is dispersed into various values as compared with a case where each pixel pixel matrix is binarized independently. Therefore, in the dither matrix finally obtained based on such an accumulation state, the threshold values are distributed in a moderately distributed manner within a predetermined range.
[0021]
More specifically, in the error diffusion method performed in the uniform density pixel matrix in which the density value i is the density value of all pixels, the density value that is less than the density value i and closest to the density value i is already binarized. If the pixel position that is the same as the pixel position that is turned on in the recently obtained lower binarized pixel matrix is always turned on and binarized by error diffusion processing, the above-described effect can be obtained. In this case, first, the density value of each pixel is turned on / off by the error diffusion method for a uniform density pixel matrix in which the minimum value min of a plurality of discretely set density values is the density value of all pixels. It is also possible to binarize to any of the above, and then binarize the other density as the density value i.
[0022]
Further, in the error diffusion method performed in the uniform density pixel matrix in which the density value i is the density value of all pixels, the density value exceeding the density value i and closest to the density value i is already binarized. In addition, if the pixel position that is the same as the pixel position that is turned off in the upper binarized pixel matrix is always turned off and binarized by error diffusion processing, the above-described effect can be obtained. In this case, first, for a uniform density pixel matrix in which the maximum value max among a plurality of discrete density values is set as the density value of all pixels, the density value of each pixel is turned on / off by the error diffusion method. It is also possible to binarize to any one of the above, and then binarize the other density values as the density value i.
[0023]
Further, in the error diffusion method performed in the uniform density pixel matrix in which the density value i is the density value of all pixels, the density value that is less than the density value i and closest to the density value i has already been binarized. Pixel positions that are also on in the most recently binarized pixel matrix that has already been binarized for the density value that is on and in the lower binarized pixel matrix that exceeds the density value i and is closest to the density value i The same pixel position is always turned on, and the error diffusion processing is performed with the pixel position same as the pixel position that is off in the latest lower binarized pixel matrix and off in the latest upper binarized pixel matrix being off. By binarizing, the above-described effects can be obtained. In this case, first, with respect to two uniform density pixel matrices having the minimum value min and the maximum value max of a plurality of discretely set density values as the density values of all pixels, the error diffusion method is used for each pixel. It is preferable to binarize the density value to either on / off.
[0024]
Further, the density value i is made to correspond to the central integer value of the density values of the nearest lower binarized pixel matrix and the nearest upper binarized pixel matrix, or to almost the middle integer value. Is preferable in terms of improving the resolution and suppressing the pattern of the pseudo halftone image obtained by processing with the obtained dither matrix.
[0025]
The predetermined range may be equal to a density range that can be expressed in a pixel. In this case, examples of the predetermined range include a range of 0 to 255. This is particularly preferable when the data constituting the image to be binarized is represented by 8-bit grayscale.
[0026]
In order to further improve the above-described effect, a plurality of density values discretely set in the predetermined range are set to max-min + 1 set by changing one by one from the minimum value min to the maximum value max. It is preferably a value.
The integration result for each pixel at the same position is, for example, the number of one of the binarized density values at the pixel at the same position, and the threshold value of each pixel of the dither matrix according to this number Can be set. For example, assuming that binary values are represented by “1” (on) and “0” (off), “1” (on) existing at the same position in a plurality of binarized uniform density pixel matrices. The count value may be set as the threshold value at the same position of the dither matrix as it is or by applying a coefficient. Further, the threshold value may be set based on the table from the count value. “0” (off) may be counted instead of “1” (on).
[0027]
In addition to the above-described method, the threshold value is set to 2 when a uniform density pixel matrix having a minimum value min to a uniform density pixel matrix having a maximum value max among a plurality of discretely set density values is viewed. For a pixel position that first appears as “1” (on) in the digitized uniform density pixel matrix, a threshold value is set according to the density value of the uniform density pixel matrix that first becomes “1” (on). It may be set. For example, the pixel positions may be sequentially checked from the smaller density value, and the density value of the uniform density pixel matrix in which “1” (ON) first appears may be set as a threshold value. Alternatively, a threshold value may be set by multiplying the density value by a predetermined coefficient.
[0028]
In addition, the threshold value is set as a binary uniform density when viewed from a uniform density pixel matrix having a maximum value max to a uniform density pixel matrix having a minimum value min among a plurality of density values set discretely. The threshold value may be set according to the density value of the uniform density pixel matrix that first becomes “0” (off) for the pixel position that appears first as “0” (off) in the pixel matrix. good. For example, the pixel positions may be sequentially checked from the larger density value, and the density value of the uniform density pixel matrix in which “0” (off) first appears may be set as a threshold value as it is. Alternatively, a threshold value may be set by multiplying the density value by a predetermined coefficient.
[0029]
DETAILED DESCRIPTION OF THE INVENTION
[Embodiment 1]
FIG. 1 is a main block diagram of the dither matrix creation device 2.
The microcomputer unit 11 constituting the main body of the dither matrix creating apparatus 2 includes a CPU 12, a program memory 13 made of ROM, a working memory 14 made of RAM, a dither matrix storage memory 16 made of RAM, and an output image memory 17 made of RAM. ing. An input unit 10 and an output unit 19 are connected to the microcomputer unit 11 via a system bus 18.
[0030]
The input unit 10 includes an interface for inputting from a keyboard or an external storage device, and inputs data and instructions necessary for creating a dither matrix. In addition, the input unit 10 inputs image data having a gradation in which each pixel is represented by 8 bits in order to confirm the effect of the created dither matrix.
[0031]
The CPU 12 executes creation of a dither matrix as described later, and the program memory 13 stores programs for performing various controls performed by the CPU 12. The working memory 14 temporarily stores data necessary for the CPU 12 to execute a program stored in the program memory 13.
[0032]
The dither matrix storage memory 16 stores dither matrix data formed by the processing of the CPU 12.
The output image memory 17 uses the dither matrix stored in the dither matrix storage memory 16 by the CPU 12 to binarize image data having a gradation represented by 8 bits. Store image data.
[0033]
The output unit 19 is a device that prints the binarized image data stored in the output image memory 17 with or without dots by an electrophotographic method.
Next, a dither matrix creation process executed by the dither matrix creation device 2 will be described. A flowchart of the dither matrix creation process is shown in FIG.
[0034]
First, “0” is set to the density value i (S100). Next, the uniform density pixel matrix in which all pixels have density value i = 0 is binarized (S110). As shown in FIG. 4, 256 uniform density pixel matrices D0 to D255 of i = 0 to 255 may be used by reading the uniform density pixel matrix into the working memory 14.
[0035]
Since all the pixels have the same density value i in each uniform density pixel matrix, in addition to arranging 256 types of uniform density pixel matrices in this way, all density values are used when the density value of each pixel is used for calculation in the error diffusion method. Since it may be handled as the value i, only 256 values from i = 0 to 255 may be stored. Further, a lower limit value “0”, an upper limit value “255” of the density value i, and a step value Sp (processing for determining the value of the density value i discretely present between the lower limit value and the upper limit value are processed. Only a value indicating the interval between the density values i (here, Sp = 1) may be used.
[0036]
The details of the binarization process in step S110 are shown in the flowchart of FIG.
First, the density value (equal to the density value i) of the pixel of interest in the uniform density pixel matrix having the density value i = 0 is read (S112). The pixel position of the first target pixel is the origin position (0, 0). Thereafter, every time the processing returns to step S112, the position of the pixel of interest is designated with the x direction as the main scanning direction and the y direction as the sub scanning direction, and the binarization processing proceeds.
[0037]
Next, it is determined whether or not the pixel position is within a predetermined area (S114). In the first embodiment, the predetermined area is an area that exists immediately after the main scanning direction of the specific area A set in a part of each uniform density pixel matrix D0 to D255 shown in FIG. As shown in the enlarged view of FIG. 6, assuming that the area of the uniform density pixel matrix D0 to D255 other than the specific area A is the external area B, the binarized main scanning direction in the boundary between the specific area A and the external area B Means the front edge region BF of the outer region B that is in contact with the boundary CR crossing from the specific region A to the outer region B.
[0038]
If the target pixel is not within the predetermined region (front edge region BF) (“NO” in S114), then the target pixel is binarized by a normal error diffusion method and the binarization error is Calculated.
That is, first, as shown in the following equation 1, the density value i is corrected by the binarization error sum E of the peripheral pixels, and the corrected density value I is calculated.
[0039]
[Expression 1]
Figure 0003709598
[0040]
The binarization error sum E is calculated based on the coefficient matrix α and the binarization error e of the surrounding pixels as shown in the following equation 2.
[0041]
[Expression 2]
Figure 0003709598
[0042]
In the first embodiment, the following matrix is used as the coefficient matrix α. αab represents the coefficient at the position (a, b) of the coefficient matrix α. Eab represents the binarization error of the peripheral pixel at the position corresponding to the coefficient at the position (a, b) of the coefficient matrix α.
[0043]
[Equation 3]
Figure 0003709598
[0044]
Here, * represents the position of the target pixel.
The corrected density value I obtained in this way is compared with a threshold value t (for example, t = 128 in the first embodiment), and if I> t, the target pixel is binarized to on (“1”). If I ≦ t, the target pixel is binarized to off (“0”).
[0045]
Next, when the target pixel is binarized to ON, the binarization error e of the target pixel is obtained by the calculation of the following equation.
[0046]
[Expression 4]
Figure 0003709598
[0047]
Further, when the pixel of interest is binarized off, I is set to the binarization error e of the pixel of interest as in the following equation.
[0048]
[Equation 5]
Figure 0003709598
[0049]
In this way, the binarization process (S116) by the normal error diffusion method is terminated, and then it is determined whether or not the current target pixel is included in the specific area A (S118). As shown in FIG. 5, the specific area A is an area where binarized value counting processing is performed in order to form the integration result matrix M1. In the first embodiment, all the uniform density pixel matrices D0 to D0 are processed. It exists in the same position in D255.
[0050]
The specific area A does not include the first pixel line L0 portion in the error diffusion process, but includes the final pixel line Lx portion. This is because in the first pixel line L0 portion, there is no previous line, so in the binarization error diffusion, the binarization error distribution is distorted compared to the back line, and the dot concentration and This is because a specific pattern is likely to occur, and the influence of the distortion of the binarized error diffusion decreases as the distance from the head pixel line L0 increases backward, and the influence is the least in the final pixel line Lx portion.
[0051]
If it is determined that the current pixel of interest is included in the specific area A (“YES” in S118), the binarized value of the pixel of interest is stored in the working memory 14 (S120). If it is determined that the current pixel of interest is not included in the specific area A (“NO” in S118), the binarized value of the pixel of interest is not stored.
[0052]
Next, it is determined whether or not there is an unprocessed pixel in the density value i (S122). If there is an unprocessed pixel (“YES” in S122), the process returns to step S112 again, and the unprocessed pixel is selected as the target pixel. The above processing is performed.
If it is determined that the target pixel is within the predetermined area (front edge area BF) (“YES” in S114), the following binarization process is performed (S124).
[0053]
That is, for the current pixel of interest, the calculations of the above formulas 1, 2, 3, and 4 are performed, but the comparison between the corrected density value I for binarization and the threshold value t is not performed, and m pixels in the main scanning direction. The binarization result for the pixel at the returned position is directly adopted as the binarization result for the current pixel of interest. If this binarization result is on, the operation of Expression 3 is performed, and if it is off, the operation of Expression 4 is performed. That is, the error diffusion method according to the binarization result of m pixels before is executed without performing comparison with the threshold value t.
[0054]
The value m is the length of the specific area A in the main scanning direction. Therefore, for the pixels in the front edge region BF, the binarization in the front edge region AF that is in contact with the boundary CF where the binarization process in the main scanning direction crosses from the external region B to the specific region A within the specific region A is performed. The conversion result is adopted as it is. That is, in FIG. 6, the front edge region BF including the three pixel columns Q1, Q2, and Q3 that are in contact with the outside of the right boundary CR of the specific region A has three pixels that are in contact with the inside of the left boundary CF of the specific region A. The binarized state is exactly the same as that of the front edge region AF composed of the columns P1, P2, and P3. For example, for the binarization of the pixel b1, the binarization result of the pixel a1 is used as it is.
[0055]
In this way, each pixel is binarized, and if binarization is completed for all the pixels of the uniform density pixel matrix of density value i (“NO” in S122), as shown in FIG. It is determined whether i = 255 (S130). Since the density value i is initially 0 (“NO” in S130), the density value i is then incremented (S140). Therefore, the above-described binarization process is executed on the uniform density pixel matrix in which all the pixels have the density value i = 1 (S110).
[0056]
Thereafter, the process of sequentially incrementing the density value i (S140) and binarizing the uniform density pixel matrix of the corresponding density value i as described above (S110) is repeated.
When the binarization processing (S110) of the uniform density pixel matrix having the density value i = 255 is completed, 256 binarized pixel matrices having density values i = 0 to 255 are stored in the working memory 14 as shown in FIG. F0 to F255 are formed.
[0057]
Next, since the density value i = 255 (“YES” in S130), for all the binarized pixel matrices, the number of pixels binarized on among the pixels at the same position is counted, and this count value An integration result matrix M1 is formed with S as an element (S150).
[0058]
That is, as shown in FIG. 7, assuming that the upper left corner is the origin (0, 0), the horizontal direction is the x axis, and the vertical direction is the y axis, first, (0, 0) of all the binarized pixel matrices F0 to F255. The pixels that are turned on are counted. The count result is stored in the same position (0, 0) of the integration result matrix M1 prepared in the working memory 14 as shown in FIG. This counting process is performed for each pixel position, and all the integration result matrix M1 is filled. This count process is binarized to “1” when each pixel is on, and to “0” when it is off, so the numerical values of the pixels at the same position may be summed up.
[0059]
Next, threshold values for the dither matrix are set in order from the pixel position having a low count value in the integration result matrix M1 (S160), and the matrix composed of the threshold values is stored in the dither matrix storage memory 16 as a dither matrix (S170). .
[0060]
As a method for setting the threshold value, the count value itself may be set as the threshold value. In this case, since the count process in step S150 corresponds to the threshold setting process for the dither matrix, no particular process is performed in step S160. Then, the integration result matrix M1 itself is stored as a dither matrix in the dither matrix storage memory 16 (S170).
[0061]
In step S160, instead of simply using the count values themselves of the integration result matrix M1 as threshold values, the count values of the integration result matrix M1 are set as threshold values according to a table of count values and threshold values prepared in advance. It may be converted.
In step S160, the threshold values may be set to “0, 1, 2,...” From the lowest count value. 254, 253, ... "may be set. In this case, if there are two or more of the same count value, they may all be given the same threshold value, or the same count value may be ordered and the threshold value set in the same way as different count values. You may do it.
[0062]
Using the dither matrix formed in this way, a halftone color image is binarized and recorded by a color printer, so that it is not noisy to human eyes and resolution is not deteriorated. Thus, it was possible to generate a pseudo-halftone binarized image in which the generation of patterns was suppressed. Of course, this method is a dither method, and many calculations are not performed unlike the error diffusion method, so that it can be processed quickly.
[0063]
Furthermore, in the first embodiment, the binarized pixel matrix F0 to F255 of the specific area A that does not include the first pixel line L0 and includes the final pixel line Lx is obtained from the uniform density pixel matrix, and this binarized pixel. An integration result matrix M1 smaller than the uniform density pixel matrix is obtained from the matrices F0 to F255, and a dither matrix is formed based on the integration result matrix M1. For this reason, it is difficult to be affected by the distortion of error distribution occurring in the first pixel line L0, and a pseudo-halftone binary image in which the generation of patterns is further suppressed can be generated.
[0064]
Further, as described above, the binarization result of the front edge area AF of the specific area A is directly adopted for the pixels in the front edge area BF. Therefore, in the error distribution, a binarization error is distributed from the peripheral pixel at the position corresponding to the shape of the coefficient matrix α to the target pixel, but the rear edge region AR of the specific region A that is in contact with the left side of the boundary CR. However, the binarization error distribution from the pixels in the front edge region BF is directly or indirectly affected. Since the front edge area BF is the same as the binarization result of the front edge area AF of the specific area A, the front edge area AF of the specific area A and the rear edge area AR of the specific area A The continuity of the process is maintained. Therefore, even if the halftone image is binarized by using the dither matrix created by the following process, it is possible to suppress color unevenness and light / dark unevenness between the areas processed by the dither matrix, and the pseudo boundary Can be suppressed.
[0065]
The determination of unprocessed pixels in step S122 may be determination of whether or not there are unprocessed pixels in the specific area A.
[Embodiment 2]
The second embodiment is different from the first embodiment in that the binarization process in step S110 is as shown in FIGS. 9 and 10, and the error diffusion method performed in steps S1160, S2040, and S2050. The difference is that, when the pixel of interest is binarized, the binarization error is distributed to the density of surrounding pixels that have not yet been binarized.
[0066]
In FIG. 9, steps S1120, S1180, S1200, and S1220 are the same as steps S112, S118, S120, and S122 shown in FIG. 3 of the first embodiment. In the following, a description will be given focusing on differences from the first embodiment.
[0067]
First, after step S1120, it is determined whether or not it is the reverse rotation region RV (S1122). If it is the reverse rotation region RV (“YES” in S1122), reverse binarization processing (S2000) is performed.
As shown in FIG. 11, the reverse region RV includes the pixel row Pm-3 immediately before the rear edge region AR of the specific region A and the entire rear edge region AR of the specific region A (pixel rows Pm-2, Pm- 1, Pm) and the entire front edge region BF of the outer region B (pixel columns Q1, Q2, Q3).
[0068]
Therefore, while the binarization process performed in the main scanning direction does not reach the pixel column Pm-3 (“NO” in S1122), the processes of steps S1160 to S1220 are executed, and the target pixel is detected by a normal error diffusion method. While binarization is performed, a binarization error is calculated and distributed to surrounding pixels that have not yet been binarized.
[0069]
That is, as shown in the following expression 5, the density value i is corrected by the binarization error sum E distributed from the already binarized peripheral pixels to the target pixel, and the corrected density value I is calculated.
[0070]
[Formula 6]
Figure 0003709598
[0071]
The corrected density value I obtained in this way is compared with a threshold value t (for example, t = 128 in the second embodiment), and if I> t, the target pixel is binarized to ON (“1”). If I ≦ t, the target pixel is binarized to off (“0”).
Next, when the pixel of interest is binarized to ON, the binarization error e of the pixel of interest is obtained by the calculation of the following equation (6).
[0072]
[Expression 7]
Figure 0003709598
[0073]
Further, when the pixel of interest is binarized off, I is set to the binarization error e of the pixel of interest as shown in the following equation (7).
[0074]
[Equation 8]
Figure 0003709598
[0075]
Next, the binarization error e is distributed to the unbinarized peripheral pixels based on the coefficient matrix β shown below.
[0076]
[Equation 9]
Figure 0003709598
[0077]
Here, * represents the position of the target pixel, and the numerical value represents that the binarization error e obtained by multiplying the numerical value by the coefficient is distributed to the target pixel at the position corresponding to the numerical value. The processing of the next steps S1180 to S1220 is the same as steps S118 to S122 of the first embodiment.
[0078]
When the binarization processing performed in the main scanning direction reaches the pixel column Pm-3, that is, when the reverse rotation region RV is entered (“YES” in S1122), the processing in step S2000 is executed.
As shown in the flowchart of FIG. 10, first, a binarization target pixel is set (S2010). For this setting, a pixel row consisting of “..., A, b, c, d, e,..., R, S, T, U, V, W, X, Y, Z,. To explain, when the pixel S is set as the target pixel in the loop returning from step S1220 to step S1120, a process of setting the pixel Y as the actual pixel to be binarized is performed separately from the setting. . Next, when the pixel T is set as the target pixel, the pixel X is set as the binarization target pixel, and when the pixel U is set as the target pixel, the pixel W is set as the binarization target pixel. When the pixel V is set as the target pixel, the pixel V is set as the binarization processing target pixel, and when the pixel W is set as the target pixel, the pixel U is set as the binarization processing target pixel. When the pixel X is set, the pixel T is set as the binarization processing target pixel, and when the pixel Y is set as the target pixel, the pixel S is set as the binarization processing target pixel. That is, in the reverse rotation region RV, the binarization process proceeds in the opposite direction to the other regions.
[0079]
Next, the density value of the binarization target pixel and the binarization error sum E are newly read (S2015). Then, for the binarization process by the error diffusion method, a coefficient matrix corresponding to the binarization process target pixel position is designated (S2020). The reason why the coefficient matrix β used outside the reverse region RV is not used is that the arrangement of the non-binarized peripheral pixels with respect to the binarization target pixel is different because the main scanning direction is reversed.
[0080]
For the seven pixel columns Pm-3, Pm-2, Pm-1, Pm, Q1, Q2, and Q3 in the reverse region RV, the coefficient matrix is adapted to the arrangement of the unbinarized peripheral pixels, respectively. A coefficient matrix β1, β2, β3, β4, β5 is selected and applied. An example of each coefficient matrix β1, β2, β3, β4, β5 is shown below.
[0081]
[Expression 10]
Figure 0003709598
[0082]
[Expression 11]
Figure 0003709598
[0083]
[Expression 12]
Figure 0003709598
[0084]
[Formula 13]
Figure 0003709598
[0085]
[Expression 14]
Figure 0003709598
[0086]
A coefficient matrix β5 is applied to the pixel column Pm-3 in the reverse region RV, a coefficient matrix β4 is applied to the pixel column Pm-2, and a coefficient matrix β3 is applied to the pixel columns Pm-1, Pm, and Q1. The coefficient matrix β2 is applied to the pixel column Q2, and the coefficient matrix β1 is applied to the pixel column Q3.
[0087]
Next, step S2040 or step S2050 is executed in the determination of step S2030. The processing in step S2040 is the same as the processing in step S1160 described above except that the coefficient matrix specified in step S2020 is used as the coefficient matrix.
[0088]
That is, for the current pixel of interest, the calculation of the above-mentioned formulas 5, 6, and 7 and the distribution of the binarization error e are performed, but the comparison between the correction density value I for binarization and the threshold value t is not performed. The binarization result for the pixel at the position returned by m pixels in the main scanning direction is directly adopted as the binarization result of the current pixel of interest. If this binarization result is on, the calculation of Expression 6 is performed, and if it is off, the calculation of Expression 7 is performed. That is, without making a comparison with the threshold value t, a binarization error is calculated according to the binarization result of m pixels before, and distributed to surrounding pixels based on the coefficient matrix β.
[0089]
The value m is the length of the specific area A in the main scanning direction. Therefore, for the pixels in the front edge region BF, the binarization in the front edge region AF that is in contact with the boundary CF where the binarization process in the main scanning direction crosses from the external region B to the specific region A within the specific region A is performed. The conversion result is adopted as it is. That is, in FIG. 6, the front edge region BF including the three pixel columns Q1, Q2, and Q3 that are in contact with the outside of the right boundary CR of the specific region A has three pixels that are in contact with the inside of the left boundary CF of the specific region A. The binarized state is exactly the same as that of the front edge region AF composed of the columns P1, P2, and P3. For example, the binarization of the pixel W uses the binarization result of the pixel a as it is.
[0090]
That is, after performing the binarization processing of the pixel R, the pixel Y is binarized next, but the pixel Y is in a predetermined region (front edge region BF) (“YES” in S2030). The binarization itself is set to the same value as the pixel c for which the binarization result has already been obtained, and the binarization error is distributed by the coefficient matrix β1. Next, the pixel X is binarized. Here, the binarization itself is set to the same value as the pixel b for which the binarization result has already been obtained, and the binarization error is distributed by the coefficient matrix β2. . Next, the pixel W is binarized. Here, the binarization itself is set to the same value as the pixel a for which the binarization result has already been obtained, and the binarization error is distributed by the coefficient matrix β3. .
Next, the pixel V is binarized. However, since the pixel V is not in the predetermined region (front edge region BF) (“NO” in S2030), the pixel V is binarized by comparison with the threshold value t. Is distributed by the coefficient matrix β3. The processing for the next pixel U is the same as that for the pixel V. Next, the pixel T is binarized. Again, the pixel T is binarized by comparison with the threshold value t, and the binarization error is distributed by the coefficient matrix β4. Next, the pixel S is binarized. Here, too, the pixel S is binarized by comparison with the threshold value t, and the binarization error is distributed by the coefficient matrix β5.
[0091]
Then, since the target pixel goes out of the reverse rotation region RV and becomes the pixel Z (“NO” in S1122), the pixel Z itself is binarized, and is left to the process of step S1160.
Since the second embodiment is configured as described above, the same effect as that of the first embodiment is produced, and the binarization main scanning direction is reversed in the reverse rotation region RV across the boundary CR. Therefore, as compared with the first embodiment, the binarization is performed on the rear edge region AR of the specific region A in contact with the left side of the boundary CR from the pixel in the front edge region BF in contact with the right side of the boundary CR. The influence of error distribution can be made sufficiently large. That is, the binarization error distribution from the front edge area AF to the rear edge area AR is sufficiently effective. For this reason, in the binarization processing by the error diffusion method, the continuity of processing between the front edge area AF of the specific area A and the rear edge area AR of the specific area A is sufficiently maintained. Even if the halftone image is binarized by using the dither matrix created by the processing of No. 2, it is possible to sufficiently suppress the generation of a pseudo boundary between processing regions by the dither matrix.
[0092]
[Embodiment 3]
The third embodiment is different from the first and second embodiments in the dither matrix creation processing, and is that the binarization processing of each pixel of the uniform density pixel matrix is performed as follows. That is, ON and density in the most recent lower binarized pixel matrix L obtained by binarizing a uniform density pixel matrix having a density value less than the density value i of the uniform density pixel matrix to be binarized and closest to the density value i. In the most recently binarized pixel matrix H obtained by binarizing the uniform density pixel matrix having a density value exceeding the value i and closest to the density value i, the same pixel position as the on pixel position is always turned on. Then, error diffusion processing is performed under the condition that the pixel position that is off in the latest lower binarized pixel matrix and the same pixel position that is off in the latest upper binarized pixel matrix is always turned off. Furthermore, the binarization processing order of each uniform density pixel matrix is such that the density value i of the uniform density pixel matrix to be processed is the center of the density values of the most recently lower binarization pixel matrix and the most recent binarization pixel matrix. Another difference is that processing is sequentially performed so as to correspond to an integer value.
[0093]
The dither matrix creation process of the third embodiment is shown in FIGS.
First, a uniform density pixel matrix in which all pixels have a density value i = 0 and a uniform density pixel matrix in which all pixels have a density value i = 255 are binarized by an error diffusion method (S3080). As shown in FIG. 4, this uniform density pixel matrix may be used by reading two types of uniform density pixel matrices D0 and D255 of i = 0 and 255 into the working memory 14. Then, the binarized pixel matrices F0 and F255 (FIG. 7) are stored in the working memory 14 (S3090). However, the binarization result by the error diffusion method of the uniform density pixel matrix having the density values i = 0 and 255 performed in step S3080 indicates that all pixels are “0” (off) when i = 0, and i = 255. In this case, since all the pixels are “1” (on), a binary pixel matrix in which all the pixels are off and a binary pixel matrix in which all the pixels are on are provided in advance without performing calculation by the error diffusion method. In addition, these matrices may be used.
[0094]
Next, a density value array is created for the density values 1 to 254 (S3100), and then the density values i are read one by one from the array (S3105), and the process of step S3110 is performed to obtain all the density values in the array. If the process is completed for the value, it is determined in step S3130 that the array is completed, and the processes of steps S3150, S3160, and S3170 are performed. The processes in steps S3150, S3160, and S3170 are the same as steps S150, S160, and S170 in the first embodiment.
[0095]
The array of density values in step S3100 is created so that the density value at the center of the binarized density values is set to i. That is, the beginning of the array is “128” which is the central integer value of “0” and “255” (may be another central integer value “127”), and the next is “0” and “128”. "64" in the middle of "128", "192" in the middle of "128" and "255" (another integer value of "191" may be acceptable), and the next is "0" and "64" Central “32”, “64” and “128” in the middle “96”, “128” and “192” in the middle “160”, “192” and “255” in the middle “224” (Another central integer value “223” may be used.) As described above, the central integer value of the previously obtained values is obtained, and an array of density values from “1” to “254” is obtained. “128, 64, 192, 32, 96, 160, 224,...” Are created. This array may be calculated in advance and stored as array data, and only the array data may be read and used during this processing.
[0096]
In step S3105, the density value i is sequentially set from the beginning of this array, the binarization process of step S3110 is performed, and if the process of step S3110 is completed until the end of the array, “YES” is determined in step S3130. After the determination, the process proceeds to threshold value setting processing (S3150, S3160, S3170).
[0097]
Next, the binarization process in step S3110 will be described. In this process, the binarization process of the first embodiment is the same as the process described in FIG. 3 except that the process in step S116 is replaced with the process shown in FIG.
That is, if it is determined in step S114 that it is not within the predetermined area, the process of step S4200 is performed, and binarized density values, that is, among the density values for which a binarized pixel matrix has already been obtained. Thus, the latest upper binarized pixel matrix H and the latest lower binarized pixel matrix L are searched from the contents of the working memory 14 (S4200).
[0098]
Next, the uniform density pixel matrix having the density value i is binarized by the error diffusion method to create a binarized pixel matrix Fi (S4210).
However, it is binarized under the following conditions (1) and (2).
{Circle around (1)} A pixel position where “1” ON is arranged in both the most recently binarized pixel matrix H and the most recently binarized pixel matrix L is always “1” ON.
[0099]
{Circle around (2)} Pixel positions where “0” off is arranged in both the most recently binarized pixel matrix H and the most recently binarized pixel matrix L are always “0” off.
That is, normally, in the error diffusion method, the sum of the error distributed from the surrounding pixels and the density of the pixel of interest is compared with a threshold value. For example, in the case of a pixel corresponding to the above condition (1) or (2), the pixel is not compared with the threshold value without being compared with the above (1) or (2). Set “1” on or “0” off according to condition (2). Of course, the result of setting that is not compared with this threshold value is reflected in the binarization error, and is subject to distribution to surrounding pixels.
[0100]
According to the conditions (1) and (2), as shown in FIG. 14 (a), when viewed from the smaller density value at each pixel position, once turned on, the subsequent density value i is always turned on. Become.
When normal binarization is performed without using the above conditions (1) and (2), as shown in FIG. 14B, after turning on, off appears at the same pixel position. For this reason, the number of ONs at each pixel position tends to be biased to a specific value in the range of 0 to 255 with only normal binarization, but in the third embodiment, various values in the range of 0 to 255 are included. To a suitable distribution. Therefore, the dither matrix obtained in this way is distributed in a moderately distributed manner in the range of the threshold value from 0 to 255. Therefore, in particular, as shown in FIG. 14B, the dither with improved resolution and suppression of the pattern is further improved as compared with the dither matrix obtained when each uniform density pixel matrix is binarized independently. A matrix can be obtained.
[0101]
Further, in the third embodiment, in order to sequentially binarize the density i at the center of the already binarized density values, the latest upper binarized pixel matrix and the latest lower binarized pixel matrix The binary dispersion of the binarized pixel matrix having the central density i has a relatively uniform distribution. Since the dither matrix is created based on the binarized pixel matrix satisfying the uniform distribution and the conditions (1) and (2) obtained in this way, the effect of improving the resolution and suppressing the pattern further increases. To do.
[0102]
In the third embodiment, the array is created in advance so that the center value can be obtained sequentially for the density value i. However, instead of creating the array in advance, the center value is calculated in the process of step S3105. May be sequentially obtained and set to the density value i.
An example of obtaining the central value by calculation is shown in FIG. This process is executed instead of steps S3100 to S3130 in FIG. In this process, first, eight variables I0 to I7 are initialized with "0" (S5010 to S5080), then I0 to I7 are summed and set to a density value i (S5090). If the density value i is “0”, I7 is increased by “128” (S5120), and then I7> 128 is not satisfied (“NO” in S5130), so the density value i is set to “ 128 ”is set, i is not 0 (“ NO ”in S5100), and i is not 255 (“ NO ”in S5110), so the processing in step S3110 (same as the processing in FIG. 12) is performed.
[0103]
Next, in step S5120, I7 = 256, it is determined "YES" in step S5130, I6 is increased by "64" (S5140), I6 = 64, and I6> 64 is not satisfied (in S5150). “NO”), it is initialized to I7 = 0 in step S5080, and i = 64 in step S5090. Accordingly, the process proceeds from steps S5100 and S5110 to step S3110, and binarization processing is performed on the uniform density pixel matrix having density value i = 64.
[0104]
Next, in step S5120, I7 = 128, and "NO" is determined in step S5130. In step S5090, I0 to I5 = 0, I6 = 64, and I7 = 128, i = 192. After steps S5100 and S5110, binarization is performed on the uniform density pixel matrix having density value i = 192.
[0105]
Next, since I0 to I5 = 0, I6 = 64, and I7 = 128, the process proceeds from step S5120 to step S5160, and in step S5160, I5 = 32. Since I5> 32 is not satisfied (“NO” in S5170), steps S5070 and S5080 are processed, and I0 to I4 = 0, I5 = 32, I6 = 0, and I7 = 0. Accordingly, i = 32 in step S5090, and the uniform density pixel matrix having the density value i = 32 is binarized in step S3110.
[0106]
Next, since I7 = 0, the process returns to step S5090 via steps S5120 and S5130. At this time, I0 to I4 = 0, I5 = 32, I6 = 0, and I7 = 128. Accordingly, i = 160 in step S5090, and the uniform density pixel matrix having the density value i = 160 is binarized in step S3110.
[0107]
Next, steps S5120 to S5150 and S5080 are processed so that I0 to I4 = 0, I5 = 32, I6 = 64, and I7 = 0. Therefore, i = 96 is obtained in step S5090, and the uniform density pixel matrix having the density value i = 96 is binarized in step S3110.
[0108]
Thereafter, 224, 16, 144, 80,..., 127 are sequentially set to the density value i by any one of steps S5020 to S5080 and S5120 to S5260 according to the values of I0 to I7. The binarization and storage of the uniform density pixel matrix of value i is performed, and finally I0 = 1, I1 = 2, I2 = 4, I3 = 8, I4 = 16, I5 = 32, I6 = 64, I7 = 128. At this time, since the density value i = 255 is set in step S5090, “YES” is determined in step S5110, and the process proceeds to step S3150. In this manner, the uniform density pixel matrix can be binarized by following the central value in the calculation.
[0109]
In the second embodiment, binarization processing is performed by following the central integer value. However, even if it is not completely the central integer value, the 1: 2 position, 1: 3 position, 2: 1 Although it is an intermediate value between two binarized density values, such as a position and a 3: 1 position, binarization processing may be performed by following an integer value biased to the small side or the large side.
[0110]
[Others]
In the first to third embodiments, the count value is not directly used as the integration result matrix M1, but may be multiplied by a predetermined coefficient. Also, a different coefficient k (i) is set for each density value i for the binarized value Iixy of the uniform density pixel matrix of density value i as shown in the following formula, and the total value Cxy of all uniform density pixel matrices is set. The accumulation result matrix M1 may be created by obtaining the value.
[0111]
[Expression 15]
Figure 0003709598
[0112]
Note that x and y represent pixel positions on the uniform density pixel matrix or the integration result matrix M1.
The binarization of the uniform density pixel matrix was binarization to ON (“1”) or OFF (“0”), but any value may be binarized. Counting may be performed to form an accumulation result matrix M1, and the accumulation result matrix M1 may be converted into a dither matrix. Further, the total of binarized values may be used instead of the number of counts as described above.
[0113]
In the first to third embodiments, the specific area A for storing the binarized values is the same position in all the uniform density pixel matrices, but may be different depending on the uniform density pixel matrix. This is because the degree of the influence of the error diffusion distortion occurring in the first pixel line L0 portion on the rear side differs depending on the density value i constituting the uniform density pixel matrix.
[0114]
Further, since the degree of influence of error diffusion distortion occurring in the first pixel line L0 portion in the backward direction varies depending on the density value i in this way, error diffusion distortion occurs in binarization of all uniform density pixel matrices. In order to eliminate the influence of the above, the size of the uniform density pixel matrix may be adjusted according to the density value i.
[0115]
In the first to third embodiments, the length of the predetermined region (front edge region BF) in the main scanning direction is three pixels, but this is preferably a length corresponding to the number of columns of the coefficient matrix. . That is, it is preferable to set the length to have an effect of error diffusion.
[0116]
The binarization in the first embodiment is an error diffusion method in which binarization error is distributed from surrounding pixels at the time of binarization, a so-called average error minimum method. When the pixels are binarized, an error diffusion method may be used in which binarization errors are distributed to the density of surrounding pixels that have not yet been binarized.
[0117]
Conversely, the average error minimum method may be employed in the second embodiment. In this case, the coefficient matrices β, β1, β2, β3, β4, β5 have the following contents.
[0118]
[Expression 16]
Figure 0003709598
[0119]
[Expression 17]
Figure 0003709598
[0120]
[Expression 18]
Figure 0003709598
[0121]
[Equation 19]
Figure 0003709598
[0122]
[Expression 20]
Figure 0003709598
[0123]
[Expression 21]
Figure 0003709598
[0124]
The binarization in the third embodiment may be an error diffusion method of receiving a binarization error distribution from surrounding pixels at the time of binarization, that is, a so-called average error minimum method, as in the first embodiment. As in 2, when the pixel of interest is binarized, an error diffusion method based on a method of distributing binarization errors to the density of surrounding pixels that have not yet been binarized may be used.
[Brief description of the drawings]
FIG. 1 is a main block diagram of a dither matrix creating apparatus according to a first embodiment.
FIG. 2 is a flowchart of a dither matrix creation process according to the first embodiment.
FIG. 3 is a flowchart of binarization processing according to the first embodiment.
4 is an explanatory diagram illustrating uniform density value image data according to Embodiment 1. FIG.
FIG. 5 is an explanatory diagram illustrating a relationship between a uniform density value image and a specific region according to the first embodiment;
FIG. 6 is an explanatory diagram showing an enlargement of a specific region and its periphery.
7 is an explanatory diagram showing a state in which uniform density value image data according to the first embodiment is binarized. FIG.
FIG. 8 is an explanatory diagram of an integration result matrix according to the first embodiment.
FIG. 9 is a flowchart of binarization processing according to the second embodiment.
10 is a flowchart of backward binarization processing according to Embodiment 2. FIG.
FIG. 11 is an explanatory diagram showing an enlargement of a specific area and its periphery.
FIG. 12 is a flowchart of a dither matrix creation process according to the third embodiment.
13 is a flowchart showing a part of binarization processing according to Embodiment 3. FIG.
FIG. 14 is an explanatory diagram of an on / off setting state of each pixel position according to the third embodiment.
FIG. 15 is a flowchart illustrating another example of the method for determining the processing order of the uniform density pixel matrix according to the third embodiment.
FIG. 16 is an explanatory diagram showing a conventional example.
[Explanation of symbols]
2 ... Dither matrix creation device 10 ... Input section
11 ... Microcomputer part 12 ... CPU
13 ... Program memory 14 ... Working memory
16 ... Dither matrix storage memory
17 ... Output image memory 18 ... System bus
19 ... Output section

Claims (8)

画素において表すことができる濃度範囲内に設定された所定範囲において離散的に設定された複数の濃度値の各々を、複数の均一濃度画素マトリックスの各々における全画素の濃度値として、前記均一濃度画素マトリックス毎に誤差拡散法にて前記濃度値をオン/オフのいずれかに2値化し、この2値化された均一濃度画素マトリックスの一部の特定領域の濃度値に基づいて、ディザマトリックスにおける各画素の閾値を設定するディザマトリックス作成方法であって、
前記特定領域と前記特定領域以外の外部領域との境界に接する前記特定領域内の縁部領域、または前記境界に接する前記外部領域の縁部領域に対して、前記境界を挟んだ前記2値化処理の連続性を維持する境界処理を行ったことを特徴とするディザマトリックス作成方法。
The uniform density pixel is obtained by setting each of a plurality of density values discretely set in a predetermined range set in a density range that can be expressed in the pixel as a density value of all pixels in each of the plurality of uniform density pixel matrices. For each matrix, the density value is binarized to one of ON / OFF by an error diffusion method, and each dither matrix in the dither matrix is based on the density value of a specific area of a part of the binarized uniform density pixel matrix. A dither matrix creation method for setting pixel thresholds,
The binarization that sandwiches the boundary with respect to an edge region in the specific region that touches a boundary between the specific region and an external region other than the specific region, or an edge region of the external region that touches the boundary A dither matrix creation method characterized by performing boundary processing to maintain continuity of processing.
前記2値化された均一濃度画素マトリックスの一部の特定領域の濃度値を、前記均一濃度画素マトリックスのすべてについて同一位置の画素毎に集積し、この同一位置の画素毎の集積結果に基づいて、ディザマトリックスにおける各画素の閾値を設定することを特徴とする請求項1記載のディザマトリックス作成方法。The density values of a specific region of a part of the binarized uniform density pixel matrix are accumulated for each pixel at the same position for all of the uniform density pixel matrix, and based on the accumulation result for each pixel at the same position. 2. The method of creating a dither matrix according to claim 1, wherein a threshold value of each pixel in the dither matrix is set. 前記特定領域は、前記誤差拡散法の処理が開始された先頭画素ライン部分の集積結果を含めないことを特徴とする請求項1または2記載のディザマトリックス作成方法。3. The dither matrix generating method according to claim 1, wherein the specific region does not include a result of integration of a head pixel line portion where the error diffusion method has been started. 前記特定領域は、前記誤差拡散法の処理が終了する最終画素ライン部分の集積結果を含めることを特徴とする請求項1〜3のいずれか記載のディザマトリックス作成方法。The dither matrix creating method according to claim 1, wherein the specific region includes a result of integration of a final pixel line portion where the error diffusion processing is completed. 前記境界処理は、2値化の主走査方向の処理が前記特定領域から前記外部領域へ横切る境界に接する前記特定領域内の後方縁部領域または前記外部領域の前方縁部領域に対して行われることを特徴とする請求項1〜4のいずれか記載のディザマトリックス作成方法。The boundary processing is performed on the rear edge region in the specific region or the front edge region of the external region where the processing in the main scanning direction of binarization touches the boundary crossing from the specific region to the external region. The dither matrix creating method according to claim 1, wherein the dither matrix is created. 前記境界処理は、前記外部領域の前方縁部領域に、2値化の主走査方向の処理が前記外部領域から前記特定領域へ横切る境界に接する前記特定領域内の前方縁部領域における直前の2値化結果を複写する処理であることを特徴とする請求項5記載のディザマトリックス作成方法。The boundary processing is performed immediately before the front edge region in the specific region, in the front edge region of the external region, in the front edge region in the specific region where the processing in the main scanning direction of binarization touches the boundary crossing from the external region to the specific region. 6. The dither matrix creating method according to claim 5, wherein the dither matrix creating process is a process of copying the value result. 前記2値化処理が、前記境界を挟んで連続する前記特定領域内の後方縁部領域および前記外部領域の前方縁部領域からなる領域については、主走査方向を逆転させることを特徴とする請求項6記載のディザマトリックス作成方法。The binarization process reverses the main scanning direction for a region composed of a rear edge region in the specific region and a front edge region of the external region that are continuous across the boundary. Item 7. The method of creating a dither matrix according to item 6. 前記所定範囲が、前記画素において表すことができる濃度範囲に等しいことを特徴とする請求項1〜7のいずれか記載のディザマトリックス作成方法。The dither matrix creating method according to claim 1, wherein the predetermined range is equal to a density range that can be expressed in the pixel.
JP03676196A 1996-02-23 1996-02-23 Dither matrix creation method Expired - Fee Related JP3709598B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP03676196A JP3709598B2 (en) 1996-02-23 1996-02-23 Dither matrix creation method
US08/803,959 US5953459A (en) 1996-02-23 1997-02-21 Dither matrix producing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03676196A JP3709598B2 (en) 1996-02-23 1996-02-23 Dither matrix creation method

Publications (2)

Publication Number Publication Date
JPH09233328A JPH09233328A (en) 1997-09-05
JP3709598B2 true JP3709598B2 (en) 2005-10-26

Family

ID=12478744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03676196A Expired - Fee Related JP3709598B2 (en) 1996-02-23 1996-02-23 Dither matrix creation method

Country Status (1)

Country Link
JP (1) JP3709598B2 (en)

Also Published As

Publication number Publication date
JPH09233328A (en) 1997-09-05

Similar Documents

Publication Publication Date Title
JP3934442B2 (en) Mask creation method, image processing apparatus, and software program
EP0356225B1 (en) Image processing apparatus
JP5916642B2 (en) Image processing apparatus and method, program, and image forming apparatus
EP0673000B1 (en) Pixel correction and smoothing method
JP3247737B2 (en) Pixel value quantization method in image
EP1267564B1 (en) Method of determining threshold array for generating gradation image
JPH08227147A (en) Dot forming method and device therefor
JPH0530361A (en) Method and device for reproducing intermediate tone picture
JP4645106B2 (en) Image processing apparatus, image output apparatus, and program
JP3709598B2 (en) Dither matrix creation method
Jones Evolution of halftoning technology in the United States patent literature
EP0660257B1 (en) Automatic threshold determination for a digital scanner
JP3554077B2 (en) Image processing device
US6185006B1 (en) Error-distributing image conversion method
US7433083B2 (en) Halftone-image processing device
US6195468B1 (en) Error-distributing image conversion method
US6407825B1 (en) Colorant reduction method for digital images
JPH0276370A (en) Multi-value processing method
JP3740732B2 (en) Dither matrix creation method
JP3711615B2 (en) Dither matrix creation method and image data binarization method
JP3685148B2 (en) Image processing apparatus and method
JP3709599B2 (en) Dither matrix creation method
JP2716447B2 (en) Image processing device
JP3711617B2 (en) Dither matrix creation method
JP3740739B2 (en) Dither matrix creation method

Legal Events

Date Code Title Description
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: 20050719

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050801

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080819

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090819

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100819

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110819

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120819

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120819

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130819

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees