JP3711617B2 - Dither matrix creation method - Google Patents

Dither matrix creation method Download PDF

Info

Publication number
JP3711617B2
JP3711617B2 JP08287096A JP8287096A JP3711617B2 JP 3711617 B2 JP3711617 B2 JP 3711617B2 JP 08287096 A JP08287096 A JP 08287096A JP 8287096 A JP8287096 A JP 8287096A JP 3711617 B2 JP3711617 B2 JP 3711617B2
Authority
JP
Japan
Prior art keywords
matrix
elements
binarization process
ready
dither
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
JP08287096A
Other languages
Japanese (ja)
Other versions
JPH09275493A (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 JP08287096A priority Critical patent/JP3711617B2/en
Priority to US08/803,959 priority patent/US5953459A/en
Publication of JPH09275493A publication Critical patent/JPH09275493A/en
Application granted granted Critical
Publication of JP3711617B2 publication Critical patent/JP3711617B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • 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値化された画像に独特の紋様が発生し易かった。乱数発生型ディザ法は、ディザマトリックスを使用するために2値化処理自体は高速であるが、乱数を用いるため、画質が非常にノイジー、すなわち、多くのノイズが画像に満ちているような画質となると言う問題が有った。
【0006】
ディザマトリックスを用いる他の方法として、組織的ディザ法に属する渦巻型があるが、この渦巻型は、ドットが密集し易く、密集したものが大きなドットと認識されるので解像度が低下し易かった。組織的ディザ法の内で、ベイヤー(Bayer)法があるが、このベイヤー(Bayer)法は、ドットが分散するので解像度は良いが、独特な紋様が発生し、暗部の階調性も悪いものであった。
【0007】
本発明は、ディザ法を用いて画像処理を行っても、画像がノイジーになったり、解像度が低下したりすることが無く、また紋様の発生をも抑制することが可能なディザマトリックスを作成する方法の提供を目的とするものである。
【0008】
【課題を解決するための手段及び発明の効果】
本発明のディザマトリックス作成方法は、予め、各要素がオンあるいはオフに2値化された複数の既成マトリックスを含む既成マトリックス群から、オンの要素とオフの要素との分布が異なる2つの既成マトリックスを選択し、これら2つの既成マトリックスの内の一方の既成マトリックスに存在する要素Xijと、それと同一位置に存在する他方の既成マトリックスの要素Yijとを参照して所定の条件に基づいて、それらの要素Xij,Yijと同一位置に存在する新しいマトリックスの要素Zijのオン/オフを決定する参照2値化処理を行い、次いで、前記参照2値化処理にてオン/オフが決定されなかった前記新しいマトリックスの要素Zijについて、同一の値の分布が偏らないようにオンあるいはオフに設定する残余2値化処理を行って、上記2つの処理により各要素Zijがオンあるいはオフに2値化された新しいマトリックスを前記既成マトリックス群に含めながら、前記参照2値化処理と前記残余2値化処理とを繰り返すことにより、所定数の既成マトリックスからなる既成マトリックス群を構築し、この構築された既成マトリックス群に基づいて、ディザマトリックスにおける各要素の閾値を設定することを特徴とする。
【0009】
前記参照2値化処理では、新しいマトリックスが独立に形成されるのではなく、既に2値化されている既成マトリックスにおける2値化状態が反映される。
この反映により、単に各マトリックスを独立に2値化している場合に比較して、上述のように形成された既成マトリックス群の2値化値に基づいてディザマトリックスにおける各要素の閾値を設定すると、ディザマトリックスの各要素における閾値が特定の値に偏ることが無く、ランダムともならずに、更に各種の値に適度に分散化して分布するものとなるので、形成されるディザマトリックスにて画像を処理しても解像度は低下せず、ノイジー性は抑制される。
【0010】
また、残余2値化処理では、前記参照2値化処理にてはオン/オフが決定されなかった前記新しいマトリックスの要素Zijについて、同一の値の分布が偏らないようにオンあるいはオフに設定している。このため形成されるディザマトリックスにて画像を処理しても解像度は低下せず、組織的紋様は抑制され、またランダムでもないのでノイジーともならない。
【0011】
したがって、本発明によれば、処理が高速なディザ法を用いて画像処理を行っても、ノイジーとならず、解像度が低下せず、紋様の発生を抑制するディザマトリックスを作成することができる。
尚、残余2値化処理としては、前記残余2値化処理が、前記参照2値化処理にてオン/オフが決定されなかった前記新しいマトリックスの要素Zijについて、所定位置から最も近い位置に存在するものから順に、オン/オフを交互に設定して行くことにより行うことができる。この最も近い位置というのは、例えば、所定位置から予め定めた螺旋状にたどって行く方向に存在する最も近い位置であっても良いし、全方向において直線距離として最も近い位置であっても良い。
【0012】
また、残余2値化処理として、オン/オフが決定されなかった要素Zijが所定数より多いときは、前記新しいマトリックスの所定位置から螺旋状にたどりながら、最も近い位置に存在する要素Zijから順にオン/オフを交互に設定し、要素Zijが所定数より少なくなると、全方向において直線距離として最も近い位置に存在する要素Zijから順にオン/オフを交互に設定して行くこととしても良い。これは、オン/オフが決定されなかった要素Zijが多い場合は、全方向における最も近い位置に存在する要素Zijを探索するよりも、方向を決めて、例えば螺旋状に方向を決めて最も近い位置に存在する要素Zijから順に探索した方が処理が迅速であるからであり、オン/オフが未決定の要素Zijが少なくなると、逆に特定方向に存在するオン/オフが未決定の要素Zijを探索するよりも全方向、すなわち新しいマトリックス全体についてオン/オフが未決定の要素Zijをリストアップして近い方から順番にオン/オフを決定した方が迅速だからである。
【0013】
新しいマトリックスに対して参照される既成マトリックスは、次のように関係付けられていても良い。
すなわち、既成マトリックス群には、全要素がオフの既成マトリックスA、全要素がオンの既成マトリックスC、およびオンの要素とオフの要素とが存在している既成マトリックスBがABCまたはこの逆順に順番付けられて存在し、
前記順番上で隣接する2つの既成マトリックスを選択して、参照2値化処理における参照対象とするとともに、参照2値化処理および残余2値化処理により各要素Zijがオンあるいはオフに2値化された新しいマトリックスを既成マトリックス群に含める際に、新しいマトリックスが参照対象とした2つの既成マトリックスの間に順番付けることとしても良い。
【0014】
このように既成マトリックスを順番付けし、順番上で隣接する既成マトリックスを参照して新しいマトリックスを2値化し、更に残余2値化処理にて全ての位置を2値化した後に、この新しく形成されたマトリックスを、参照した隣接する2つの既成マトリックスの間に順番付けして、既成マトリックス群に含めている。
【0015】
このため、一層、ディザマトリックスの各位置における閾値が特定の値に偏ることが無く、各種の値に適度に分散化して分布するものとなるり、形成されるディザマトリックスにて画像を処理しても解像度は低下せず、ノイジー性は抑制される効果が向上する。
【0016】
尚、既成マトリックスBは、オンの要素が全要素のほぼ半分であることが、解像度の低下防止、ノイジー性の抑制上、より好ましい。更に、既成マトリックスBが、全ての要素が同一の多値(例えば「128」または「127」)からなるマトリックスを誤差拡散処理して、各要素をオンあるいはオフに2値化して形成されていると、より好ましい。前記「128」または「127」を全要素の値とするマトリックスを使用した場合には、最終的に得られるディザマトリックスは、256階調の画像の処理に用いるのに好適である。
【0017】
ここで、誤差拡散を用いるのは、誤差拡散法により生じる2値の並びは、一見不規則に見えるけれども、まったくのでたらめではない。すなわち、強い紋様はできにくいがノイジーな画像にはなりにくい性質がある。このように誤差拡散法により生じる2値の並びを利用することにより、最終的にディザマトリックスにも誤差拡散法における2値の並びの性質がある程度取り込まれる。したがって、人間の目に対してノイジーとならず、かつ解像度が低下せず、更に、前述したごとく直接誤差拡散法によらずに新しいマトリックスの生成を繰り返してディザマトリックスに反映しているので、紋様の発生を抑制した2値化画像を生成できる性質を強めることができたものと考えられる。
【0018】
勿論、既成マトリックスBは、ランダムに形成しても良い。この場合は、ノイジー性が懸念されるが、この場合も直接ランダムとされない新しいマトリックスの生成を繰り返してディザマトリックスに反映しているので、ノイジー性を薄めることができ、従来よりも改善されたものとなる。
【0019】
参照2値化処理と残余2値化処理との繰り返しにより形成される既成マトリックス群としては、例えば、256個の既成マトリックスからなるものが挙げられる。このように256個の既成マトリックスから得られるディザマトリックスは、256階調の画像処理に使用して好適である。
【0020】
尚、参照2値化処理における所定の条件に基づく2値化処理としては、選択された前記2つの既成マトリックスにて、両既成マトリックスの要素が共にオンである場合には、それらの要素と同一位置に存在する前記新しいマトリックスの要素もオンとし、両既成マトリックスの要素が共にオフである場合には、それら要素と同一位置に存在する前記新しいマトリックスの要素もオフとして2値化する方法が挙げられる。
【0021】
【発明の実施の形態】
[実施の形態1]
図1は、ディザマトリックス作成装置2の主要ブロック図である。
このディザマトリックス作成装置2の主体を成すマイクロコンピュータ部11はCPU12、ROMからなるプログラムメモリ13、RAMからなるワーキングメモリ14、RAMからなるディザマトリックス格納メモリ16およびRAMからなる出力イメージメモリ17により構成されている。また、マイクロコンピュータ部11にはシステムバス18を介して入力部10および出力部19が接続されている。
【0022】
入力部10は、キーボードや外部の記憶装置から入力するためのインターフェースを備え、ディザマトリックス作成に必要なデータや指示の入力を行うものである。また、入力部10は、作成されたディザマトリックスの効果を確認するために、各画素が8ビットで表される階調を有する画像データを入力する。
【0023】
CPU12は、後述するごとくディザマトリックスの作成をプログラムにしたがって実行するためのものであり、プログラムメモリ13は、ディザマトリックス作成プログラムを含め、CPU12で行う様々な制御を実施するためのプログラムを記憶している。また、ワーキングメモリ14は、CPU12がプログラムメモリ13に記憶されたプログラムを実行するときに必要なデータを一時的に記憶するものである。
【0024】
ディザマトリックス格納メモリ16は、CPU12の処理によって形成されたディザマトリックスデータを記憶する。
出力イメージメモリ17は、CPU12が、ディザマトリックス格納メモリ16に格納されているディザマトリックスを用いて、8ビットで表される階調を有する画像データを2値化した、その2値化された出力イメージデータを記憶する。
【0025】
出力部19は、出力イメージメモリ17に格納した2値化画像データを電子写真方式によりドットの有無で印字する装置である。
次に、ディザマトリックス作成装置2により実行されるディザマトリックス作成処理について説明する。ディザマトリックス作成処理のフローチャートを図2以下に示す。尚、本実施の形態では1画素が256階調で表される画像の処理に用いられるディザマトリックスを作成している。
【0026】
まず、全要素の濃度値がそれぞれ「0」,「128」,「255」である3つの均一濃度画素マトリックスを誤差拡散法により2値化する(S100)。この均一濃度画素マトリックスは、図7に示すごとく、濃度値が0,128,255の3種類の均一濃度画素マトリックスM0,M128,M255をワーキングメモリ14に読み込んで用いれば良い。そして、その2値化後の既成マトリックスF0,F128,F255(図8)を、それぞれ「0」、「128」、「255」の順番番号を付けて昇順または降順で順序付けし、ワーキングメモリ14に保存する(S200)。
【0027】
ただし、ステップS100にて行われる濃度値「0」,「128」,「255」の均一濃度画素マトリックスの誤差拡散法による2値化結果は、均一濃度画素マトリックスM0(全要素が濃度値「0」)の場合は全要素「0」(オフ)に2値化され、均一濃度画素マトリックスM255(全要素が濃度値「255」)の場合は全要素「1」(オン)と2値化されるので、特に誤差拡散法による計算はせずに、予め全要素がオフ「0」の既成マトリックスF0と全要素がオン「1」の既成マトリックスF255とを備えておいて、これらの既成マトリックスを用いても良い。また、濃度値「128」の場合は、ステップS100にて計算しなくても、既に誤差拡散法により求められている既成マトリックスF128を用いても良い。
【0028】
次に、新しく2値化するマトリックスの作成順序を決定するために、1〜127,129〜254の各順番番号について配列の作成を行う(S300)。この順番番号の配列は、既に2値化処理された順番番号の中央の数値に該当する順番番号が、作成対象として設定されるように作成される。
【0029】
すなわち、配列の先頭は「0」と「128」との中央の「64」、次が「128」と「255」との中央の「192」(もう一つの中央の整数値の「191」でも良い。)、次が「0」と「64」との中央の「32」、次が「64」と「128」との中央の「96」、次が「128」と「192」との中央の「160」、次が「192」と「255」との中央の「224」(もう一つの中央の整数値の「223」でも良い。)と言うように、前に得られている順番番号の中央の整数値を求めて、「1」〜「127」,「129」〜「254」の順番番号の配列「64,192,32,96,160,224,……」を作成する。この配列は予め計算して配列データとして記憶しておき、本処理時に配列データのみ読み込んで用いても良い。
【0030】
次にその配列の先頭から順次、一つづつ順番番号iに読み込んで(S400)、参照2値化処理(S500)の処理を行う。
ステップS500の参照2値化処理の詳細を図3のフローチャートに示す。
まず、ステップS400により、配列の最初の順番番号「64」のマトリックスを作成対象とされているので、全ての要素がオン/オフに2値化済みである既成マトリックスの順番番号の内で隣接していて、「64」に対して順番としては後に属する最近後方既成マトリックスHと、「64」に対して順番としては前に属する最近前方既成マトリックスLとをワーキングメモリ14の内容から選択する(S510)。
【0031】
配列の最初の順番番号i=64の場合は、既にステップS100にて2値化されている順番番号=128の既成マトリックスF128が最近後方既成マトリックスHに該当し、順番番号=0の既成マトリックスF0が最近前方既成マトリックスLに該当する。
【0032】
次に、順番番号「64」の新しいマトリックスFi(i=64)の要素を得るため、最初の要素を指定する(S520)。ここでは、図8に示すごとくマトリックスの左上隅を原点(0,0)とし、x方向を主走査方向とし、y方向を副走査方向としているので、まず原点(0,0)が最初の要素として設定される。
【0033】
次に、ステップS510にて検索した最近後方既成マトリックスHにおける同一位置の要素H(x,y)および最近前方既成マトリックスLにおける同一位置の要素L(x,y)の値が同一か否かが判定される(S530)。
同一であれば(ステップS530で「YES」)、新しいマトリックスFiの同一位置の要素Fi(x,y)に要素L(x,y)の値が設定される(S540)。すなわち、ステップS510にて選択された順番上で隣接する2つの既成マトリックスH,Lにおいて、両既成マトリックスH,L共にオン「1」である要素は、新しいマトリックスFiの同一位置もオン「1」とし、両既成マトリックスH,L共にオフ「0」である要素は、新しいマトリックスFiの同一位置もオフ「0」として2値化する。このとき、要素Fi(x,y)に設定するのは、最近後方既成マトリックスHにおける同一位置の要素H(x,y)の内容でも良い。
【0034】
要素H(x,y)=要素L(x,y)でなければ(ステップS530で「NO」)、新しいマトリックスFiの同一位置の要素Fi(x,y)には未2値化であることを示す「−1」が設定される(S550)。
次に、マトリックスFiの全ての要素に関してステップS530,S540,S550の処理が終了したか否かが判定される(S560)。
【0035】
終了していなければ(ステップS560で「NO」)、走査方向に応じて次の要素(x,y)が設定されて(S570)、再度、ステップS530,S540,S550の処理がなされる。すなわち、ステップS570が処理される毎に、主走査方向(x方向)へ順次移動し、主走査方向の処理が終了すれば、次には、副走査方向(y方向)の次の要素ラインに移動してx=0から主走査方向へ順次移動して行くように要素(x,y)が指定されて、ステップS530,S540,S550の処理がなされる。
【0036】
全ての要素に関して処理が終了すれば(S560で「YES」)、ステップS500の処理を終了して、図4に示すごとく、残余2値化処理(S600)が実行され、ステップS500では2値化されなかった、すなわちオン/オフが決定されていない未2値化位置として「−1」が設定されている要素について別の方法での2値化が行われる。
【0037】
残余2値化処理(S600)では、まず変数Iに「1」が設定される(S610)。次にマトリックスFiの中心に最も近い未2値化要素Fi(x,y)を選択する(S620)。次にこの未2値化要素Fi(x,y)から最も近い未2値化要素Fi(xn,yn)を探索する(S630)。
【0038】
次に未2値化要素が1つも存在していないか否かが判定され(S640)、ステップS630の探索の結果、未2値化要素が1つも存在していない場合には(ステップS640で「YES」)、このままステップS600の処理を終了するが、最も近い未2値化要素Fi(xn,yn)が見つかった場合には(ステップS640で「NO」)、その未2値化要素Fi(xn,yn)に変数Iの値が設定される(S650)。
【0039】
次に変数I=オン「1」か否かが判定され(S660)、I=1であれば(ステップS660で「YES」)、変数Iにオフ「0」が設定され(S670)、I=0であれば(ステップS660で「NO」)、変数Iにオン「1」が設定される(S680)。
【0040】
次に今回2値化されたFi(xn,yn)の要素が、Fi(x,y)として設定され(S690)、ステップS630の処理から開始される。したがって、次に直前に2値化された要素Fi(x,y)に最も近い未2値化要素Fi(xn,yn)が探索されて、未2値化要素が存在すれば、その要素に変数Iの値が設定される。変数Iの値は、未2値化要素に変数Iの値が設定される毎に、オン「1」とオフ「0」とを交互に切り替えているので、未2値化要素には、「1」,「0」,「1」,…と交互にオン/オフが設定されて行く。
【0041】
ここで、最も近い未2値化要素を探索する方法について説明する。
例えば、参照2値化処理(S500)を終えたマトリックスのサイズが図5(a)に太線で囲まれているごとく4×4であるとして、その中で斜線のハッチングのある要素が参照2値化処理(S500)にて、2値化された要素であるとする。未2値化要素はA,B,C,D,Eの5つである。
【0042】
最初に最もマトリックスの中心Qに近い未2値化要素が選択される(S620)。図5(a)の例では、中心Qに接触する要素Bおよび要素Cの2つであるが、図6のごとく中心Qから3時の方向が最も優先度が高く(優先度0)、3時の方向から時計回りに周るほど方向の優先順位が低くなるように優先順位が設定されているとすると、要素Bはマトリックスの中心Qから優先度5の方向に存在し、要素Cはマトリックスの中心Qから優先度1の方向に存在するので、最もマトリックスの中心Qに近い未2値化要素として、要素Cが抽出される。
【0043】
尚、近さを求めるための距離計算は、次式1のごとく実際の距離Dを求めても良いし、次式2のごとく簡便法で求めた値を擬似的な距離dとして用いても良い。
【0044】
【数1】

Figure 0003711617
【0045】
ここで、Δxは2点間のx座標の差、Δyは2点間のy座標の差である。
次に、式1または式2の計算で要素Cに最も近い他の未2値化要素を探索する(S630)。図5(a)の場合は、要素B,Eの2要素が該当する。
この場合も2つの要素が存在するので、図6に示した優先度を適用して、要素Eが得られる。したがって、この未2値化要素である要素Eにオン「1」が設定され(S650)、要素Eは2値化済みの要素となる。
【0046】
次に、ステップS630で要素Eに最も近い未2値化要素が探索されるが、ここでは、要素Dが得られる。一つのマトリックス上では要素Eと要素Dとは大きく離れているが、最終的に形成されるディザマトリックスは、図5(a)〜(f)に示しているように、ディザマトリックスを縦横に配列して画像処理を行うため、ステップS630における最も近い未2値化要素の判断も、マトリックスを縦横に配置した状態で判断するのが好ましい。
【0047】
したがって、図5(b)に示すごとく、右側に隣接するマトリックスの要素Dが最も近いので、図5(c)に示すごとく、要素Dが抽出され、要素Dにはオフ「0」が設定される(S650)。
次に、同様に要素Dに最も近い未2値化要素が探索され(S630)、3つの要素A,B,Cが最も近いが、優先度で判断して、図5(d)に示すごとく、要素Aが選択される。したがって、要素Aにはオン「1」が設定される(S650)。
【0048】
次に、同様に要素Aに最も近い未2値化要素が探索され(S630)、要素Bが最も近いので、図5(e)に示すごとく、要素Bが選択される。したがって、要素Bにはオフ「0」が設定される(S650)。そして図5(f)に示すごとく、最後に残った要素Cにオン「1」が設定され(S650)、残余2値化処理(S600)を終了する。
【0049】
尚、最初にステップS620にて選択された最もマトリックスの中心Qに近い未2値化要素については、その選択された際には2値化せずに、その後のステップS630の探索で見つけて2値化している。これは、ステップS620にてマトリックスの中心Qに最も近い未2値化要素を、例えばオン「1」に設定してしまうと、中心Q付近にオン「1」が集中する確率が高まるので、2値の分散上好ましくないからである。勿論、新しく作成されるマトリックス毎に、ステップS610にて最初にIに設定する値を、オン「1」,オフ「0」,オン「1」,オフ「0」,…と交互に切り換えれば、あるいはランダムに切り換えればステップS620にて、中心Qに最も近い未2値化要素を2値化しても良い。
【0050】
このようにして、マトリックスの全要素が2値化され、この内容が参照2値化処理(S500)にて参照した最近後方既成マトリックスH(順番番号128)と最近前方既成マトリックスL(順番番号0)との間に順番付けされて既成マトリックスFi(このときはi=64)としてワーキングメモリ14に保存する(S700)。この場合は、既に順番番号が付されて順番付けされているので、そのままワーキングメモリ14に保存するのみでも良い。
【0051】
したがって、この時には、ワーキングメモリ14内には、順番番号0,64,128,255の4つの既成マトリックスからなる既成マトリックス群が形成されていることになる。
次に配列が終了したか否かを判定し(S800)、終了していなければ(S800で「NO」)、配列中の次の順番番号を順番番号iに設定し(S400)、この順番番号iに基づいて、ステップS500の参照2値化処理、ステップS600の残余2値化処理およびステップS700の最近後方既成マトリックスHと最近前方既成マトリックスLとの間に順番付けして保存する処理を繰り返す。すなわち、i=64の次は、i=192が設定され、最近後方既成マトリックスHとして順番番号255の既成マトリックスが、最近前方既成マトリックスLとして順番番号128の既成マトリックスが選択されて、上述した処理ステップS500,S600,S700が行われる。その結果、ワーキングメモリ14内には、順番番号0,64,128,192,255の5つの既成マトリックスからなる既成マトリックス群が形成されることになる。
【0052】
続いてi=32,96,160,224,……について順次処理が行われ、i=32には最近後方既成マトリックスHとして順番番号64の既成マトリックスが、最近前方既成マトリックスLとして順番番号0の既成マトリックスが選択され、ワーキングメモリ14内には、順番番号0,32,64,128,192,255の6つの既成マトリックスからなる既成マトリックス群が形成される。
【0053】
次のi=96には最近後方既成マトリックスHとして順番番号128の既成マトリックスが、最近前方既成マトリックスLとして順番番号64の既成マトリックスが選択され、ワーキングメモリ14内には、順番番号0,32,64,96,128,192,255の7つの既成マトリックスからなる既成マトリックス群が形成される。
【0054】
次のi=160には最近後方既成マトリックスHとして順番番号192の既成マトリックスが、最近前方既成マトリックスLとして順番番号128の既成マトリックスが選択され、ワーキングメモリ14内には、順番番号0,32,64,96,128,160,192,255の8つの既成マトリックスからなる既成マトリックス群が形成される。
【0055】
次のi=224には最近後方既成マトリックスHとして順番番号255の既成マトリックスが、最近前方既成マトリックスLとして順番番号192の既成マトリックスが選択され、ワーキングメモリ14内には、順番番号0,32,64,96,128,160,192,224,255の9つの既成マトリックスからなる既成マトリックス群が形成される。
【0056】
以後、同様に配列にしたがって、順番番号iが設定されて、上述した処理がなされ、既成マトリックス群内の既成マトリックスが増加して行く。
配列の最後の順番番号について、該当するマトリックスの処理(S500,S600,S700)が終了する(S800で「YES」)と図9に示すごとく、ワーキングメモリ14内には、順番番号i=0〜255の256個の既成マトリックスF0〜F255が形成されている。
【0057】
次に、こうして得られた既成マトリックス群内の全ての既成マトリックスF0〜F255について、それぞれ同一位置の要素の内、オンに2値化されている数をカウントし、このカウント値を要素とする集積結果マトリックスWを形成する(S900)。
【0058】
すなわち、図9に示すごとく、左上隅を原点(0,0)として横方向をx軸、縦方向をy軸とすると、まず、全ての既成マトリックスF0〜F255の(0,0)について、オンとなった要素をカウントする。そのカウント結果を、図10に示すごとくワーキングメモリ14内に用意された集積結果マトリックスWの同一位置の要素(0,0)に格納する。この同一位置の要素のカウント処理を各要素毎に行い、集積結果マトリックスWをすべて埋める。このカウント処理は、各要素がオンの場合は「1」に、オフの場合は「0」に2値化されているので、同一位置の要素における数値を合計して求めても良い。
【0059】
次に、集積結果マトリックスWのカウント値の低い要素から、順にディザマトリックス用の閾値を設定し(S950)、その閾値からなるマトリックスをディザマトリックスとして、ディザマトリックス格納メモリ16に保存する(S960)。
【0060】
この閾値の設定の方法としては、カウント値そのものを閾値として設定しても良い。この場合はステップS900のカウント処理がディザマトリックスの閾値設定の処理に該当するので、ステップS950では特に処理は行わない。そして、集積結果マトリックスWそのものをディザマトリックスとして、ディザマトリックス格納メモリ16に保存する(S960)。
【0061】
ステップS950にては、単に集積結果マトリックスWの各カウント値自体をそのまま閾値とする代りに、予め用意されたカウント値と閾値とのテーブルに応じて、集積結果マトリックスWの各カウント値を閾値に変換しても良い。
また、ステップS950にては、カウント値の低い順番から、閾値を「0,1,2,…」と設定して行っても良いし、逆にカウント値の高い順番から、閾値を「255,254,253,…」と設定して行っても良い。この場合、同一のカウント値が2つ以上存在する場合は、それらはすべて同一の閾値が与えられるものとしても良いし、同一のカウント値を予め定めた方法で順番付けして、その順位に基づいて異なる閾値を設定しても良い。予め定めた方法の具体例としては、周囲のカウント値を合計し、合計して得られたカウント値に基づいて順位付けしたり、ディザマトリックス(W)における位置情報(例えば、中心Qに近いもの)に基づくものであっても良い。
【0062】
このようにして形成されたディザマトリックスを用いて、中間調のカラー画像を2値化処理し、カラープリンタにて記録したところ、人間の目に対してノイジーとならず、かつ解像度が低下せず、紋様の発生が抑制された疑似中間調の2値化画像を生成することができた。勿論、画像の処理時はディザ法であり、誤差拡散法のように多数の計算は行わないので、迅速に処理できた。
【0063】
更に、本実施の形態では、ステップS500における2値化において、ステップS530,S540,S550にて、既に2値化され順番付け上で隣接する既成マトリックスの2値化状態を考慮して2値を決定している。
もし、ステップS530,S540,S550を用いないで、誤差拡散法やステップS600の残余2値化処理で2値化を行うと、図11(b)に示すごとく、オンとなった後も同じ位置の要素でオフが出現する。このため、通常の2値化のみでは各要素におけるオンの数が、0〜255内の特定の値に偏る傾向が有るが、本実施の形態では、順番番号の小さい既成マトリックスから見て、最初にオン「1」となった要素は、以後順番番号が大きくなっても、オン「1」が継続するようにすることができるので、0〜255の範囲の各種の値に分散して好適な分布となる。
【0064】
したがって、このようにして得られるディザマトリックスは、閾値の値も0〜255の範囲に適度に分散して分布するものとなる。このため、特に、図11(b)に示したごとくの各既成マトリックスを独立に2値を決定している場合に得られるディザマトリックスに比較して、画像データの2値化において、一層、解像度が向上し、紋様の抑制が行われる。
【0065】
尚、本実施の形態では、図11(a)で説明したごとく、順番番号の小さい既成マトリックスから見て、最初にオン「1」となった要素は、以後順番番号が大きくなっても、オン「1」が継続することから、最初にオン「1」となる既成マトリックスの順番番号を、最初にオン「1」となった位置と同じ位置の要素の閾値としてディザマトリックスを形成しても良い。
【0066】
[実施の形態2]
実施の形態2として、中央の順番番号iを計算で求める例を図12に示す。この処理は、図2におけるステップS300〜S800の代りに実行される。本処理において、最初は8つの変数I0 〜I7 を「0」で初期化し(S1010〜S1080)、次にI0 〜I7 までを合計して、順番番号iに設定する(S1090)。この順番番号iが「0」であれば、I7 を「128」増加させ(S1120)、次にI7 >128ではないので(S1130で「NO」)、ステップS1090の合計処理で順番番号iに「128」が設定され、i=0でなく(S1100で「NO」)、i=255でもないので(S1110で「NO」)、ステップS500,S600,S700の処理(図2の処理と同じ)がなされる。
【0067】
次にステップS1120の処理にてI7 =256となり、ステップS1130にて「YES」と判定されて、I6 が「64」増加され(S1140)、I6 =64となり、I6 >64ではないので(S1150で「NO」)、ステップS1080にてI7 =0に初期化され、ステップS1090ではi=64となる。したがって、ステップS1100,S1110からステップS500,S600,S700に移って、順番番号i=64のマトリックスについて作成処理がなされる。
次に、ステップS1120にてI7 =128となり、ステップS1130にて「NO」と判定されて、ステップS1090では、I0 〜I5 =0、I6 =64、I7 =128であることから、i=192となり、ステップS1100,S1110の後、ステップS500,S600,S700で順番番号i=192のマトリックスについて2値化がなされる。
【0068】
次にI0 〜I5 =0、I6 =64、I7 =128であることから、ステップS1120からステップS1160まで進み、ステップS1160でI5 =32となる。I5 >32ではないので(S1170で「NO」)、ステップS1070,S1080が処理されて、I0 〜I4 =0、I5 =32、I6 =0、I7 =0となる。したがって、ステップS1090ではi=32となり、ステップS500,S600,S700では順番番号i=32のマトリックスが2値化される。
【0069】
次にI7 =0となったので、ステップS1120,S1130を経て、ステップS1090に戻る。このとき、I0 〜I4 =0、I5 =32、I6 =0、I7 =128となる。したがって、ステップS1090ではi=160となり、ステップS500,S600,S700では順番番号i=160のマトリックスが2値化される。
【0070】
次に、ステップS1120〜S1150,S1080が処理されて、I0 〜I4 =0、I5 =32、I6 =64、I7 =0となる。したがって、ステップS1090ではi=96となり、ステップS500,S600,S700では順番番号i=96のマトリックスが2値化される。
【0071】
以後、I0 〜I7 の値に応じて、ステップS1020〜S1080,S1120〜S1260のいずれかの処理により、順次、順番番号iに、224、16,144,80,…,127が設定されて、順番番号iのマトリックスの2値化と保存が行われ、最後に、I0 =1、I1 =2、I2 =4、I3 =8、I4 =16、I5 =32、I6 =64、I7 =128となる。このとき、ステップS1090にて順番番号i=255が設定されるので、ステップS1110にて「YES」と判定されて、ステップS700の処理に移る。このようにして、計算にても中央の値をたどって、マトリックスの2値化を行うことができる。
【0072】
[その他]
前記各実施の形態では、順番番号として中央の整数値をたどって2値化処理したが、完全に中央の整数値でなくても、1:2の位置、1:3の位置、2:1の位置、3:1の位置といったように、2値化済みの2つの順番番号の中間の値ではあるが、小側あるいは大側に偏った整数値をたどって2値化処理しても良い。
【0073】
前記各実施の形態において、前記カウント値をそのまま集積結果マトリックスWとして用いるのではなく、所定の係数をかけても良い。また、順番番号iの既成マトリックスの2値化値Iixy に対して次式のごとく順番番号i毎に異なる係数k(i) を設定して、全ての既成マトリックスの合計値Cxyを求めることにより、集積結果マトリックスWを作成しても良い。
【0074】
【数2】
Figure 0003711617
【0075】
尚、ここで、x,yはマトリックス上の位置を表す。
マトリックスの2値化は、オン「1」またはオフ「0」への2値化であったが、いかなる値の2値化でも良く、いずれか一方の値の個数をカウントして、集積結果マトリックスWを形成し、この集積結果マトリックスWをディザマトリックスに変換すれば良い。また、上述したような個数のカウントではなく、2値化値の合計であっても良い。
【0076】
前記各実施の形態における均一濃度値「128」の均一濃度画素マトリックスの2値化は、2値化時に周辺要素から2値化誤差の分配を受けるタイプの誤差拡散法、いわゆる平均誤差最小法であったが、注目要素を2値化した場合に2値化の誤差を未だ2値化していない周辺の要素の濃度に分配する方法による誤差拡散法であっても良い。
【0077】
前記既成マトリックスF128は均一濃度値「128」の均一濃度画素マトリックスを誤差拡散処理にて得ていたが、必要なのは、既成マトリックスF0と既成マトリックスF255との中央の状態、すなわちオン/オフがほぼ1:1にて存在している既成マトリックスF128であることから、例えば、ランダムにオン/オフをほぼ1:1に出力して既成マトリックスF128を形成しても良いし、前述した残余2値化処理と同様に処理して既成マトリックスF128を形成しても良いし、あるいは単純にオン/オフを市松模様のごとく決定して既成マトリックスF128としても良い。また、均一濃度値「128」の代りに「127」を用いても良い。
【0078】
前記ステップS600の残余2値化処理では、未2値化要素Fi(x,y)から全方向において直線距離として最も近い未2値化要素Fi(xn,yn)を探索して、近い方からオン「1」,オフ「0」,…と設定していた。これ以外に、未2値化要素Fi(x,y)を探索する方法としては、前記所定要素から螺旋状にたどって行く方向に存在する最も近い要素であっても良い。すなわち、探索する方向を常に、マトリックスの中心Qを時計回りあるいは反時計回りに設定しておいて、常にマトリックスの中心Qから螺旋状に外側へ探索して近い方からオン「1」,オフ「0」,…と設定して行っても良い。また、これ以外の方法でも良く、同一の値の分布が偏らないようにオンあるいはオフに設定して行けば良い。
【図面の簡単な説明】
【図1】 実施の形態1のディザマトリックス作成装置の主要ブロック図である。
【図2】 実施の形態1のディザマトリックス作成処理のフローチャートである。
【図3】 実施の形態1の参照2値化処理のフローチャートである。
【図4】 実施の形態1の残余2値化処理のフローチャートである。
【図5】 実施の形態1の残余2値化処理の2値化順序を示す説明図である。
【図6】 実施の形態1の残余2値化処理の2値化順序の優先度を示す説明図である。
【図7】 実施の形態1の均一濃度画素マトリックスの説明図である。
【図8】 実施の形態1の均一濃度画素マトリックスを2値化して得られた既成マトリックスの説明図である。
【図9】 実施の形態1の既成マトリックスの説明図である。
【図10】 実施の形態1の集積結果マトリックスの説明図である。
【図11】 実施の形態1の各既成マトリックスのオン/オフ設定状態の説明図である。
【図12】 実施の形態2の2値化マトリックスの処理順序を決定する方法を示すフローチャートである。
【符号の説明】
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.
In the error diffusion method, binarization processing is slow due to error diffusion or error distribution calculation, and a unique pattern is easily generated in the binarized image. The random number generation type dither method uses a dither matrix, so the binarization process itself is fast. However, since the random number is used, the image quality is very noisy, that is, the image quality is such that a lot of noise fills the image. There was a problem to say.
[0006]
As another method using a dither matrix, there is a spiral type belonging to the systematic dither method. However, this spiral type has a tendency to reduce the resolution because the dots are likely to be dense and the dense ones are recognized as large dots. 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]
The present invention creates a dither matrix capable of suppressing generation of a pattern without causing an image to become noisy or a decrease in resolution even when image processing is performed using a dither method. The purpose is to provide a method.
[0008]
[Means for Solving the Problems and Effects of the Invention]
The dither matrix creation method according to the present invention includes two pre-built matrices having different on-element and off-element distributions from a pre-made matrix group including a plurality of pre-formed matrices in which each element is binarized on or off. And the element Xij existing in one of the two existing matrices and the element Yij of the other existing matrix existing in the same position are referred to, based on a predetermined condition, Reference binarization processing is performed to determine on / off of the element Zij of the new matrix existing at the same position as the elements Xij, Yij, and then the new on / off is not determined in the reference binarization processing. For the element Zij of the matrix, a residual binarization process is performed to set on or off so that the distribution of the same value is not biased. By repeating the reference binarization process and the residual binarization process while including a new matrix in which each element Zij is binarized on or off by one process in the existing matrix group, a predetermined number of existing matrixes are obtained. A pre-built matrix group composed of matrices is constructed, and a threshold value of each element in the dither matrix is set based on the built pre-formed matrix group.
[0009]
In the reference binarization process, a new matrix is not formed independently, but a binarized state in an already-formed matrix is reflected.
As a result of this reflection, when the threshold values of the elements in the dither matrix are set based on the binarized values of the ready-made matrix group formed as described above, compared to the case where each matrix is binarized independently, The threshold value in each element of the dither matrix is not biased to a specific value, and it is not random, but it is distributed in a variety of values that are appropriately dispersed, so the image is processed with the dither matrix that is formed. Even so, the resolution is not lowered, and noisiness is suppressed.
[0010]
In the residual binarization process, the new matrix elements Zij that are not determined to be on / off in the reference binarization process are set to on or off so that the distribution of the same value is not biased. ing. For this reason, even if the image is processed with the formed dither matrix, the resolution is not lowered, the systematic pattern is suppressed, and it is not random, so it is not noisy.
[0011]
Therefore, according to the present invention, it is possible to create a dither matrix that does not become noisy even when image processing is performed using a high-speed dither method, does not reduce resolution, and suppresses the generation of patterns.
As the residual binarization process, the residual binarization process exists at a position closest to a predetermined position with respect to the element Zij of the new matrix whose on / off was not determined in the reference binarization process. This can be done by alternately setting on / off in order from the one to be performed. The closest position may be, for example, the closest position that exists in a direction following a predetermined spiral from a predetermined position, or may be the closest position as a linear distance in all directions. .
[0012]
Further, as the residual binarization process, when the number of elements Zij for which on / off has not been determined is greater than a predetermined number, the spiral is traced from the predetermined position of the new matrix, and the elements Zij existing at the closest position are sequentially When ON / OFF is alternately set and the number of elements Zij is smaller than a predetermined number, ON / OFF may be alternately set in order from the element Zij present at the closest position as the linear distance in all directions. This is because when there are many elements Zij for which on / off has not been determined, the direction is determined rather than searching for the element Zij existing at the closest position in all directions, for example, the direction is determined in a spiral manner and is closest. This is because it is faster to search in order from the element Zij existing at the position. When the number of elements Zij whose ON / OFF is undetermined decreases, the element Zij whose ON / OFF existing in the specific direction is undetermined. This is because it is quicker to list elements Zij whose ON / OFF is undetermined for the entire new matrix and to determine ON / OFF in order from the closest one, rather than searching for.
[0013]
The pre-built matrix referenced to the new matrix may be related as follows:
That is, in the ready-made matrix group, the ready-made matrix A in which all elements are off, the ready-made matrix C in which all elements are on, and the ready-made matrix B in which on-elements and off-elements exist are in the order ABC or in reverse order. Existed,
Select two pre-made matrixes that are adjacent to each other in the above order and make them reference objects in the reference binarization process, and binarize each element Zij on or off by reference binarization process and residual binarization process When the new matrix is included in the existing matrix group, the new matrix may be ordered between the two existing matrices to be referred to.
[0014]
In this way, the existing matrix is ordered, the new matrix is binarized with reference to the adjacent existing matrix in the order, and all positions are binarized by the residual binarization process, and then this newly formed matrix is formed. Matrixes are included in the ready-made matrix group, ordered between two adjacent ready-made matrices.
[0015]
For this reason, the threshold value at each position of the dither matrix is not biased to a specific value, and the dither matrix is appropriately distributed and distributed among various values, or the image is processed by the formed dither matrix. However, the resolution is not lowered, and the effect of suppressing noise is improved.
[0016]
In addition, in the ready-made matrix B, it is more preferable that the ON elements are approximately half of all the elements in terms of preventing a reduction in resolution and suppressing noise. Further, the ready-made matrix B is formed by performing error diffusion processing on a matrix in which all elements are the same multi-value (for example, “128” or “127”), and binarizing each element on or off. And more preferable. When a matrix having “128” or “127” as the values of all elements is used, the finally obtained dither matrix is suitable for use in processing a 256-gradation image.
[0017]
Here, the error diffusion is used, but the binary sequence generated by the error diffusion method seems to be irregular at first glance, but is not at all random. That is, there is a property that it is difficult to form a strong pattern, but it is difficult to form a noisy image. By using the binary sequence generated by the error diffusion method as described above, the dither matrix finally incorporates the characteristics of the binary sequence in the error diffusion method to some extent. Therefore, it is not noisy to the human eye, the resolution is not lowered, and the generation of a new matrix is repeatedly reflected in the dither matrix without using the direct error diffusion method as described above. It is considered that the property that can generate a binarized image in which the occurrence of the above is suppressed can be enhanced.
[0018]
Of course, the preformed matrix B may be formed randomly. In this case, noisy is a concern, but in this case as well, the generation of a new matrix that is not directly random is reflected in the dither matrix, so that the noisy can be reduced and improved compared to the conventional one. It becomes.
[0019]
Examples of the pre-formed matrix group formed by repeating the reference binarization process and the residual binarization process include, for example, those made up of 256 pre-made matrices. As described above, the dither matrix obtained from 256 ready-made matrices is suitable for use in image processing of 256 gradations.
[0020]
The binarization process based on a predetermined condition in the reference binarization process is the same as those elements in the case where both elements of the two existing matrices are on in the selected two existing matrices. When the elements of the new matrix existing at the position are also turned on, and both elements of the existing matrix are both off, the elements of the new matrix existing at the same position as those elements are also turned off and binarized. It is done.
[0021]
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.
[0022]
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.
[0023]
The CPU 12 is for executing creation of a dither matrix according to a program as will be described later, and the program memory 13 stores programs for performing various controls performed by the CPU 12, including a dither matrix creation program. Yes. The working memory 14 temporarily stores data necessary for the CPU 12 to execute a program stored in the program memory 13.
[0024]
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.
[0025]
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. In this embodiment, a dither matrix used for processing an image in which one pixel is represented by 256 gradations is created.
[0026]
First, three uniform density pixel matrices having density values of all elements “0”, “128”, and “255” are binarized by the error diffusion method (S100). As shown in FIG. 7, this uniform density pixel matrix may be used by reading three types of uniform density pixel matrices M0, M128, and M255 having density values of 0, 128, and 255 into the working memory. Then, the binarized prefabricated matrices F0, F128, and F255 (FIG. 8) are ordered in ascending order or descending order with order numbers of “0”, “128”, and “255”, respectively, and the working memory 14 Save (S200).
[0027]
However, the binarization result of the uniform density pixel matrix of the density values “0”, “128”, “255” performed in step S100 by the error diffusion method is the uniform density pixel matrix M0 (all elements are density values “0”). ]) Is binarized to all elements “0” (off), and in the case of uniform density pixel matrix M255 (all elements are density values “255”), it is binarized to all elements “1” (on). Therefore, the calculation is not particularly performed by the error diffusion method, and a pre-formed matrix F0 in which all elements are off “0” and a pre-formed matrix F255 in which all elements are on “1” is provided in advance. It may be used. Further, in the case of the density value “128”, the pre-made matrix F128 that has already been obtained by the error diffusion method may be used without being calculated in step S100.
[0028]
Next, in order to determine the order of creating a new binarized matrix, an array is created for each of the order numbers 1 to 127 and 129 to 254 (S300). This sequence of sequence numbers is created such that the sequence number corresponding to the numerical value in the middle of the sequence numbers that have already been binarized is set as the creation target.
[0029]
That is, the beginning of the array is “64” in the middle of “0” and “128”, the next is “192” in the middle of “128” and “255” (the other integer value “191” is also in the middle). Good, next is "32" in the middle of "0" and "64", next is "96" in the middle of "64" and "128", next is the middle of "128" and "192""160", and the next is "224" in the middle of "192" and "255" (or another central integer value of "223"). Is obtained, and an array “64, 192, 32, 96, 160, 224...” Having sequence numbers “1” to “127” and “129” to “254” is 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.
[0030]
Next, sequentially read from the top of the array into the sequence number i one by one (S400), and the reference binarization process (S500) is performed.
Details of the reference binarization processing in step S500 are shown in the flowchart of FIG.
First, since the matrix of the first sequence number “64” in the array is targeted for creation in step S400, all the elements are adjacent in the sequence number of the ready matrix that has been binarized on / off. Then, the latest rearward pre-formed matrix H belonging as the order with respect to “64” and the latest forward pre-formed matrix L belonging as the order with respect to “64” are selected from the contents of the working memory 14 (S510). ).
[0031]
In the case of the first sequence number i = 64 in the array, the preformed matrix F128 with the sequence number = 128 already binarized at step S100 corresponds to the latest rearranged matrix H, and the preformed matrix F0 with the sequence number = 0. Recently corresponds to the forward preformed matrix L.
[0032]
Next, in order to obtain an element of a new matrix Fi (i = 64) with the sequence number “64”, the first element is designated (S520). Here, as shown in FIG. 8, since the upper left corner of the matrix is the origin (0, 0), the x direction is the main scanning direction, and the y direction is the sub scanning direction, the origin (0, 0) is the first element first. Set as
[0033]
Next, whether or not the values of the element H (x, y) at the same position in the nearest rearward preformed matrix H and the element L (x, y) at the same position in the nearest forward preformed matrix L searched in step S510 are the same. It is determined (S530).
If they are the same (“YES” in step S530), the value of the element L (x, y) is set to the element Fi (x, y) at the same position in the new matrix Fi (S540). That is, in the two existing matrices H and L that are adjacent in the order selected in step S510, an element whose both matrixes H and L are on “1” is also on at the same position of the new matrix Fi. In addition, an element in which both the pre-built matrices H and L are off “0” is binarized with the same position of the new matrix Fi also off “0”. At this time, the element Fi (x, y) may be set to the contents of the element H (x, y) at the same position in the latest rear-built matrix H.
[0034]
If element H (x, y) = element L (x, y) is not satisfied (“NO” in step S530), the element Fi (x, y) at the same position in the new matrix Fi is not binarized. “−1” is set (S550).
Next, it is determined whether or not the processing of steps S530, S540, and S550 has been completed for all elements of the matrix Fi (S560).
[0035]
If not completed ("NO" in step S560), the next element (x, y) is set according to the scanning direction (S570), and the processes of steps S530, S540, and S550 are performed again. That is, each time step S570 is processed, the image data sequentially moves in the main scanning direction (x direction). When the processing in the main scanning direction is completed, the next element line in the sub scanning direction (y direction) The elements (x, y) are designated so as to move and sequentially move in the main scanning direction from x = 0, and the processes of steps S530, S540, and S550 are performed.
[0036]
If the process is completed for all elements (“YES” in S560), the process in step S500 is terminated, and the residual binarization process (S600) is executed as shown in FIG. 4, and binarization is performed in step S500. In other words, binarization is performed for an element that has not been set, that is, an element for which “−1” is set as an unbinarized position for which on / off is not determined.
[0037]
In the residual binarization process (S600), first, “1” is set to the variable I (S610). Next, the unbinarized element Fi (x, y) closest to the center of the matrix Fi is selected (S620). Next, the nearest unbinarized element Fi (xn, yn) is searched from the unbinarized element Fi (x, y) (S630).
[0038]
Next, it is determined whether or not any unbinarized elements exist (S640). If no unbinarized elements exist as a result of the search in step S630 (in step S640). “YES”), the process of step S600 is terminated as it is, but when the nearest unbinarized element Fi (xn, yn) is found (“NO” in step S640), the unbinarized element Fi. The value of variable I is set in (xn, yn) (S650).
[0039]
Next, it is determined whether or not variable I = on “1” (S660). If I = 1 (“YES” in step S660), off “0” is set in variable I (S670), and I = If it is 0 (“NO” in step S660), ON “1” is set in variable I (S680).
[0040]
Next, the element of Fi (xn, yn) binarized this time is set as Fi (x, y) (S690), and the process starts from step S630. Therefore, the next unbinarized element Fi (xn, yn) closest to the element Bi (x, y) binarized immediately before is searched, and if there is an unbinarized element, that element is The value of variable I is set. Since the value of the variable I is alternately switched on “1” and off “0” every time the value of the variable I is set in the unbinarized element, the unbinarized element includes “ ON / OFF is alternately set to “1”, “0”, “1”,.
[0041]
Here, a method for searching for the nearest unbinarized element will be described.
For example, assuming that the size of the matrix that has undergone the reference binarization processing (S500) is 4 × 4 as surrounded by a thick line in FIG. 5A, the hatched elements in it are reference binary values. It is assumed that the element is binarized in the digitization process (S500). There are five unbinarized elements A, B, C, D, and E.
[0042]
First, an unbinarized element closest to the center Q of the matrix is selected (S620). In the example of FIG. 5A, there are two elements B and C that are in contact with the center Q. As shown in FIG. 6, the direction at 3 o'clock from the center Q has the highest priority (priority 0), 3 Assuming that the priority order is set so that the priority order of the direction becomes lower as it goes clockwise from the hour direction, element B exists in the direction of priority 5 from the center Q of the matrix, and element C is the matrix. Therefore, the element C is extracted as an unbinarized element closest to the center Q of the matrix.
[0043]
In the distance calculation for obtaining the proximity, the actual distance D may be obtained as in the following expression 1, or the value obtained by the simple method as in the following expression 2 may be used as the pseudo distance d. .
[0044]
[Expression 1]
Figure 0003711617
[0045]
Here, Δx is an x coordinate difference between two points, and Δy is a y coordinate difference between the two points.
Next, another unbinarized element closest to the element C is searched by the calculation of Expression 1 or Expression 2 (S630). In the case of FIG. 5A, two elements B and E correspond.
Also in this case, since there are two elements, the priority shown in FIG. 6 is applied to obtain the element E. Therefore, ON “1” is set to the element E which is an unbinarized element (S650), and the element E becomes a binarized element.
[0046]
Next, an unbinarized element closest to the element E is searched in step S630, but here, the element D is obtained. Although the element E and the element D are largely separated on one matrix, the dither matrix finally formed is arranged in the horizontal and vertical directions as shown in FIGS. 5 (a) to 5 (f). In order to perform image processing, it is preferable to determine the nearest unbinarized element in step S630 in a state where the matrix is arranged vertically and horizontally.
[0047]
Therefore, as shown in FIG. 5 (b), the element D of the matrix adjacent to the right side is the closest, so as shown in FIG. 5 (c), the element D is extracted and the element D is set to OFF “0”. (S650).
Next, similarly, the unbinarized element closest to the element D is searched (S630), and the three elements A, B, and C are closest, but as judged by priority, as shown in FIG. Element A is selected. Accordingly, ON “1” is set in the element A (S650).
[0048]
Next, similarly, an unbinarized element closest to the element A is searched (S630), and since the element B is closest, the element B is selected as shown in FIG. Accordingly, the element B is set to “0” (S650). As shown in FIG. 5F, ON “1” is set to the last remaining element C (S650), and the residual binarization process (S600) is terminated.
[0049]
Note that the unbinarized element closest to the center Q of the matrix selected first in step S620 is not binarized when it is selected, and is found by a subsequent search in step S630. It is priced. This is because if the unbinarized element closest to the center Q of the matrix is set to ON “1” in step S620, for example, the probability that ON “1” is concentrated near the center Q increases. This is because it is not preferable in terms of dispersion of values. Of course, for each newly created matrix, the value initially set to I in step S610 may be switched alternately between on “1”, off “0”, on “1”, off “0”,. Alternatively, if it is switched randomly, the unbinarized element closest to the center Q may be binarized in step S620.
[0050]
In this way, all the elements of the matrix are binarized, and the contents of the most recently rearranged matrix H (order number 128) and the most recent preformed matrix L (order number 0) whose contents are referred to in the reference binarization process (S500). ) Are stored in the working memory 14 as a ready matrix Fi (i = 64 in this case) (S700). In this case, since the order number is already assigned and the order is assigned, it may be stored in the working memory 14 as it is.
[0051]
Therefore, at this time, in the working memory 14, a ready-made matrix group including four ready-made matrices having sequence numbers 0, 64, 128, and 255 is formed.
Next, it is determined whether or not the array has been completed (S800). If it has not been completed ("NO" in S800), the next sequence number in the array is set to sequence number i (S400). Based on i, the reference binarization process in step S500, the residual binarization process in step S600, and the process of ordering and storing between the nearest rearward pre-formed matrix H and the nearest forward predetermined matrix L in step S700 are repeated. . That is, after i = 64, i = 192 is set, the pre-formed matrix with the order number 255 is selected as the most recent pre-formed matrix H, and the pre-formed matrix with the order number 128 is selected as the most recent pre-formed matrix L. Steps S500, S600, and S700 are performed. As a result, in the working memory 14, a ready-made matrix group composed of five ready-made matrices having sequence numbers 0, 64, 128, 192, and 255 is formed.
[0052]
Subsequently, i = 32, 96, 160, 224,... Are sequentially processed, and at i = 32, the pre-formed matrix with the order number 64 as the most recent pre-formed matrix H, and the order number 0 as the most recent pre-formed matrix L. A ready-made matrix is selected, and a ready-made matrix group consisting of six ready-made matrices of order numbers 0, 32, 64, 128, 192, and 255 is formed in the working memory 14.
[0053]
At the next i = 96, the pre-formed matrix with the order number 128 is selected as the most recent pre-formed matrix H, and the pre-formed matrix with the order number 64 is selected as the most recent pre-formed matrix L, and the working memory 14 has the order numbers 0, 32, A ready-made matrix group consisting of seven ready-made matrices of 64, 96, 128, 192, and 255 is formed.
[0054]
At the next i = 160, the pre-formed matrix with the order number 192 is selected as the most recent pre-formed matrix H, and the pre-formed matrix with the order number 128 is selected as the most recent pre-formed matrix L, and the working memory 14 has the order numbers 0, 32, A ready-made matrix group composed of eight ready-made matrices of 64, 96, 128, 160, 192, and 255 is formed.
[0055]
At the next i = 224, a pre-formed matrix with the order number 255 is selected as the most recent pre-formed matrix H, and a pre-formed matrix with the order number 192 is selected as the most recent pre-formed matrix L, and the working memory 14 has the order numbers 0, 32, A ready-made matrix group consisting of nine ready-made matrices of 64, 96, 128, 160, 192, 224, and 255 is formed.
[0056]
Thereafter, similarly, the sequence number i is set according to the arrangement, the above-described processing is performed, and the number of ready-made matrices in the ready-made matrix group increases.
When the processing of the corresponding matrix (S500, S600, S700) is completed ("YES" in S800) for the last sequence number in the array, as shown in FIG. 256 prefabricated matrices F0 to F255 of 255 are formed.
[0057]
Next, for all of the pre-built matrices F0 to F255 in the pre-made matrix group obtained in this way, the number binarized to ON among the elements at the same position is counted, and the accumulation using this count value as the element is counted. A result matrix W is formed (S900).
[0058]
That is, as shown in FIG. 9, 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 prefabricated matrices F0 to F255 are turned on. Count the elements that became. The count result is stored in the element (0, 0) at the same position of the integration result matrix W prepared in the working memory 14 as shown in FIG. The count processing of the elements at the same position is performed for each element, and all the accumulation result matrix W is filled. This count processing is binarized to “1” when each element is on, and to “0” when it is off, so the numerical values of the elements at the same position may be summed up.
[0059]
Next, threshold values for the dither matrix are set in order from the element with the lower count value of the integration result matrix W (S950), and the matrix composed of the threshold values is stored in the dither matrix storage memory 16 as a dither matrix (S960).
[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 S900 corresponds to the threshold setting process for the dither matrix, no particular process is performed in step S950. Then, the integration result matrix W itself is stored as a dither matrix in the dither matrix storage memory 16 (S960).
[0061]
In step S950, instead of simply using the count values themselves of the integration result matrix W as threshold values, the count values of the integration result matrix W are set as threshold values in accordance with a table of count values and threshold values prepared in advance. It may be converted.
In step S950, the threshold value 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 identical count values, they may all be given the same threshold value, or the same count values may be ordered by a predetermined method and based on the ranking. Different threshold values may be set. As a specific example of the predetermined method, the surrounding count values are summed up, and ranking is performed based on the obtained count value, or position information in the dither matrix (W) (for example, the one near the center Q) ).
[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 the resolution is not lowered. Thus, it was possible to generate a pseudo-halftone binarized image in which the generation of patterns was suppressed. Of course, the image processing is a dither method, and since many calculations are not performed unlike the error diffusion method, it can be processed quickly.
[0063]
Furthermore, in the present embodiment, in the binarization in step S500, the binarization is performed in steps S530, S540, and S550 in consideration of the binarization state of the already formed matrix that is already binarized. Has been decided.
If the binarization is performed by the error diffusion method or the residual binarization process of step S600 without using steps S530, S540, and S550, as shown in FIG. Off appears in the element of. For this reason, the number of ONs in each element tends to be biased to a specific value in the range of 0 to 255 only with normal binarization. The element that is turned on “1” can continue to be turned on “1” even if the order number subsequently increases. Therefore, it is preferable that the element is dispersed in various values in the range of 0 to 255. Distribution.
[0064]
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. For this reason, in particular, in the binarization of the image data, the resolution is further improved as compared with the dither matrix obtained when each binary matrix is determined independently as shown in FIG. And the pattern is suppressed.
[0065]
In the present embodiment, as described with reference to FIG. 11 (a), the element that is first turned on “1” when viewed from the ready-made matrix having a smaller sequence number is turned on even if the sequence number increases thereafter. Since “1” continues, the dither matrix may be formed using the sequence number of the ready matrix that is first turned on “1” as the threshold value of the element at the same position as the position that is first turned on “1”. .
[0066]
[Embodiment 2]
As the second embodiment, an example in which the central order number i is calculated is shown in FIG. This process is executed instead of steps S300 to S800 in FIG. In this process, first, eight variables I0 to I7 are initialized with "0" (S1010 to S1080), and then I0 to I7 are summed and set to a sequence number i (S1090). If this sequence number i is “0”, I7 is increased by “128” (S1120), and then I7> 128 is not satisfied (“NO” in S1130). 128 ”is set, i is not 0 (“ NO ”in S1100), and i is not 255 (“ NO ”in S1110), so the processing in steps S500, S600, and S700 (same as the processing in FIG. 2) is performed. Made.
[0067]
Next, in step S1120, I7 = 256, it is determined "YES" in step S1130, I6 is increased by "64" (S1140), I6 = 64, and I6> 64 is not satisfied (in S1150). “NO”), it is initialized to I7 = 0 in step S1080, and i = 64 in step S1090. Therefore, the process moves from steps S1100 and S1110 to steps S500, S600, and S700, and the creation process is performed for the matrix with the sequence number i = 64.
Next, I7 = 128 is determined in step S1120, and "NO" is determined in step S1130. In step S1090, I0 to I5 = 0, I6 = 64, and I7 = 128, i = 192. After steps S1100 and S1110, binarization is performed on the matrix with the sequence number i = 192 in steps S500, S600, and S700.
[0068]
Next, since I0 to I5 = 0, I6 = 64, and I7 = 128, the process proceeds from step S1120 to step S1160, and in step S1160, I5 = 32. Since I5> 32 is not satisfied (“NO” in S1170), steps S1070 and S1080 are processed, and I0 to I4 = 0, I5 = 32, I6 = 0, and I7 = 0. Therefore, i = 32 in step S1090, and the matrix of the sequence number i = 32 is binarized in steps S500, S600, and S700.
[0069]
Next, since I7 = 0, the process returns to step S1090 via steps S1120 and S1130. At this time, I0 to I4 = 0, I5 = 32, I6 = 0, and I7 = 128. Accordingly, i = 160 is obtained in step S1090, and the matrix of the sequence number i = 160 is binarized in steps S500, S600, and S700.
[0070]
Next, steps S1120 to S1150 and S1080 are processed, and I0 to I4 = 0, I5 = 32, I6 = 64, and I7 = 0. Therefore, i = 96 is obtained in step S1090, and the matrix having the sequence number i = 96 is binarized in steps S500, S600, and S700.
[0071]
Thereafter, 224, 16, 144, 80,..., 127 are sequentially set to the order number i by any one of steps S1020 to S1080 and S1120 to S1260 according to the values of I0 to I7. The matrix of number i is binarized and stored, and finally, I0 = 1, I1 = 2, I2 = 4, I3 = 8, I4 = 16, I5 = 32, I6 = 64, I7 = 128. . At this time, since the sequence number i = 255 is set in step S1090, “YES” is determined in step S1110, and the process proceeds to step S700. In this way, the matrix can be binarized by following the central value in the calculation.
[0072]
[Others]
In each of the above-described embodiments, the binarization process is performed by following the central integer value as the sequence number. However, even if it is not a completely central integer value, the 1: 2 position, 1: 3 position, 2: 1 The binarization process may be performed by following integer values that are biased toward the small side or the large side, although they are intermediate values between two binarized sequence numbers, such as the 3: 1 position. .
[0073]
In each of the embodiments, the count value may not be used as it is as the integration result matrix W but may be multiplied by a predetermined coefficient. In addition, by setting a different coefficient k (i) for each order number i for the binarized value Iixy of the ready-made matrix with the order number i and obtaining the total value Cxy of all the ready-made matrices as follows: An accumulation result matrix W may be created.
[0074]
[Expression 2]
Figure 0003711617
[0075]
Here, x and y represent positions on the matrix.
The binarization of the matrix was binarization to ON “1” or OFF “0”, but any value may be binarized, and the number of either one of the values is counted and the integration result matrix W may be formed, and this integration result matrix W 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.
[0076]
The binarization of the uniform density pixel matrix having the uniform density value “128” in each of the above-described embodiments is an error diffusion method of receiving a binarization error distribution from peripheral elements at the time of binarization, a so-called average error minimum method. However, when the element of interest is binarized, an error diffusion method based on a method of distributing binarization errors to the density of peripheral elements that have not yet been binarized may be used.
[0077]
The prefabricated matrix F128 has obtained a uniform density pixel matrix having a uniform density value “128” by error diffusion processing, but what is necessary is that the center state of the prefabricated matrix F0 and the prefabricated matrix F255, that is, ON / OFF is approximately 1 Since the prefabricated matrix F128 exists at 1: 1, for example, the prefabricated matrix F128 may be formed by outputting ON / OFF at about 1: 1 at random, or the residual binarization process described above. The prefabricated matrix F128 may be formed by processing in the same manner as described above, or the prefabricated matrix F128 may be determined by simply determining ON / OFF like a checkerboard pattern. Further, “127” may be used instead of the uniform density value “128”.
[0078]
In the residual binarization process in step S600, the closest unbinarized element Fi (xn, yn) is searched from the unbinarized element Fi (x, y) as the straight line distance in all directions, and from the closest one. ON “1”, OFF “0”, etc. were set. In addition to this, as a method for searching for the unbinarized element Fi (x, y), the nearest element existing in the direction following the predetermined element in a spiral shape may be used. That is, the search direction is always set to the center Q of the matrix clockwise or counterclockwise, and the search is always performed spirally outward from the center Q of the matrix. It may be set by setting “0”,. Also, other methods may be used, and it may be set on or off so that the distribution of the same value is not biased.
[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.
3 is a flowchart of reference binarization processing according to Embodiment 1. FIG.
FIG. 4 is a flowchart of residual binarization processing according to the first embodiment.
FIG. 5 is an explanatory diagram illustrating a binarization order of the residual binarization process according to the first embodiment.
FIG. 6 is an explanatory diagram illustrating the priority of the binarization order of the residual binarization process according to the first embodiment.
7 is an explanatory diagram of a uniform density pixel matrix according to Embodiment 1. FIG.
FIG. 8 is an explanatory diagram of a ready-made matrix obtained by binarizing the uniform density pixel matrix according to the first embodiment.
FIG. 9 is an explanatory diagram of a ready-made matrix according to the first embodiment.
10 is an explanatory diagram of an integration result matrix according to Embodiment 1. FIG.
FIG. 11 is an explanatory diagram of an on / off setting state of each preformed matrix according to the first embodiment.
FIG. 12 is a flowchart illustrating a method for determining the processing order of the binarization matrix according to the second embodiment.
[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 (10)

予め、各要素がオンあるいはオフに2値化された複数の既成マトリックスを含む既成マトリックス群から、オンの要素とオフの要素との分布が異なる2つの既成マトリックスを選択し、これら2つの既成マトリックスの内の一方の既成マトリックスに存在する要素Xijと、それと同一位置に存在する他方の既成マトリックスの要素Yijとを参照して所定の条件に基づいて、それらの要素Xij,Yijと同一位置に存在する新しいマトリックスの要素Zijのオン/オフを決定する参照2値化処理を行い、
次いで、前記参照2値化処理にてオン/オフが決定されなかった前記新しいマトリックスの要素Zijについて、同一の値の分布が偏らないようにオンあるいはオフに設定する残余2値化処理を行って、
上記2つの処理により各要素Zijがオンあるいはオフに2値化された新しいマトリックスを前記既成マトリックス群に含めながら、前記参照2値化処理と前記残余2値化処理とを繰り返すことにより、所定数の既成マトリックスからなる既成マトリックス群を構築し、
この構築された既成マトリックス群に基づいて、ディザマトリックスにおける各要素の閾値を設定することを特徴とするディザマトリックス作成方法。
Two pre-built matrices having different distributions of on-elements and off-elements are selected from a group of pre-formed matrices including a plurality of pre-formed matrices in which each element is binarized on or off. Referring to the element Xij existing in one of the existing matrices and the element Yij of the other existing matrix at the same position, the elements Xij and Yij are present at the same position based on a predetermined condition. A reference binarization process for determining on / off of elements Zij of the new matrix to be performed,
Next, a residual binarization process is performed to set on or off so that the distribution of the same value is not biased for the element Zij of the new matrix whose on / off has not been determined in the reference binarization process. ,
By repeating the reference binarization process and the residual binarization process while including a new matrix in which each element Zij is binarized on or off by the above two processes in the established matrix group, a predetermined number is obtained. Build a pre-built matrix group consisting of
A dither matrix creating method, characterized in that a threshold value of each element in a dither matrix is set based on the constructed ready-made matrix group.
前記残余2値化処理が、前記参照2値化処理にてオン/オフが決定されなかった前記新しいマトリックスの要素Zijについて、所定位置から最も近い位置に存在するものから順に、オン/オフを交互に設定して行くことを特徴とする請求項1記載のディザマトリックス作成方法。In the residual binarization process, the on / off of the new matrix element Zij that has not been determined to be turned on / off in the reference binarization process is alternately switched on / off in order from the position closest to the predetermined position. 2. The dither matrix creating method according to claim 1, wherein 前記最も近い位置が、前記所定位置から予め定めた螺旋状にたどって行く方向に存在する最も近い位置であることを特徴とする請求項2記載のディザマトリックス作成方法。3. The dither matrix creating method according to claim 2, wherein the nearest position is a nearest position existing in a direction following a predetermined spiral from the predetermined position. 前記最も近い位置が、全方向において直線距離として最も近い位置であることを特徴とする請求項2記載のディザマトリックス作成方法。3. The dither matrix creating method according to claim 2, wherein the closest position is a position closest as a linear distance in all directions. 前記残余2値化処理が、オン/オフが決定されなかった要素Zijが所定数より多いときは、前記新しいマトリックスの所定位置から螺旋状にたどりながら、最も近い位置に存在する要素Zijから順にオン/オフを交互に設定し、要素Zijが所定数より少なくなると、全方向において直線距離として最も近い位置に存在する要素Zijから順にオン/オフを交互に設定して行くことを特徴とする請求項2記載のディザマトリックス作成方法。When the residual binarization process has more than a predetermined number of elements Zij for which on / off has not been determined, the remaining binarization process turns on in order from the element Zij present in the nearest position while following a spiral from the predetermined position of the new matrix. When the number of elements Zij is less than a predetermined number, ON / OFF is alternately set in order from the element Zij present at the closest position as the linear distance in all directions. 2. The method of creating a dither matrix according to 2. 前記既成マトリックス群には、全要素がオフの既成マトリックスA、全要素がオンの既成マトリックスC、およびオンの要素とオフの要素とが存在している既成マトリックスBがABCまたはこの逆順に順番付けられて存在し、
前記順番上で隣接する2つの既成マトリックスを選択して、前記参照2値化処理における参照対象とするとともに、前記参照2値化処理および前記残余2値化処理により各要素Zijがオンあるいはオフに2値化された前記新しいマトリックスを前記既成マトリックス群に含める際に、前記参照対象の2つの既成マトリックスの間に順番付けることを特徴とする請求項1〜5記載のディザマトリックス作成方法。
In the ready-made matrix group, a ready-made matrix A in which all elements are off, a ready-made matrix C in which all elements are on, and a pre-formed matrix B in which on-elements and off-elements are present are ordered ABC or in reverse order. Existed,
Two pre-built matrices that are adjacent in the order are selected as reference objects in the reference binarization process, and each element Zij is turned on or off by the reference binarization process and the residual binarization process. The dither matrix creating method according to claim 1, wherein when the new binarized matrix is included in the ready-made matrix group, an order is placed between the two ready-made matrices to be referred to.
前記既成マトリックスBが、オンの要素が全要素のほぼ半分であることを特徴とする請求項6記載のディザマトリックス作成方法。7. The dither matrix creating method according to claim 6, wherein the pre-built matrix B has ON elements that are approximately half of all elements. 前記既成マトリックスBが、全ての要素が同一の多値からなるマトリックスを誤差拡散処理して、各要素をオンあるいはオフに2値化して形成されていることを特徴とする請求項6または7記載のディザマトリックス作成方法。8. The pre-built matrix B is formed by performing error diffusion processing on a matrix having all elements having the same multi-value and binarizing each element on or off. Dither matrix creation method. 前記既成マトリックスBが、全ての要素が128または127の値からなるマトリックスを誤差拡散処理して、各要素をオンあるいはオフに2値化して形成されているとともに、
前記参照2値化処理と前記残余2値化処理との繰り返しにより、256個の既成マトリックスからなる既成マトリックス群が形成されることを特徴とする請求項8記載のディザマトリックス作成方法。
The pre-formed matrix B is formed by performing error diffusion processing on a matrix in which all elements have values of 128 or 127 and binarizing each element on or off, and
9. The dither matrix creating method according to claim 8, wherein a ready matrix group including 256 ready matrices is formed by repeating the reference binarization process and the residual binarization process.
前記参照2値化処理における所定の条件に基づく2値化処理が、選択された前記2つの既成マトリックスにて、両既成マトリックスの要素が共にオンである場合には、それらの要素と同一位置に存在する前記新しいマトリックスの要素もオンとし、両既成マトリックスの要素が共にオフである場合には、それら要素と同一位置に存在する前記新しいマトリックスの要素もオフとして2値化することであることを特徴とする請求項1〜9のいずれか記載のディザマトリックス作成方法。When the binarization processing based on a predetermined condition in the reference binarization processing is in the selected two ready matrixes and both of the ready matrix elements are on, the binarization process is in the same position as those elements. The elements of the new matrix that exist are also turned on, and if both elements of the existing matrix are both off, the elements of the new matrix that are in the same position as those elements are also turned off and binarized. The dither matrix creating method according to claim 1, wherein the dither matrix is created.
JP08287096A 1996-02-23 1996-04-04 Dither matrix creation method Expired - Fee Related JP3711617B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP08287096A JP3711617B2 (en) 1996-04-04 1996-04-04 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
JP08287096A JP3711617B2 (en) 1996-04-04 1996-04-04 Dither matrix creation method

Publications (2)

Publication Number Publication Date
JPH09275493A JPH09275493A (en) 1997-10-21
JP3711617B2 true JP3711617B2 (en) 2005-11-02

Family

ID=13786345

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP3711617B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002071738A1 (en) * 2001-03-02 2002-09-12 Dai Nippon Printing Co., Ltd. Dither mask creating method and creating device

Also Published As

Publication number Publication date
JPH09275493A (en) 1997-10-21

Similar Documents

Publication Publication Date Title
JP3247737B2 (en) Pixel value quantization method in image
JP4251189B2 (en) Image data conversion processing apparatus and image data conversion processing method
US5917951A (en) Clustered aperiodic mask
JP4062175B2 (en) Image processing apparatus, method, program, and recording medium recording the program
JP4150206B2 (en) Halftone threshold data creation method
US6025930A (en) Multicell clustered mask with blue noise adjustments
US7079290B2 (en) Halftoning method and system providing increased number of densities per basic halftone cell for constant input
JP5124268B2 (en) Method and apparatus for generating a dither mask by interpolation between preferred patterns
JP3711617B2 (en) Dither matrix creation method
US7433083B2 (en) Halftone-image processing device
US6995873B1 (en) Flexible digital halftoning
JP3711615B2 (en) Dither matrix creation method and image data binarization method
JP3740732B2 (en) Dither matrix creation method
JP3709599B2 (en) Dither matrix creation method
JP3740739B2 (en) Dither matrix creation method
JP3951953B2 (en) Printing apparatus, image processing apparatus, printing method, image processing method, and program
JP2899304B2 (en) Dither image scaling processor
JP3709598B2 (en) Dither matrix creation method
JP2003259118A (en) Dither matrix generating method and printer
JPS60226279A (en) Half tone recording device
JP4062176B2 (en) Image processing apparatus, method, program, and recording medium recording the program
JP4965378B2 (en) Image forming method and image forming system
JPH07123259A (en) Picture processing unit
JPH0431466B2 (en)
JP4445150B2 (en) Image processing 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: 20050726

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050808

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090826

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100826

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110826

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120826

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120826

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130826

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees