JP3431780B2 - Threshold value matrix error diffusion binarization method and computer system - Google Patents

Threshold value matrix error diffusion binarization method and computer system

Info

Publication number
JP3431780B2
JP3431780B2 JP30834396A JP30834396A JP3431780B2 JP 3431780 B2 JP3431780 B2 JP 3431780B2 JP 30834396 A JP30834396 A JP 30834396A JP 30834396 A JP30834396 A JP 30834396A JP 3431780 B2 JP3431780 B2 JP 3431780B2
Authority
JP
Japan
Prior art keywords
matrix
threshold
binarization
pixel
density
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
JP30834396A
Other languages
Japanese (ja)
Other versions
JPH10150565A (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 JP30834396A priority Critical patent/JP3431780B2/en
Priority to US08/971,189 priority patent/US6108450A/en
Publication of JPH10150565A publication Critical patent/JPH10150565A/en
Application granted granted Critical
Publication of JP3431780B2 publication Critical patent/JP3431780B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、中間調画像の2値
化方法およびこの方法を実行可能に構成されたコンピュ
ータシステムに関し、この内でも特に、画素濃度と閾値
との比較により中間調画像を2値化する際に生じた誤差
を周辺の画素の2値化に反映させるに際して、前記閾値
として、閾値が位置に応じて設定されている閾値マトリ
ックスから、前記画素位置に応じて抽出された閾値を用
いる閾値マトリックス誤差拡散法による2値化方法およ
びコンピュータシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of binarizing a halftone image and a computer system configured to execute this method. Among them, in particular, a halftone image is obtained by comparing a pixel density with a threshold value. When the error generated when binarizing is reflected in the binarization of the surrounding pixels, the threshold extracted as a threshold from a threshold matrix in which the threshold is set according to the position, according to the pixel position. The present invention relates to a binarization method and a computer system by a threshold matrix error diffusion method using the.

【0002】[0002]

【従来の技術】フロイド(Floyd:"An Adaptive Algorit
hm for Spatial Gray Scale" SID 17[1976])らによっ
て提唱された誤差拡散法は、豊富な階調から成る自然画
像を良好な2値画像に変換する技法として広く知られて
いる。さらに、この誤差拡散法が持つ紋様の発生という
欠点を防止する手法として以下に記述する手法が知られ
ている。この手法の具体例としては、("On The Error
Diffusion Technique for Electronic Halftoninig" C.
Billotet-Hoffmann and O.Bryngdahl 1983 SID Vol.24/
3)[文献1参照]を挙げることができる。
2. Description of the Related Art Floyd: "An Adaptive Algorit
The error diffusion method proposed by hm for Spatial Gray Scale "SID 17 [1976]) is widely known as a technique for converting a natural image composed of abundant gradations into a good binary image. The method described below is known as a method for preventing the disadvantage of the error diffusion method, that is, the generation of a pattern, and a specific example of this method is ("On The Error
Diffusion Technique for Electronic Halftoninig "C.
Billotet-Hoffmann and O. Bryngdahl 1983 SID Vol.24 /
3) [Reference 1] can be mentioned.

【0003】まず図32を参照して、上記従来技術の動
作について説明する。まず誤差拡散処理が開始される
と、後述する誤差バッファを0に初期化すると共に、以
下の手順を実行する。 S1,S2:2値化処理画素の位置を判別するための変
数x,yを0に初期化する。尚、変数x,yで示される
画素のことを注目画素と呼ぶ。
First, referring to FIG. 32, the operation of the above-mentioned conventional technique will be described. First, when the error diffusion process is started, an error buffer described later is initialized to 0 and the following procedure is executed. S1, S2: Variables x and y for discriminating the position of the binarized pixel are initialized to 0. The pixel indicated by the variables x and y is called a target pixel.

【0004】S3:画素位置(x,y)に対応する入力
画像の画素濃度値I(0≦I≦255)を読み取る。 S4:注目画素に対応する2値化誤差値e(x,y)を
誤差バッファから読み取り、次式1のごとく2値化誤差
値e(x,y)にて画素濃度値Iを補正して、補正濃度
値I′を求める。
S3: The pixel density value I (0≤I≤255) of the input image corresponding to the pixel position (x, y) is read. S4: The binarization error value e (x, y) corresponding to the pixel of interest is read from the error buffer, and the pixel density value I is corrected by the binarization error value e (x, y) as in the following Expression 1. , The corrected density value I ′ is obtained.

【0005】[0005]

【数1】 [Equation 1]

【0006】S5:予め設定した閾値マトリックスMa
t()から画素位置(x,y)に応じて閾値Tを次式2
のごとく読み取る。
S5: Threshold matrix Ma set in advance
The threshold T is calculated from t () according to the pixel position (x, y) by the following equation 2
Read like.

【0007】[0007]

【数2】 [Equation 2]

【0008】尚、Mat()は図33に示す様な2次元
配列のマトリックスであり、この例では8×8要素で構
成されている。各要素には閾値が1つづつ対応付けられ
て記憶されている。また、上式の「%」は除算後の余を
求める演算子であり、x%8はxを8で割つた後の余り
を示すものである。すなわち、x=8ならばx%8=0
であり、x=12ならばx%8=4となる。
Incidentally, Mat () is a matrix of a two-dimensional array as shown in FIG. 33, and is composed of 8 × 8 elements in this example. One threshold value is associated with each element and stored. In addition, “%” in the above equation is an operator for obtaining a remainder after division, and x% 8 indicates a remainder after x is divided by 8. That is, if x = 8, x% 8 = 0
If x = 12, x% 8 = 4.

【0009】この手順で読み取る閾値は、図33の例に
従えば、x=0,y=0ならば、x%8=0,y%8=
0なので、T=2であり、x=10,y=100なら
ば、x%8=2,y%8=4なので、T=46となる。
S6:S5で読み取った閾値TとS4で求めた補正濃度
値I′を比較し、2値化処理の分岐を行う。
According to the example of FIG. 33, the threshold value read in this procedure is x% 8 = 0, y% 8 = if x = 0 and y = 0.
Since 0, T = 2, and if x = 10 and y = 100, x% 8 = 2 and y% 8 = 4, so T = 46.
S6: The threshold value T read in S5 is compared with the corrected density value I ′ obtained in S4, and the binarization processing is branched.

【0010】S7:S6でI′<Tならば(「YE
S」)、出力濃度O=0とする。 S12:S6でI′≧Tならば(「NO」)、出力濃度
O=1とする。 S8:補正濃度値I′と出力濃度Oとに基づいて2値化
誤差値Eを次式3のごとく、算出する。
S7: If I '<T in S6 ("YE
S ”) and output density O = 0. S12: If I ′ ≧ T in S6 (“NO”), the output density O = 1. S8: A binarization error value E is calculated based on the corrected density value I'and the output density O as in the following Expression 3.

【0011】[0011]

【数3】 [Equation 3]

【0012】S9:予め設定した誤差分配マトリックス
Bmat()に基づいて、上記誤差値Eを、次式4に示
すごとく、2値化が未処理の周辺画素の誤差バッファe
に分配する。
S9: Based on a preset error distribution matrix Bmat (), the error value E is expressed by the following equation 4, and the error buffer e of the unbinarized peripheral pixels
Distribute to.

【0013】[0013]

【数4】 [Equation 4]

【0014】尚、「+=」は既に誤差バッファe内に存
在する値と加算処理して同じ誤差バッファeに格納する
ことを示す演算子である。Bmat()の具体例は図3
4に示す通りであり、i,jは注目画素位置をi=j=
0とし、図34に示す様な値をとる変数である。
Incidentally, "+ =" is an operator indicating that the value already existing in the error buffer e is added and stored in the same error buffer e. A concrete example of Bmat () is shown in FIG.
As shown in FIG. 4, i and j are pixel positions of interest i = j =
It is a variable that is set to 0 and has a value as shown in FIG.

【0015】S10:主走査方向(x方向)の2値化処
理が終了したか判定する。 S11:S10にて終了したと判定された場合に(「Y
ES」)、全画素の2値化処理が終了したか判定する。 S13:S10にて終了していないと判定された場合に
(「NO」)、xに1を加算し、S3に戻る。
S10: It is determined whether the binarization processing in the main scanning direction (x direction) is completed. S11: When it is determined in S10 that the process is completed (“Y
ES "), it is determined whether the binarization processing of all pixels is completed. S13: When it is determined in S10 that the processing is not completed (“NO”), 1 is added to x, and the process returns to S3.

【0016】S14:S11にて全画素の2値化処理が
終了していないと判定された場合に(「NO」)、yに
1を加算し、S2に戻る。なお、S11にて全画素の2
値化処理が終了していると判定されると(「YES」)
誤差拡散処理は終了する。このように、閾値マトリック
スを誤差拡散に利用することによって、画質を劣化させ
る、紋様の発生や濃度急変部(エッジ)におけるドット
の偏りを防止することができるようになった。
S14: When it is determined in S11 that the binarization processing of all pixels is not completed (“NO”), 1 is added to y and the process returns to S2. In addition, in S11, 2 of all pixels
When it is determined that the valuation process has been completed (“YES”)
The error diffusion process ends. As described above, by utilizing the threshold matrix for error diffusion, it is possible to prevent the occurrence of patterns and the unevenness of dots in the density abrupt change portion (edge), which deteriorates the image quality.

【0017】[0017]

【発明が解決しようとする課題】しかし、この閾値マト
リックスは、画像が取り得る最小の濃度値〜最大の濃度
にわたる値から、等間隔の数値を均等に選択して、値の
大小順に所定の配置形状に基づいて、閾値マトリックス
の各要素位置に配置していた。
However, this threshold value matrix is set such that numerical values at equal intervals are evenly selected from values ranging from the minimum density value that an image can take to the maximum density value, and the values are arranged in order of magnitude. It was arranged at each element position of the threshold matrix based on the shape.

【0018】例えば、図33の例では、画像が取り得る
濃度値は0〜255であるので、2〜254までの、間
隔が4の64個の数値2,6,10,…,254を、小
さい方から4つづつ一組として、閾値マトリックスから
選択された5×5の正方形の各頂点に当たる要素位置に
順番に配置することで、閾値マトリックスを形成してい
た。なお、図33の例は、説明上判り易くするために8
×8の閾値マトリックスで説明している。実際に用いら
れる閾値マトリックスは、128×128や256×2
56等の極めて大きなものである。したがって、閾値も
極めて多数が記憶されている。
For example, in the example of FIG. 33, since the density value that the image can take is 0 to 255, 64 numerical values 2, 6, 10, ... The threshold matrix is formed by sequentially arranging the groups from the smallest one in the element positions corresponding to the vertices of a 5 × 5 square selected from the threshold matrix. Note that the example of FIG. 33 is 8 for the sake of clarity.
The description is made with the threshold matrix of × 8. The threshold matrix actually used is 128 × 128 or 256 × 2.
It is extremely large such as 56. Therefore, an extremely large number of threshold values are stored.

【0019】このように閾値マトリックスは多種類の数
値が多数配置されたものであることから、メモリを大量
に消費しメモリ容量的に不利なものであった。しかし、
従来の配列による閾値マトリックスでは、この閾値の種
類やマトリックスの大きさを小さくすると、前述したご
とく、誤差拡散法における紋様の発生や濃度急変部にお
けるドットの偏りを防止するのが困難となり、閾値の種
類の減少やマトリックスの小型化はできず、メモリ容量
的に不利となるのは避けられなかった。
As described above, since the threshold value matrix is formed by arranging many kinds of numerical values, a large amount of memory is consumed, which is disadvantageous in terms of memory capacity. But,
In the threshold matrix with the conventional array, if the type of the threshold and the size of the matrix are reduced, as described above, it becomes difficult to prevent the generation of patterns in the error diffusion method and the deviation of the dots in the abrupt density change portion. The number of types could not be reduced and the matrix could not be downsized, and it was inevitable that the memory capacity would be disadvantageous.

【0020】[0020]

【課題を解決するための手段及び発明の効果】ここに
は、1つまたはそれ以上の発明が記載され、それぞれ以
下に述べるような構成および効果を有する。本発明の閾
値マトリックス誤差拡散法による2値化方法は、入力画
像の画素濃度と閾値との比較により中間調画像を2値化
する際に生じた誤差を周辺の画素の2値化に反映させる
に際して、前記閾値として、閾値が位置に応じて設定さ
れている閾値マトリックスから、前記画素位置に応じて
抽出された閾値を用いる閾値マトリックス誤差拡散法に
よる2値化方法であって、前記閾値マトリックスの閾値
の配置が、2次元配置のブルーノイズマスクの手法によ
り形成されていることを特徴とする。
Means for Solving the Problems and Effects of the Invention Here, one or more inventions are described, each having the following configurations and effects. In the binarization method by the threshold value matrix error diffusion method of the present invention, the error generated when binarizing the halftone image by comparing the pixel density of the input image with the threshold value is reflected in the binarization of the peripheral pixels. At this time, as the threshold value, a binarization method by a threshold value matrix error diffusion method using a threshold value threshold value set according to the position from the threshold value matrix set according to the position, It is characterized in that the threshold arrangement is formed by a two-dimensional arrangement of the blue noise mask.

【0021】ブルーノイズマスクの手法とは、本発明が
採用している誤差拡散法とは異なる中間調画像の2値化
の手法であるディザマトリックスを作成するための1つ
の手法として知られている。すなわち、ブルーノイズマ
スクの手法は、所定の割合で存在する2値からなるマト
リックスの2値の分布を評価して、同一の値が集中しな
いように2値を分散し、これに基づいて複数の2値のマ
トリックスを作成し、この複数の2値のマトリックスに
基づいて多値の閾値のマトリックスを作成する手法であ
る。
The blue noise mask method is known as one method for creating a dither matrix, which is a method of binarizing a halftone image different from the error diffusion method used in the present invention. . That is, the blue noise mask method evaluates a binary distribution of a binary matrix existing at a predetermined ratio, distributes the binary values so that the same values are not concentrated, and based on this, a plurality of binary values are distributed. This is a method of creating a binary matrix and creating a matrix of multi-valued thresholds based on the plurality of binary matrices.

【0022】このブルーノイズマスクの手法は、例え
ば、"The Void & Cluster method fordither array gen
eration" Robert Ulichney SPIE Vol,1913 として知ら
れている手法を利用することができる。ただし、これに
限らず、他のブルーノイズマスクの手法として知られて
いる方法も適用できる。
This blue noise mask method is described, for example, in "The Void & Cluster method fordither array gen.
The method known as "eration" Robert Ulichney SPIE Vol, 1913 can be used, but not limited to this, the method known as another blue noise mask method can also be applied.

【0023】本発明では、ブルーノイズマスクの手法を
用いて閾値が分布された閾値マトリックスを、誤差拡散
法に適用するものであり、この閾値マトリックスを用い
て誤差拡散法により2値化すると、まず、比較的小さい
サイズの誤差分配マトリックスを用いても、あるいは閾
値マトリックスに配置する閾値の種類が少なくても、画
質を劣化させる紋様の発生や濃度急変部(エッジ)にお
けるドットの偏りを防止する効果は、従来と同等以上と
なり、メモリ容量の不利を解消できるものとなった。
In the present invention, a threshold value matrix in which threshold values are distributed using the blue noise mask method is applied to the error diffusion method. When the threshold value matrix is used to perform binarization by the error diffusion method, first, , Even if an error distribution matrix of a relatively small size is used, or the number of types of threshold values arranged in the threshold value matrix is small, the effect of preventing the occurrence of patterns that deteriorate the image quality and the deviation of dots in the density sudden change portion (edge) Is equal to or more than the conventional one, and the disadvantage of memory capacity can be eliminated.

【0024】閾値マトリックスを構成している閾値は、
例えば2種類であっても十分に、画質を高く維持するこ
とができる。このように閾値が少なければ、その種類を
識別する小さい数値のみ(例えば、0,1の1ビットか
らなる数値)を閾値マトリックスとしてメモリに記憶し
ておけば良いので、メモリが節約できる。実際に閾値と
して使用する場合は、識別値からテーブルの参照等によ
り復元して用いれば良い。
The thresholds forming the threshold matrix are
For example, even if there are two types, the image quality can be maintained sufficiently high. If the threshold value is small in this way, only a small numerical value for identifying the type (for example, a numerical value consisting of 1 bit of 0 and 1) may be stored in the memory as a threshold matrix, so that the memory can be saved. When it is actually used as a threshold value, it may be restored from the identification value by referring to a table or the like and used.

【0025】このような、2種類の数値で構成されてい
る閾値マトリックスを、ブルーノイズマスクの手法で作
成するには、例えば、前述した"The Void & Cluster me
thodfor dither array generation" Robert Ulichney S
PIE Vol,1913 の内、IBP(Initial Binary Patter
n)と呼ばれる2値画の作成手順を用いれば良い。2種
類の閾値からなる閾値マトリックスは、3種類以上の閾
値からなる閾値マトリックスに比較して、作成も極めて
迅速で効率的にできる。すなわち、3種類以上の閾値か
らなる閾値マトリックスを作成する場合は、2種類の閾
値からなる閾値マトリックス(すなわち、IBP:Init
ial Binary Pattern)を作成した後に、このIBPに基
づいて作成してゆく手法を行っているからである。
To create such a threshold matrix composed of two kinds of numerical values by the method of the blue noise mask, for example, the above-mentioned "The Void & Cluster me.
thodfor dither array generation "Robert Ulichney S
IBP (Initial Binary Patter) among PIE Vol, 1913
A binary image creation procedure called n) may be used. The threshold matrix composed of two kinds of thresholds can be created extremely quickly and efficiently as compared with the threshold matrix composed of three or more kinds of thresholds. That is, when creating a threshold matrix composed of three or more kinds of thresholds, a threshold matrix composed of two kinds of thresholds (that is, IBP: Init
This is because the method of creating based on this IBP is performed after creating the ial binary pattern).

【0026】前記ブルーノイズマスクの手法による前記
閾値マトリックスの閾値の配置方法としては、例えば、
前記配置方法にて得られた閾値マトリックスに対して、
前記2種類の2値のいずれかの値の所定個数を、同じ値
の密度がほぼ均一になるようにする配置方法にて行われ
る。
As a method of arranging the thresholds of the threshold matrix by the method of the blue noise mask, for example,
For the threshold matrix obtained by the arrangement method,
A predetermined number of the two types of binary values are arranged in such a manner that the densities of the same values are substantially uniform.

【0027】更に、具体的には、前記ブルーノイズマス
クの手法として、前記2種類の閾値をランダムに配置し
たマトリックスの各値について、その周辺の同一値の期
待濃度を求め、期待濃度の最大となる位置の一方の値を
期待濃度の最大となる位置の他方の値と入れ替える処理
を所定の値分布状態になるまで繰り返すことにより前記
閾値マトリックスを得るようにしても良い。
More specifically, as the method of the blue noise mask, for each value of the matrix in which the two types of threshold values are randomly arranged, the expected density of the same value around it is calculated, and the maximum expected density is obtained. The threshold matrix may be obtained by repeating the process of replacing one value at one of the positions with the other value at the position with the maximum expected density until a predetermined value distribution state is achieved.

【0028】前記閾値マトリックスとして、前述のブル
ーノイズマスクの手法にて得られた閾値マトリックスに
対して、前記2種類の閾値のうち個数の少ない方の閾値
について、該個数の少ない方の閾値が密に集まる部分の
該個数の少ない方の閾値を個数の多い方の閾値に置き換
え、該要素位置に、置き換える前の前記個数の少ない方
の閾値の存在数を閾値として与えることを繰り返す処
理、および、前記個数の少ない方の閾値が疎に散る部分
の前記個数の多い方の閾値の要素位置を前記個数の少な
い方の閾値に置き換え、該要素位置に、置き換えた後の
前記個数の少ない方の閾値の存在数を閾値として与える
ことを繰り返す処理、を行って得られた複数種類の閾値
からなる閾値マトリックスを用いて得られるものであっ
ても良い。この場合は、多数の閾値からなる閾値マトリ
ックスが生成する。なお、この多数の閾値は、後述する
識別値として扱っても良い。
As the threshold value matrix, with respect to the threshold value matrix obtained by the method of the blue noise mask described above, the smaller one of the two kinds of threshold values is the denser threshold value. A process of replacing the smaller number of thresholds of the part gathered in the above with a larger number of thresholds, and giving the element position the existing number of the smaller number of thresholds before replacement as a threshold, and Replacing the element position of the threshold value of the larger number of the portion where the threshold value of the smaller number is scattered sparsely with the threshold value of the smaller number, and replacing the element position with the threshold value of the smaller number after replacement May be obtained by using a threshold matrix composed of a plurality of types of threshold values obtained by performing a process of repeatedly giving the existing number of as a threshold value. In this case, a threshold matrix composed of many thresholds is generated. The many thresholds may be treated as identification values described later.

【0029】また、前述したブルーノイズマスクの手法
ではなく、次のような配置方法でも良い。すなわち、本
発明の閾値マトリックス誤差拡散法による2値化方法
は、入力画像の画素濃度と閾値との比較により中間調画
像を2値化する際に生じた誤差を周辺の画素の2値化に
反映させるに際して、前記閾値として、閾値が位置に応
じて設定されている閾値マトリックスから、前記画素位
置に応じて抽出された閾値を用いる閾値マトリックス誤
差拡散法による2値化方法であって、前記閾値マトリッ
クスの閾値の配置が、均一濃度画素マトリックスを、画
素濃度と閾値との比較により2値化する際に生じた誤差
を周辺の画素の2値化に反映させて2値化する誤差拡散
を行い、得られた2値化マトリックスの2値にそれぞれ
2種類の閾値を対応させてなる配置方法にて行われるこ
とを特徴とする。
Further, instead of the blue noise mask method described above, the following arrangement method may be used. That is, according to the binarization method by the threshold value matrix error diffusion method of the present invention, the error generated when binarizing the halftone image by comparing the pixel density of the input image with the threshold value is converted into the binarization of the peripheral pixels. In reflecting, the threshold value is a binarization method by a threshold matrix error diffusion method using a threshold value extracted according to the pixel position from a threshold value matrix set according to the position, The arrangement of the thresholds of the matrix performs error diffusion by binarizing an error that occurs when binarizing the uniform density pixel matrix by comparing the pixel density and the threshold to the binarization of surrounding pixels. , And the binarization matrix thus obtained is associated with two kinds of thresholds, respectively, by an arranging method.

【0030】この手法は、閾値マトリックスにおいて、
ブルーノイズマスクとは別個の手法で、好ましい閾値の
配置特性を実現するものであり、同様に、比較的小さい
サイズの誤差分配マトリックスを用いても、あるいは閾
値マトリックスに配置する閾値の種類が少なくても、画
質を劣化させる紋様の発生や濃度急変部(エッジ)にお
けるドットの偏りを防止する効果は、従来と同等以上と
なり、メモリ容量の不利を解消できるものとなる。
This technique is as follows:
A method different from the blue noise mask is used to realize preferable threshold placement characteristics. Similarly, even if a relatively small size error distribution matrix is used, or the number of thresholds placed in the threshold matrix is small. However, the effect of preventing the generation of a pattern that deteriorates the image quality and the deviation of the dots in the density abrupt change portion (edge) is equal to or more than the conventional one, and the disadvantage of the memory capacity can be eliminated.

【0031】更に、このような誤差拡散により2値を配
置させた閾値マトリックスに対して、前述したブルーノ
イズマスクの手法である、2種類の2値のいずれかの値
の所定個数を、同じ値の密度がほぼ均一になるようにす
る配置方法を実行しても良い。具体的には、閾値マトリ
ックスとして、前記誤差拡散により2値を配置させた閾
値マトリックスの各値について、その周辺の同一値の期
待濃度を求め、期待濃度の最大となる位置の一方の値を
期待濃度の最大となる位置の他方の値と入れ替える処理
を所定の値分布状態になるまで繰り返すことにより得ら
れたマトリックスを用いても良い。
Further, with respect to the threshold value matrix in which the two values are arranged by such error diffusion, the predetermined number of any one of the two kinds of binary values, which is the method of the blue noise mask described above, is set to the same value. It is also possible to execute an arrangement method that makes the densities of the two substantially uniform. Specifically, as a threshold value matrix, for each value of the threshold value matrix in which two values are arranged by the error diffusion, the expected density of the same value around it is obtained, and one value at the position where the expected density becomes maximum is expected. A matrix obtained by repeating the process of replacing with the other value at the position of maximum density until a predetermined value distribution state is obtained may be used.

【0032】異なる濃度の均一濃度画素マトリックスに
て既に2値化された2値化マトリックスの2値化状態を
参照しつつ、均一濃度画素マトリックスの各画素を、画
素濃度と閾値との比較により2値化する際に生じた誤差
を周辺の画素の2値化に反映させて2値化する誤差拡散
法を繰り返し、この繰り返しにより得られた、所望濃度
の均一濃度画素マトリックスによる2値化マトリックス
の2値に、それぞれ2種類の閾値を対応させる配置方法
でも良い。
By referring to the binarized state of the binarized matrix which has already been binarized with the uniform density pixel matrix of different densities, each pixel of the uniform density pixel matrix is compared with the threshold value by comparing the pixel density with the threshold value. The error diffusion method of binarizing by reflecting the error generated at the time of binarization in the binarization of the surrounding pixels is repeated, and the binarization matrix of the uniform density pixel matrix of the desired density obtained by this repetition is created. An arrangement method may be used in which two kinds of threshold values are associated with two values.

【0033】このように他の均一濃度画素マトリックス
の2値化結果を考慮して、目的とする濃度の均一濃度画
素マトリックスを2値化すると、2値の分布が適当とな
り、比較的小さいサイズの誤差分配マトリックスを用い
ても、あるいは閾値マトリックスに配置する閾値の種類
が少なくても、画質を劣化させる紋様の発生や濃度急変
部(エッジ)におけるドットの偏りを防止する効果は、
従来と同等以上となり、メモリ容量の不利を解消できる
ものとなる。
When the uniform density pixel matrix of the target density is binarized in consideration of the binarization result of other uniform density pixel matrices in this way, the binary distribution becomes appropriate, and the binary distribution of a relatively small size is achieved. Even if the error distribution matrix is used or the number of types of threshold values arranged in the threshold value matrix is small, the effect of preventing the occurrence of a pattern that deteriorates the image quality and the deviation of dots in the sudden density change portion (edge) is
It becomes equal to or more than the conventional one, and the disadvantage of the memory capacity can be eliminated.

【0034】また、2値ばかりでなく、3値以上の多値
の閾値マトリックスを次のように作成しても良い。すな
わち、異なる濃度の均一濃度画素マトリックスにて既に
2値化された2値化マトリックスの2値化状態を参照し
つつ、均一濃度画素マトリックスの各画素を、画素濃度
と閾値との比較により2値化する際に生じた誤差を周辺
の画素の2値化に反映させて2値化する誤差拡散法を繰
り返し、この繰り返しにより得られた2値化マトリック
スのすべてについて同一位置の要素毎に2値を集積し、
この集積結果に基づいて、前記閾値マトリックスにおけ
る各要素の閾値を設定しても良い。
Further, not only binary values but also multi-valued threshold value matrices of three or more values may be created as follows. That is, each pixel of the uniform density pixel matrix is binarized by comparing the pixel density with a threshold value while referring to the binarized state of the binarized matrix already binarized with the uniform density pixel matrix of different densities. The error diffusion method of binarizing by reflecting the error generated at the time of binarization in the surrounding pixels is repeated, and binarization is performed for each element at the same position for all binarization matrices obtained by this repetition. Collect
The threshold value of each element in the threshold matrix may be set based on the result of the accumulation.

【0035】このような2値化マトリックスの集積によ
り、マトリックスには集積数に応じた数の種類が生じ、
それぞれに閾値を対応させれば、3値以上の閾値マトリ
ックスが作成できる。また、2値化状態の参照が、2値
化処理しようとする均一濃度画素マトリックスに最も近
い濃度の均一濃度画素マトリックスの2値化状態を参照
することによりなされても良い。
By accumulating such a binary matrix, a number of types corresponding to the number of accumulations are generated in the matrix,
A threshold matrix of three or more values can be created by associating each with a threshold value. Further, the reference of the binarized state may be made by referring to the binarized state of the uniform density pixel matrix having the density closest to the uniform density pixel matrix to be binarized.

【0036】更に具体的には、2値化状態の参照が、2
値化処理しようとする均一濃度画素マトリックスに最も
近い濃度の均一濃度画素マトリックスによる2値化マト
リックスの要素の内、「1」であるの要素と同じ位置は
必ず「1」に2値化することにより行われても良い。
More specifically, the reference of the binarized state is 2
Of the elements of the binarization matrix by the uniform density pixel matrix of the density closest to the uniform density pixel matrix to be binarized, the same position as the element of "1" must be binarized to "1". May be done by.

【0037】この場合、最初に、前記所定範囲において
設定された複数の濃度値の内の最小値を全要素の濃度値
とする均一濃度画素マトリックスについて、前記誤差拡
散法にて各要素の濃度値を「1」または「0」のいずれ
かに2値化し、その後、他の濃度値の均一濃度画素マト
リックスを2値化することとしても良い。
In this case, first, with respect to the uniform density pixel matrix in which the minimum value of the plurality of density values set in the predetermined range is the density value of all elements, the density value of each element is calculated by the error diffusion method. May be binarized to "1" or "0", and then the uniform density pixel matrix of other density values may be binarized.

【0038】あるいは、最初に、前記所定範囲において
設定された複数の濃度値の内の最大値を全要素の濃度値
とする均一濃度画素マトリックスについて、前記誤差拡
散法にて各要素の濃度値を「1」または「0」のいずれ
かに2値化し、その後、他の濃度値の均一濃度画素マト
リックスを2値化するようにしても良い。
Alternatively, first, with respect to the uniform density pixel matrix in which the maximum value of the plurality of density values set in the predetermined range is the density value of all the elements, the density value of each element is calculated by the error diffusion method. It is also possible to binarize either "1" or "0" and then binarize the uniform density pixel matrix of other density values.

【0039】また、2値化状態の参照が、2値化処理し
ようとする均一濃度画素マトリックスに、濃度が低い側
および濃度が高い側にそれぞれ最も近い濃度の均一濃度
画素マトリックスの2値化状態を参照することとしても
良い。この場合、最初に、前記所定範囲において設定さ
れた複数の濃度値の内の最大値および最小値をそれぞれ
全要素の濃度値とする2つの均一濃度画素マトリックス
について、前記誤差拡散法にて各要素の濃度値を「1」
または「0」のいずれかに2値化し、その後、他の濃度
値の均一濃度画素マトリックスを2値化することとして
も良い。
Further, the reference of the binarized state is the binarized state of the uniform density pixel matrix whose density is respectively closest to the low density side and the high density side of the uniform density pixel matrix to be binarized. May be referred to. In this case, first, for each of the two uniform density pixel matrices in which the maximum value and the minimum value of the plurality of density values set in the predetermined range are the density values of all elements, each element is calculated by the error diffusion method. Concentration value of "1"
Alternatively, it may be binarized to one of “0”, and then binarized the uniform density pixel matrix of other density values.

【0040】具体的には、濃度が高い側の2値化マトリ
ックスにおいて「1」となり、かつ濃度が低い側の2値
化マトリックスにおいても「1」となっている要素位置
と同じ位置は必ず「1」とし、濃度が高い側の2値化マ
トリックスにおいて「0」となり、かつ濃度が低い側の
2値化マトリックスにおいても「0」となっている要素
位置と同じ位置は必ず「0」として誤差拡散処理するこ
とにより2値化することとしても良い。
Specifically, the same position as the element position that is "1" in the binarization matrix on the high density side and "1" in the binarization matrix on the low density side is always " 1 ”, which is“ 0 ”in the binarization matrix on the high density side, and“ 0 ”in the binarization matrix on the low density side. It may be binarized by diffusion processing.

【0041】2値化マトリックスもそのまま全て用いる
のではなく、最終的に得られた2値化マトリックスの一
部分を構成するマトリックスの2値にそれぞれ2種類の
閾値を対応させてなる配置方法にて行われても良い。こ
のようにすると、濃度急変部(エッジ)におけるドット
の偏りを防止する効果は、より一層、高いものとなる。
The binarization matrix is not entirely used as it is, but the binarization matrix obtained by a part of the binarization matrix finally obtained is associated with two kinds of threshold values. You may be broken. By doing so, the effect of preventing the deviation of the dots in the density abruptly changing portion (edge) is further enhanced.

【0042】なお、閾値マトリックスの記憶に際して
は、閾値の代りに、該閾値の種類を識別するための、該
閾値よりも記憶容量が小さい識別値にて記憶され、閾値
マトリックスの使用に際しては、該当する要素位置から
読み出された前記識別値から対応する閾値を形成して使
用することとしても良い。
When storing the threshold value matrix, instead of the threshold value, an identification value for discriminating the type of the threshold value and having a storage capacity smaller than the threshold value is stored. It is also possible to form a corresponding threshold value from the identification value read from the element position to be used.

【0043】例えば、実際に用いられる2値が「64」
と「192」である場合、この値を「0」と「1」でそ
れぞれ表して、閾値マトリックスとして記憶しておき、
「0」の識別値が使用される場合は、閾値として「6
4」を用い、「1」の識別値が使用される場合は、閾値
として「192」を用いるようにすれば良い。「64」
と「192」とからなる閾値マトリックスと同等に使用
できる。このように実際の閾値よりも小さい識別値で記
憶することにより、メモリ容量の不利を一層解消でき
る。また、このように識別値であれば、「64」、「1
92」の組み合わせのみでなく、他の値に対応させるこ
ともできることから、一つの閾値マトリックスが、複数
種類の閾値マトリックスに対応することになり、更に一
層メモリ容量の不利を解消できる。
For example, the binary value actually used is "64".
And “192”, this value is represented by “0” and “1” respectively and stored as a threshold matrix,
When the identification value of “0” is used, the threshold value of “6” is used.
When "4" is used and the identification value of "1" is used, "192" may be used as the threshold value. "64"
And a threshold matrix of "192". By storing the identification value smaller than the actual threshold value in this way, the disadvantage of the memory capacity can be further eliminated. Further, if the identification value is in this way, "64", "1"
Since it is possible to correspond not only to the combination of "92" but also to other values, one threshold matrix corresponds to a plurality of types of threshold matrices, and the disadvantage of the memory capacity can be further eliminated.

【0044】また、閾値マトリックスの記憶に際して
は、閾値の代りに、該閾値の種類を識別するための識別
値として記憶し、この識別値を、マトリックスの配置で
はなく、その要素位置とともに値順に配置されたテーブ
ルとして記憶しておき、閾値マトリックスの使用に際し
ては、必要な閾値の種類数に応じて、前記テーブルを分
割して、各分割された識別値に対して、該当する要素位
置にそれぞれ閾値を対応させて使用することとしても良
い。
Further, when storing the threshold matrix, instead of the threshold value, it is stored as an identification value for identifying the type of the threshold value, and the identification value is arranged not in the matrix but in the order of values along with the element position. Stored as a table, and when the threshold matrix is used, the table is divided according to the number of types of thresholds required, and the threshold is assigned to the corresponding element position for each divided identification value. May be used in association with each other.

【0045】このようにすると、閾値の値のみでなく、
閾値の種類数をも任意に変更することが容易となり、目
的に適合させて柔軟に閾値マトリックスの閾値を調整す
ることが容易にできる。なお、このような閾値マトリッ
クス誤差拡散法による2値化方法を実行する機能は、例
えば、コンピュータシステム側で起動するプログラムと
して備えられる。このようなプログラムの場合、例え
ば、フロッピーディスク、光磁気ディスク、CD−RO
M等の記憶媒体に記憶し、必要に応じてコンピュータシ
ステムにロードして起動することにより用いることがで
きる。この他、ROMやバックアップRAMを記憶媒体
として前記プログラムを記憶しておき、このROMある
いはバックアップRAMをコンピュータシステムに組み
込んで用いても良い。
In this way, not only the threshold value but
It is easy to arbitrarily change the number of types of thresholds, and it is possible to easily adjust the thresholds of the threshold matrix flexibly according to the purpose. The function of executing the binarization method based on the threshold matrix error diffusion method is provided as a program activated on the computer system side, for example. In the case of such a program, for example, a floppy disk, a magneto-optical disk, a CD-RO
It can be used by storing it in a storage medium such as M, loading it into a computer system and activating it as necessary. In addition, the program may be stored by using a ROM or a backup RAM as a storage medium, and the ROM or the backup RAM may be incorporated into a computer system for use.

【0046】[0046]

【発明の実施の形態】[実施の形態1] 図1は、上述した発明のいくつかの閾値マトリックス誤
差拡散法による2値化方法が適用された中間調画像デー
タ2値化装置2の概略構成を表すブロック図である。
BEST MODE FOR CARRYING OUT THE INVENTION [First Embodiment] FIG. 1 is a schematic configuration of a halftone image data binarizing apparatus 2 to which a binarizing method by some threshold matrix error diffusion methods of the above-described invention is applied. It is a block diagram showing.

【0047】この中間調画像データ2値化装置2は、コ
ンピュータを主体として構成され、CPU12、ROM
からなるプログラム記憶部13、RAMからなる閾値マ
トリックス記憶部14、RAMからなる誤差分配マトリ
ックス記憶部15、RAMからなる誤差バッファ16、
RAMからなる入力画像データ記憶部17、RAMから
なる出力画像データ記憶部18およびRAMからなる作
業用メモリ19を備えて、これらがバス20により接続
されて、制御信号やデータ信号を交換可能としている。
The halftone image data binarization device 2 is mainly composed of a computer, and has a CPU 12 and a ROM.
A program storage unit 13 composed of a RAM, a threshold matrix storage unit 14 composed of a RAM, an error distribution matrix storage unit 15 composed of a RAM, an error buffer 16 composed of a RAM,
An input image data storage unit 17 composed of a RAM, an output image data storage unit 18 composed of a RAM, and a work memory 19 composed of a RAM are provided, and these are connected by a bus 20 so that control signals and data signals can be exchanged. .

【0048】また、中間調画像データ2値化装置2は、
これ以外に、バス20を介して、コンピュータとして必
要なキーボード21やディスプレイ22等の入出力装
置、ハードディスクやフロッピーディスクドライブ等の
外部記憶装置23およびカラープリンタ24が接続され
ている。
Further, the halftone image data binarization device 2 is
In addition to this, an input / output device such as a keyboard 21 and a display 22 required for a computer, an external storage device 23 such as a hard disk and a floppy disk drive, and a color printer 24 are connected via a bus 20.

【0049】プログラム記憶部13には、コンピュータ
として必要な基本的なプログラム、後述する閾値マトリ
ックス作成処理プログラム、後述する閾値マトリックス
誤差拡散処理プログラム、およびその他の処理のプログ
ラムが格納され、必要に応じてCPU12により実行さ
れる。なお、外部記憶装置23を介して、前記各種プロ
グラムが記憶されたフロッピーディスク、光磁気ディス
ク、CD−ROM等の記憶媒体から、必要に応じて作業
用メモリ19に読み込んで起動することにより実行して
も良い。
The program storage unit 13 stores a basic program necessary for a computer, a threshold matrix creation processing program, which will be described later, a threshold matrix error diffusion processing program, which will be described later, and other processing programs. It is executed by the CPU 12. It should be noted that the program is executed by loading the program into the work memory 19 from the storage medium such as a floppy disk, a magneto-optical disk, a CD-ROM or the like in which the various programs are stored via the external storage device 23 and starting the program. May be.

【0050】閾値マトリックス記憶部14は後述するご
とく、閾値マトリックス生成処理により生成された閾値
マトリックスを記憶するためである。この閾値マトリッ
クスは、2種類の識別値がブルーノイズマスクの手法に
よりあるいは類似の手法により分布されているマトリッ
クスとして記憶されている。
The threshold matrix storage unit 14 is for storing the threshold matrix generated by the threshold matrix generation processing as described later. This threshold matrix is stored as a matrix in which two types of identification values are distributed by the blue noise mask method or a similar method.

【0051】誤差分配マトリックス記憶部15は、誤差
拡散法により算出された出力濃度値と元の濃度値との誤
差を、誤差バッファ16内の周辺画素に分配する際に、
分配対象となる周辺画素およびその分配率を誤差分配マ
トリックスとして記憶している。
The error distribution matrix storage unit 15 distributes the error between the output density value calculated by the error diffusion method and the original density value to the peripheral pixels in the error buffer 16,
The peripheral pixels to be distributed and the distribution rate thereof are stored as an error distribution matrix.

【0052】誤差バッファ16は、誤差の分配対象とな
る画素毎に分配される誤差を蓄積している。入力画像デ
ータ記憶部17は外部記憶装置23等から導入された中
間調画像データを記憶している。出力画像データ記憶部
18は、入力画像データ記憶部17に記憶されている中
間調画像データを閾値マトリックス誤差拡散処理により
2値化して得られた擬似中間調画像データを記憶するも
のである。なお、必要に応じてこの擬似中間調画像デー
タは、ディスプレイ22に表示されたり、カラープリン
タ24により記録される。
The error buffer 16 stores the error distributed for each pixel to which the error is distributed. The input image data storage unit 17 stores halftone image data introduced from the external storage device 23 or the like. The output image data storage unit 18 stores pseudo-halftone image data obtained by binarizing the halftone image data stored in the input image data storage unit 17 by the threshold matrix error diffusion processing. The pseudo halftone image data is displayed on the display 22 or recorded by the color printer 24, if necessary.

【0053】次に、CPU12にて実行される図2のフ
ローチャートに示す閾値マトリックス生成処理について
説明する。この処理はブルーノイズマスクの手法の一つ
を用いて閾値マトリックスを生成している。処理が開始
されると、まず、閾値マトリックスとして必要な大きさ
M×Nのマトリックス格納用のメモリが作業用メモリ1
9に準備され、各要素値J(x,y)に「0」と「1」
とのいずれかの値をランダムに配置する(S100)。
このランダムな配置は例えば乱数の発生により決定すれ
ば良い。
Next, the threshold matrix generating process shown in the flowchart of FIG. 2 executed by the CPU 12 will be described. This process uses one of the blue noise mask techniques to generate a threshold matrix. When the processing is started, first, the matrix storage memory of size M × N required as the threshold matrix is the work memory 1
9 is prepared, and "0" and "1" are added to each element value J (x, y).
Any of the above values is randomly arranged (S100).
This random arrangement may be determined by generating a random number, for example.

【0054】次に、このように1/0がランダムに配置
されているマトリックスの各要素位置(x,y)につい
て、その期待濃度D(x,y)を算出する(S11
0)。この期待濃度D(x,y)は次のようにして算出
される。要素(x,y)に隣接する要素(x−Δx,y
−Δy)に与えられた要素値J(x−Δx,y−Δy)
と、別に定める重み関数f(Δx,Δy)とに基づい
て、下記式5に従い期待濃度D(x,y)を算出する。
Next, the expected density D (x, y) is calculated for each element position (x, y) of the matrix in which 1/0 is randomly arranged in this way (S11).
0). The expected density D (x, y) is calculated as follows. Element (x-Δx, y) adjacent to element (x, y)
Element value J (x-Δx, y-Δy) given to −Δy)
And the weighting function f (Δx, Δy) separately determined, the expected concentration D (x, y) is calculated according to the following equation 5.

【0055】[0055]

【数5】 [Equation 5]

【0056】ここで、−i≦Δx≦i、−j≦Δy≦j
であり、0<i<M、0<j<Nである。ABS[]は
[]内の絶対値を求める関数である。「majority valu
e」は前述のステップS100にてランダムに配置した
0/1の値内で、数が多い方の値である。逆に数が少な
い方の値は「minority value」で表す。重み関数f(Δ
x,Δy)は、距離に応じて小さくなる重み値を算出す
る関数であり、種々の関数が使用できるが、例えば、次
式6のような関数を挙げることができる。
Here, -i≤Δx≤i, -j≤Δy≤j
And 0 <i <M and 0 <j <N. ABS [] is a function for obtaining an absolute value in []. "Majority valu
“E” is the value with the larger number within the value of 0/1 randomly arranged in step S100 described above. Conversely, the value with the smaller number is represented by "minority value". Weighting function f (Δ
x, Δy) is a function for calculating a weight value that becomes smaller according to the distance, and various functions can be used. For example, a function such as the following Expression 6 can be given.

【0057】[0057]

【数6】 [Equation 6]

【0058】ここで「∧2」は二乗を表し、d∧2=Δx
∧2+Δy∧2である。また、「S」は調整用の係数であ
り、例えば「1.5」である。ここでのマトリックスは
M×N要素からなる限られた領域のパターンであるた
め、要素位置がマトリックスの周辺近傍に位置する場合
には、図3に示すように、参照すべき近傍の要素がマト
リックスの領域外に存在する場合がある。この場合、マ
トリックスは縦横に繰り返すパターンであると想定する
ことができる。
Here, “∧2” represents the square, and d∧2 = Δx
∧2 + Δy∧2. Further, “S” is a coefficient for adjustment, and is “1.5”, for example. Since the matrix here is a pattern of a limited area consisting of M × N elements, when the element positions are located near the periphery of the matrix, as shown in FIG. May exist outside the area. In this case, the matrix can be assumed to be a pattern that repeats vertically and horizontally.

【0059】すなわち、期待濃度D(x,y)を算出す
るために参照すべき近傍の要素がマトリックスの領域外
にあるときは図3に示したエリアA1,A2,A3を近
傍要素として参照する。このようにして全要素の期待濃
度D(x,y)を算出した後に、要素値J(x,y)=
1である要素の内で最大の要素位置を(xmax,ymax)
とし、要素値J(x,y)=0である要素の内で最小の
要素位置を(xmin,ymin)とする(S120)。
That is, when the neighboring elements to be referred to in order to calculate the expected density D (x, y) are outside the matrix area, the areas A1, A2 and A3 shown in FIG. 3 are referred to as neighboring elements. . After calculating the expected densities D (x, y) of all the elements in this way, the element value J (x, y) =
The maximum element position among the elements that are 1 is (xmax, ymax)
Then, the minimum element position among the elements having the element value J (x, y) = 0 is set to (xmin, ymin) (S120).

【0060】次に、(xmax,ymax)の要素の値と(x
min,ymin)の要素の値とを入れ替える(S130)。
すなわち、J(xmax,ymax)=0とし、J(xmin,
ymin)=1とする。次に、所定の評価により、マトリ
ックス中に0/1の値が均一に分散されているか否かが
判定される(S140)。この評価は、ディスプレイ2
2やカラープリンタ24にてマトリックスを視覚的に表
現することにより、観察により人が主観的に判断しても
良いし、CPU12による次の処理により客観的に行っ
ても良い。
Next, the value of the element of (xmax, ymax) and (x
min, ymin) and the element values are replaced (S130).
That is, J (xmax, ymax) = 0 and J (xmin,
ymin) = 1. Next, it is determined by a predetermined evaluation whether or not the values of 0/1 are uniformly dispersed in the matrix (S140). This evaluation is for display 2
2 or the color printer 24 may visually represent the matrix to make a subjective judgment by observation, or objectively by the following processing by the CPU 12.

【0061】すなわち、ステップS110と同じ処理を
再度行って、全要素について期待濃度D(x,y)を算
出する。そして、要素値J(x,y)=minority value
である要素の内で期待濃度D(x,y)が最大となる期
待濃度Dmaxを求める。更に、要素値J(x,y)=maj
ority valueである要素の内で期待濃度D(x,y)が
最小となる期待濃度Dminを求める。次にDmaxとDmin
との差(Dmax−Dmin)として評価値Evaが求められ
る。この評価値EvaはステップS120,S130の処
理を繰り返す毎に減少し、次第に0に近づくが、評価値
Eva>0にて平衡状態となる。
That is, the same processing as in step S110 is performed again to calculate the expected density D (x, y) for all the elements. Then, the element value J (x, y) = minority value
The expected density Dmax that maximizes the expected density D (x, y) among the elements Furthermore, the element value J (x, y) = maj
The expected density Dmin that minimizes the expected density D (x, y) among the elements having the ority value is obtained. Next, Dmax and Dmin
The evaluation value Eva is obtained as the difference (Dmax-Dmin) from The evaluation value Eva decreases every time the processes of steps S120 and S130 are repeated, and gradually approaches 0, but when the evaluation value Eva> 0, the equilibrium state is reached.

【0062】この平衡状態に達したと判定したときに、
マトリックス中に0/1の値が均一に分散されていると
判定し、平衡に達していないときは均一に分散されてい
ないと判定する。このような判定にて、ステップS14
0にて均一に分散されていないと判定された場合(S1
40で「NO」)、再度、ステップS110〜S130
を繰り返し、再度、ステップS140の判定を行う。な
お、ステップS140の判定で、ステップS110と同
じ処理を行った場合は、ステップS140の直後にステ
ップS110を実行する必要はなく、ステップS12
0,S130のみ繰り返せば良い。
When it is determined that this equilibrium state has been reached,
It is determined that 0/1 values are uniformly dispersed in the matrix, and when the equilibrium is not reached, it is determined that they are not uniformly dispersed. With such a determination, step S14
When it is determined that the particles are not uniformly dispersed at 0 (S1
"NO" in 40), and again, steps S110 to S130
Is repeated, and the determination in step S140 is performed again. When the same process as step S110 is performed in the determination of step S140, it is not necessary to execute step S110 immediately after step S140, and step S12 is performed.
Only 0 and S130 should be repeated.

【0063】ステップS140にて均一に分散されてい
ると判定された場合(S140で「YES」)は、0/
1の2値で表される閾値マトリックスが完成したので、
閾値マトリックス記憶部14に記憶し(S150)、閾
値マトリックス生成処理を終了する。
If it is determined in step S140 that the particles are uniformly dispersed ("YES" in step S140), 0 /
Since the threshold matrix represented by the binary value of 1 is completed,
It is stored in the threshold matrix storage unit 14 (S150), and the threshold matrix generation process ends.

【0064】この結果、生成した2値閾値マトリックス
(100×100要素)の例を図4に示す。また、12
8×128要素の2値閾値マトリックスの例を図5に示
す。図4,5においては白ドットが「0」の要素、黒ド
ットが「1」の要素を表している。
As a result, an example of the generated binary threshold matrix (100 × 100 elements) is shown in FIG. Also, 12
An example of a binary threshold matrix of 8 × 128 elements is shown in FIG. 4 and 5, white dots represent elements of "0" and black dots represent elements of "1".

【0065】次に、前述した閾値マトリックス生成処理
にて形成された閾値マトリックスを用いてCPU12に
て実行される、閾値マトリックス誤差拡散処理を、図6
のフローチャートにより説明する。この処理は、入力画
像データ記憶部17に格納されている中間調画像を2値
化して擬似中間調画像を作成するために行われる。
Next, the threshold matrix error diffusion processing executed by the CPU 12 using the threshold matrix formed in the threshold matrix generation processing described above will be described with reference to FIG.
The flowchart will be described. This processing is performed in order to binarize the halftone image stored in the input image data storage unit 17 to create a pseudo halftone image.

【0066】閾値マトリックス誤差拡散処理が開始され
ると、誤差バッファ16を0に初期化すると共に、以下
の手順を実行する。まず、2値化処理する画素の位置を
判別するための変数x,yを0に初期化する(S21
0,S220)。尚、変数x,yで示される画素のこと
を注目画素と呼ぶことにする。
When the threshold matrix error diffusion process is started, the error buffer 16 is initialized to 0 and the following procedure is executed. First, variables x and y for discriminating the position of a pixel to be binarized are initialized to 0 (S21).
0, S220). The pixel indicated by the variables x and y will be referred to as a target pixel.

【0067】画素位置(x,y)に対応する入力画像の
入力濃度I(0≦I≦255)を読み取る(S23
0)。次に、この注目画素に対応する2値化誤差値e
(x,y)を誤差バッファ16から読み取り、次式7の
ごとく2値化誤差値e(x,y)にて画素濃度Iを補正
して、補正濃度I′を求める(S240)。
The input density I (0≤I≤255) of the input image corresponding to the pixel position (x, y) is read (S23).
0). Next, the binarization error value e corresponding to this pixel of interest
(X, y) is read from the error buffer 16 and the pixel density I is corrected by the binarization error value e (x, y) as shown in the following expression 7 to obtain the corrected density I ′ (S240).

【0068】[0068]

【数7】 [Equation 7]

【0069】次に、閾値生成処理(S250)が行われ
る。すなわち、閾値マトリックス生成処理にて形成され
た閾値マトリックスは、0,1の値のみで表されてい
る。この0,1は閾値の種類を表すための識別値であ
り、実際には、画素の濃度範囲(ここでは0≦I≦25
5)に適合させて、予め決めてある適切な閾値をそれぞ
れ設定する必要がある。ここでは識別値「1」には閾値
「64」を、識別値「0」には閾値「192」を対応付
る。この対応関係は閾値マトリックス記憶部14に記憶
してある。
Next, a threshold value generation process (S250) is performed. That is, the threshold matrix formed by the threshold matrix generation process is represented only by the values of 0 and 1. These 0 and 1 are identification values for indicating the type of the threshold value, and actually, the density range of the pixel (here, 0 ≦ I ≦ 25
It is necessary to set appropriate threshold values that are determined in advance in conformity with 5). Here, the identification value "1" is associated with the threshold value "64", and the identification value "0" is associated with the threshold value "192". This correspondence is stored in the threshold matrix storage unit 14.

【0070】ステップS250では、この対応関係に基
づいて、図7のフローチャートに示すごとくの閾値生成
処理がなされる。まず、前述した閾値マトリックス生成
処理にて形成されている2値閾値マトリックスMat2
()から画素位置(x,y)に応じた要素位置(x%
M,y%N)から識別値tを次式8のごとく読み取る
(S252)。
In step S250, a threshold value generation process as shown in the flowchart of FIG. 7 is performed based on this correspondence. First, the binary threshold matrix Mat2 formed by the threshold matrix generation process described above.
From () to the element position (x%) corresponding to the pixel position (x, y)
The identification value t is read from (M, y% N) as in the following expression 8 (S252).

【0071】[0071]

【数8】 [Equation 8]

【0072】尚、Mat2()は、例えば、図5に示す
様な閾値マトリックス(M=128,N=128)であ
る。各要素には閾値0,1のいずれかが記憶されてい
る。また、前記式8の「%」は除算後の余を求める演算
子であり、「x%M」はxをMで割つた後の余りを示す
ものであり、「y%N」はyをNで割つた後の余りを示
すものである。すなわち、図5の閾値マトリックスを用
いた場合、x=200ならばx%128=72であり、
x=112ならばx%128=112となる。
Mat2 () is, for example, a threshold matrix (M = 128, N = 128) as shown in FIG. Either threshold 0 or 1 is stored in each element. In addition, “%” in the equation 8 is an operator for obtaining a remainder after division, “x% M” indicates a remainder after dividing x by M, and “y% N” is y. It shows the remainder after dividing by N. That is, using the threshold matrix of FIG. 5, if x = 200, then x% 128 = 72,
If x = 112, x% 128 = 112.

【0073】この手順で読み取る閾値は、図5の例に従
えば、x=0,y=0ならば、x%128=0,y%1
28=0なので、t=1(黒)であり、x=128,y
=129ならば、x%128=0,y%129=1なの
で、t=0(白)となる。この識別値tを判断し(S2
54)、t=1ならば、閾値Tとして「64」が設定さ
れ(S258)、t=0ならば閾値Tとして「192」
が設定される(S256)。
According to the example of FIG. 5, the threshold value read in this procedure is x% 128 = 0, y% 1 if x = 0 and y = 0.
Since 28 = 0, t = 1 (black) and x = 128, y
= 129, x% 128 = 0 and y% 129 = 1, so t = 0 (white). This discrimination value t is judged (S2
54), if t = 1, “64” is set as the threshold T (S258), and if t = 0, the threshold T is “192”.
Is set (S256).

【0074】こうして閾値生成処理が終了すると、次に
ステップS240にて求められた補正濃度I′とステッ
プS250で求められた閾値Tとが比較される(S26
0)。I′<Tであれば(S260で「YES」)、出
力濃度Oとして「0」に設定され(S270)、I′≧
Tであれば(S260で「NO」)、出力濃度Oとして
「1」が設定される(S280)。この出力濃度Oの値
は、出力画像データ記憶部18に2値化画像データとし
て順次蓄積される。
When the threshold value generation process is completed in this way, the corrected density I'determined in step S240 is compared with the threshold value T determined in step S250 (S26).
0). If I '<T ("YES" in S260), the output density O is set to "0" (S270), and I'≥
If T (“NO” in S260), “1” is set as the output density O (S280). The value of the output density O is sequentially stored in the output image data storage unit 18 as binarized image data.

【0075】次に、補正濃度I′と出力濃度Oとに基づ
いて2値化誤差値Eを次式9のごとく算出する(S29
0)。
Next, the binarization error value E is calculated based on the corrected density I'and the output density O as in the following equation 9 (S29).
0).

【0076】[0076]

【数9】 [Equation 9]

【0077】次に、予め設定した誤差分配マトリックス
Bmat()に基づいて、前記誤差値Eを、次式10に
示すごとく、2値化が未処理の周辺画素の誤差バッファ
eに分配する(S300)。
Next, based on the preset error distribution matrix Bmat (), the error value E is distributed to the error buffer e of unbinarized peripheral pixels as shown in the following equation (10) (S300). ).

【0078】[0078]

【数10】 [Equation 10]

【0079】尚、「+=」は既に誤差バッファe内に存
在する値と加算処理して同じ誤差バッファeに格納する
ことを示す演算子である。Bmat()の具体例は例え
ば図31に示す通りであり、i,jは注目画素位置をi
=j=0とし、図31に示すごとくの値をとる変数であ
る。
“+ =” Is an operator indicating that the value already existing in the error buffer e is added and stored in the same error buffer e. A specific example of Bmat () is as shown in FIG. 31, for example, where i and j are the target pixel position i
= J = 0, and is a variable that takes a value as shown in FIG.

【0080】Bmat()としては、、従来のものであ
る図34に示すBmat()よりも、サイズの小さいも
のを使用している。閾値マトリックスにブルーノイズ特
性を有するものを用いることで、このような従来のもの
より比較的小さなサイズのBmat()を使用しても十
分な画質が得られる。このような小さなサイズのBma
t()を用いれば、2値化の際の演算量が少なくて済む
ため、処理を高速に行える。勿論、従来のようなサイズ
のBmat()を用いれば、より良い画素が得られる。
As Bmat (), a smaller size is used than the conventional Bmat () shown in FIG. By using a threshold matrix having a blue noise characteristic, sufficient image quality can be obtained even if Bmat () having a relatively smaller size than the conventional one is used. Bma of such a small size
If t () is used, the amount of calculation at the time of binarization can be small, so that the processing can be performed at high speed. Of course, better pixels can be obtained by using Bmat () having a conventional size.

【0081】次に、主走査方向(x方向)の2値化処理
が終了したか否かを判定する(S310)。終了してい
なければ(S310で「NO」)、注目画素の主走査方
向の位置xを1つ増加させて(S320)、再度ステッ
プS230から処理を繰り返す。
Next, it is determined whether or not the binarization processing in the main scanning direction (x direction) is completed (S310). If not completed (“NO” in S310), the position x of the pixel of interest in the main scanning direction is incremented by 1 (S320), and the process is repeated from step S230.

【0082】主走査方向の2値化処理が終了したと判定
された場合(S310で「YES」)には、全画素の2
値化処理が終了したか否かを判定する(S330)。全
画素の処理が終了していなければ(S330で「N
O」)、注目画素の副走査方向の位置yを1つ増加させ
て(S340)、再度ステップS220から処理を繰り
返す。
When it is determined that the binarization processing in the main scanning direction is completed (“YES” in S310), 2 of all pixels are selected.
It is determined whether or not the value conversion process is completed (S330). If the processing for all pixels is not completed (“N” in S330,
O ”), the position y of the pixel of interest in the sub-scanning direction is incremented by 1 (S340), and the process is repeated from step S220.

【0083】全画素の2値化が終了していれば(S33
0で「YES」)、閾値マトリックス誤差拡散処理を終
了する。このときには、出力画像データ記憶部18内に
は、ステップS270またはステップS280にて設定
された出力濃度Oにて各画素が2値化された擬似中間調
画像データが形成されている。
If all the pixels have been binarized (S33)
If the answer is 0, “YES”), the threshold value matrix error diffusion process ends. At this time, pseudo halftone image data in which each pixel is binarized at the output density O set in step S270 or step S280 is formed in the output image data storage unit 18.

【0084】本実施の形態によれば、閾値マトリックス
として、従来のような規則的に多種類の閾値が配置され
たものでなく、ブルーノイズマスクの手法により得られ
た閾値マトリックスを用いて誤差拡散法により、中間調
画像を擬似中間調画像に2値化しているので、従来の作
成方法で作成された閾値マトリックスを用いた場合より
も、比較的小さいサイズの誤差分配マトリックスを用い
ても、擬似中間調画像において紋様の発生や濃度急変部
におけるドットの偏りを十分に防止できて、高い画質が
得られた。また、閾値マトリックス記憶部14が小さく
て済み、メモリ容量の不利を招かない。
According to the present embodiment, the threshold matrix is not one in which many kinds of thresholds are regularly arranged as in the prior art, but error diffusion is performed using a threshold matrix obtained by the blue noise mask method. Since the halftone image is binarized into the pseudo halftone image by the method, even if the error distribution matrix having a relatively small size is used, the pseudo halftone image is pseudo-valued as compared with the threshold matrix created by the conventional creation method. In the halftone image, it was possible to sufficiently prevent the generation of patterns and the unevenness of dots in the portion where the density changes abruptly, and high image quality was obtained. In addition, the threshold matrix storage unit 14 can be small, so that there is no disadvantage in memory capacity.

【0085】また、実際には、閾値は「64」や「19
2」といった8ビットで表さなくてはならない値で閾値
マトリックス記憶部14に記憶されているのではなく、
その識別値である「0」,「1」で記憶されているの
で、各要素を1ビットで表すことができ、その2値閾値
マトリックスも極めて小さいデータで済み。閾値マトリ
ックス記憶部14は非常に小さいメモリしか必要としな
い。
Further, in practice, the threshold values are "64" and "19".
Instead of being stored in the threshold matrix storage unit 14 as a value that must be represented by 8 bits such as “2”,
Since it is stored with the identification values "0" and "1", each element can be represented by 1 bit, and the binary threshold matrix thereof can be extremely small data. The threshold matrix storage 14 requires only a very small memory.

【0086】更に、このように識別値にて2値閾値マト
リックスが記憶されているので、前述した「64」や
「192」以外の値も、識別値に対応付けて閾値として
用いることができるので、複数の閾値マトリックスを記
憶しておく必要がなく、更に一層メモリが節約できると
ともに、画質調整の必要に応じて柔軟に閾値を変更で
き、中間調画像データの加工処理も効率的にできる。
Further, since the binary threshold matrix is stored as the identification value in this way, values other than "64" and "192" described above can also be used as threshold values in association with the identification value. Since it is not necessary to store a plurality of threshold matrices, the memory can be further saved, the thresholds can be flexibly changed according to the need for image quality adjustment, and the processing of halftone image data can be efficiently performed.

【0087】[実施の形態2] 次に、ブルーノイズマスク以外の手法による閾値マトリ
ックス作成処理について説明する。閾値マトリックス生
成処理のフローチャートを図8以下に示す。まず、全画
素が濃度値i=0である均一濃度画素マトリックスと、
全画素が濃度値i=255である均一濃度画素マトリッ
クスとを、誤差拡散法により2値化する(S410)。
この均一濃度画素マトリックスは、図10に示すごと
く、i=0,255の2種類の均一濃度画素マトリック
スD0,D255を作業用メモリ19に読み込んで用い
れば良い。そして、その2つの2値化マトリックスを作
業用メモリ19に保存する(S420)。
[Embodiment 2] Next, a threshold matrix creating process using a method other than the blue noise mask will be described. A flowchart of the threshold matrix generation process is shown in FIG. First, a uniform density pixel matrix in which all pixels have density values i = 0,
The uniform density pixel matrix in which all pixels have the density value i = 255 is binarized by the error diffusion method (S410).
As the uniform density pixel matrix, as shown in FIG. 10, two kinds of uniform density pixel matrices D0 and D255 in which i = 0 and 255 are read into the working memory 19 and used. Then, the two binary matrices are stored in the working memory 19 (S420).

【0088】ここでは誤差拡散法は、広い意味で用いて
おり、ある画素を2値化した場合に、2値化によって生
じた誤差を、未だ2値化していない周辺の画素の濃度に
分配する方法(狭い意味の誤差拡散法・文献:Robert
W.Floyd and Louis Steinberg,"An Adaptive Algorithm
for Spatial Greyscale",Proceeding of the S.I.D.Vo
l.17/2,1976等)、あるいは2値化する際に周辺に存在
する既に2値化した画素からその2値化の際に生じた誤
差の所定割合を受け取る方法(平均誤差最小法とも言
う。文献:J.F.Jarvis,C.N.Judice,and W.H.Ninke,"A S
urvey of Techniques for the Display of Continuous
Tone Pictures on Bilevel Displays",Computer Graphi
cs and Image Processing.5,13-40(1976)等)等が良く
知られているので、誤差拡散法自体の詳細な説明は省略
する。
Here, the error diffusion method is used in a broad sense, and when a certain pixel is binarized, the error generated by the binarization is distributed to the density of peripheral pixels which have not been binarized yet. Method (Narrowly defined error diffusion method / reference: Robert
W. Floyd and Louis Steinberg, "An Adaptive Algorithm
for Spatial Grayscale ", Proceeding of the SIDVo
l.17 / 2,1976, etc.), or a method of receiving a predetermined ratio of the error generated in the binarization from the already binarized pixels existing in the surroundings when binarizing (the average error minimum method is also used. Reference: JFJarvis, CNJudice, and WHNinke, "AS
survey of Techniques for the Display of Continuous
Tone Pictures on Bilevel Displays ", Computer Graphi
cs and Image Processing.5, 13-40 (1976), etc. are well known, so a detailed description of the error diffusion method itself will be omitted.

【0089】ステップS410にて行われる濃度値i=
0,255の均一濃度画素マトリックスの誤差拡散法に
よる2値化結果は、i=0の場合は全画素「0」(以下
「オフ」と称する。)、i=255の場合は全画素
「1」(以下「オン」と称する。)となるので、特に誤
差拡散法による計算はせずに、予め全画素がオフの2値
化マトリックスと全画素がオンの2値化マトリックスと
を備えておいて、これらのマトリックスを用いても良
い。
The density value i =
The binarization result of the uniform density pixel matrix of 0,255 by the error diffusion method is "0" for all the pixels when i = 0, and "1" for all the pixels when i = 255. (Hereinafter referred to as “on”), a binary matrix in which all pixels are off and a binary matrix in which all pixels are on are provided in advance without performing calculation by the error diffusion method. Therefore, these matrices may be used.

【0090】次に濃度値iに「1」を設定し(S43
0)、全画素が濃度値i=1の均一濃度画素マトリック
スに対して、図9に示す2値化処理を実行する(S44
0)。この均一濃度画素マトリックスは、図10に示し
たごとく、i=1〜254の254種類の均一濃度画素
マトリックスD1〜D254の必要なものを作業用メモ
リ19に読み込んで用いれば良い。
Next, "1" is set to the density value i (S43
0), the binarization processing shown in FIG. 9 is executed for the uniform density pixel matrix in which all pixels have the density value i = 1 (S44).
0). As the uniform density pixel matrix, as shown in FIG. 10, the necessary one of 254 kinds of uniform density pixel matrices D1 to D254 of i = 1 to 254 may be read into the working memory 19 and used.

【0091】図9の2値化処理について説明する。ま
ず、2値化済みの濃度値、すなわち既に2値化マトリッ
クスが求められている濃度値の内で、濃度値iを越えて
いて最も濃度値iに近い濃度値の均一濃度画素マトリッ
クスを2値化処理した2値化マトリックス(以下、「最
近上方2値化マトリックスH」と称する。)と、濃度値
i未満で最も濃度値iに近い濃度値の均一濃度画素マト
リックスを2値化処理した2値化マトリックス(以下、
「最近下方2値化マトリックスL」と称する。)とを作
業用メモリ19の内容から検索する(S442)。
The binarization processing of FIG. 9 will be described. First, a binarized density value, that is, among density values for which a binarization matrix has already been obtained, a uniform density pixel matrix that exceeds the density value i and is closest to the density value i is binarized. The binarized matrix that has been binarized (hereinafter referred to as the “most recently upper binarized matrix H”) and the uniform density pixel matrix whose density value is less than the density value i and closest to the density value i are binarized 2. Quantization matrix (below,
It is referred to as the "most recently lower binarization matrix L". ) And are searched from the contents of the work memory 19 (S442).

【0092】本実施の形態2では、i=1から順次、所
望の濃度まで処理して行くので、最近上方2値化マトリ
ックスHは、常にi=255の2値化マトリックスであ
り、最近下方2値化マトリックスLは、i−1の2値化
マトリックスである。ただし、ここでは、2値閾値マト
リックスとして、識別値0,1が50%づつとするの
で、所望の濃度としてはi=128であり、i=128
の処理で止める。
In the second embodiment, since the processing is carried out sequentially from i = 1 to a desired density, the nearest upper binarization matrix H is always a binarization matrix of i = 255, and the nearest bottom two. The binarization matrix L is a binarization matrix of i-1. However, in this case, since the identification values 0 and 1 are 50% each as the binary threshold matrix, the desired density is i = 128 and i = 128.
Stop with the process of.

【0093】次に、濃度値iの均一濃度画素マトリック
スについて、誤差拡散法により2値化し、2値化マトリ
ックスFiを作成する(S446)。ただし、ステップ
S446では、次の条件,の下に2値化される。
最近上方2値化マトリックスHと最近下方2値化マトリ
ックスLとの両者にて共にオンが配置されている画素位
置は、必ずオンとする。
Next, the uniform density pixel matrix with the density value i is binarized by the error diffusion method to create a binarized matrix Fi (S446). However, in step S446, binarization is performed under the following condition.
Pixel positions in which both ONs are arranged in both the most recently upper binarization matrix H and the most recently lower binarization matrix L are always on.

【0094】最近上方2値化マトリックスHと最近下
方2値化マトリックスLとの両者にて共にオフが配置さ
れている画素位置は、必ずオフとする。すなわち、通
常、誤差拡散法においては、周辺の画素から分配された
誤差と自己の濃度とを合計した値を、閾値と比較して、
閾値以上であれば「オン」、閾値未満であれば「オフ」
に2値化しているが、前記またはの条件に該当する
画素の場合には、その画素については閾値との比較をせ
ずに、前記またはの条件通りに、「オン」または
「オフ」に設定する。勿論、この閾値と比較しない設定
の結果も2値化誤差に反映され、周辺画素への分配の対
象となる。
Pixel positions in which both OFF are arranged in both the most recently upper binarization matrix H and the most recently lower binarization matrix L are always OFF. That is, normally, in the error diffusion method, the value obtained by summing the error distributed from the peripheral pixels and the self density is compared with a threshold value,
"On" if above the threshold, "Off" if below the threshold
However, in the case of a pixel satisfying the above condition or, the pixel is set to “on” or “off” according to the above condition without comparing with the threshold value. To do. Of course, the result of the setting that is not compared with this threshold value is also reflected in the binarization error and becomes the target of distribution to the peripheral pixels.

【0095】濃度値iの均一濃度画素マトリックスにつ
いて2値化を終了すると、このようにして得られた2値
化マトリックスを作業用メモリ19に保存し(S45
0)、濃度値i=所望濃度(ここではi=128)か否
かを判定する(S460)。最初は濃度値i=1である
ので(S460で「NO」)、次に濃度値iがインクリ
メントされる(S470)。したがって、次に全画素が
濃度値i=2の均一濃度画素マトリックスを前述のごと
く2値化処理し(S440)、その2値化マトリックス
F2を作業用メモリ19に保存する(S450)。
When the binarization of the uniform density pixel matrix of the density value i is completed, the binarization matrix thus obtained is stored in the working memory 19 (S45).
0), it is determined whether the density value i = desired density (here i = 128) (S460). At first, the density value i = 1 (“NO” in S460), and then the density value i is incremented (S470). Therefore, the uniform density pixel matrix in which all pixels have the density value i = 2 is binarized as described above (S440), and the binarized matrix F2 is stored in the working memory 19 (S450).

【0096】以後、順次、濃度値iをインクリメントし
つつ(S470)、該当する濃度値iの均一濃度画素マ
トリックスを2値化し(S440)、その2値化マトリ
ックスFiを作業用メモリ19に保存する(S450)
処理を繰り返す。所望濃度値i=128の均一濃度画素
マトリックスの処理(S440,S450)が終了する
と図11に示すごとく、作業用メモリ19内には、濃度
値i=0〜128,255の130個の2値化マトリッ
クスF0〜F128,F255が形成されている。
Thereafter, the density value i is sequentially incremented (S470), the uniform density pixel matrix of the corresponding density value i is binarized (S440), and the binarized matrix Fi is stored in the working memory 19. (S450)
Repeat the process. When the processing of the uniform density pixel matrix of the desired density value i = 128 (S440, S450) is completed, as shown in FIG. 11, 130 binary values of density values i = 0 to 128, 255 are stored in the working memory 19. Formed matrix F0 to F128, F255.

【0097】次に濃度値i=128であるので(S46
0で「YES」)、i=128に該当する2値化マトリ
ックスF128を、2値閾値マトリックスとして閾値マ
トリックス記憶部14に保存する(S480)。図12
(a)に、本実施の形態2の手法で2値化した濃度値i
=128の場合の2値閾値マトリックスの一部を画像化
して示す。黒ドットが「1」の要素を表し、白ドットが
「0」の要素を表している。図12(b)は同じく濃度
値i=192まで図8の処理を行って、i=192に該
当する2値化マトリックスF192を2値閾値マトリッ
クスとして生成した場合である。図12(a),(b)
では、「0」と「1」とのドットが適度に分散して分布
し、かつ非周期性である。
Next, since the density value i = 128 (S46)
If 0, “YES”), the binarization matrix F128 corresponding to i = 128 is stored in the threshold matrix storage unit 14 as a binary threshold matrix (S480). 12
In (a), the density value i binarized by the method of the second embodiment is shown.
= 128, a part of the binary threshold matrix is shown as an image. Black dots represent elements of "1" and white dots represent elements of "0". FIG. 12B shows a case in which the binarization matrix F192 corresponding to i = 192 is generated as a binary threshold matrix by performing the process of FIG. 8 until the density value i = 192. 12 (a), (b)
Then, the dots of "0" and "1" are distributed appropriately dispersed and are non-periodic.

【0098】このようにして形成された2値閾値マトリ
ックスを用いて、図6の閾値マトリックス誤差拡散処理
を実行したところ、実施の形態1と同様な効果が得られ
た。本実施の形態2では、濃度値iを順次i=1から1
つ増加させつつ目的の濃度まで2値化処理していたの
で、特に前記の条件は用いる必要はない。また、この
ように順次、濃度値iを+1して行く場合には、前記
の条件を用いずに、単に最近下方2値化マトリックス
Lを参照しつつ、最近下方2値化マトリックスLにてオ
ンとなっている画素位置は必ずオンにする条件にて、2
値化しても良い。すなわち、オンが現れたらそれ以降の
濃度値の2値化においては必ずオンにするとの規則で2
値化しても良い。
When the threshold value matrix error diffusion process of FIG. 6 was executed using the binary threshold value matrix thus formed, the same effect as in the first embodiment was obtained. In the second embodiment, the density value i is sequentially changed from i = 1 to 1
Since the binarization processing was carried out to the target density while increasing the number of times, it is not necessary to use the above conditions in particular. When the density value i is sequentially incremented by +1 in this way, the on-state is turned on in the latest lower binarization matrix L while simply referring to the latest lower binarization matrix L without using the above condition. Under the condition that the pixel position of is always turned on, 2
It may be valued. That is, when ON appears, it is always turned ON in subsequent binarization of the density value.
It may be valued.

【0099】また、本実施の形態2において、i=25
4から順次1つ減少させつつ目的とする濃度まで2値化
処理しても良い。この場合には、前記条件はのみでも
良い。また、このように順次、濃度値iを−1して行く
場合には、前記の条件を用いずに、単に最近上方2
値化マトリックスHを参照しつつ、最近上方2値化マト
リックスHにてオフとなっている画素位置は必ずオフに
する条件にて、2値化しても良い。すなわち、オフが現
れたらそれ以降の濃度値の2値化においては必ずオフに
するとの規則で2値化しても良い。
In the second embodiment, i = 25
The binarization processing may be performed until the target density is obtained by sequentially decreasing the value from 4. In this case, the above condition may be only. Further, when the density value i is successively decreased by -1 in this manner, the above-mentioned condition is not used, and the uppermost 2
While referring to the binarization matrix H, the pixel positions that have recently been turned off in the upper binarization matrix H may be binarized under the condition that they are always turned off. That is, the binarization may be performed according to the rule that when the off appears, the binarization of the density value thereafter is always turned off.

【0100】更に、i=0とi=255の中間であるi
=128の2値閾値マトリックスを作り、次にi=0と
i=128との中間のi=64、i=128とi=25
5との中間のi=191、……と言うように、既に2値
化した濃度を二分する中間付近を前記条件を用いな
がら2値化しても良い。
Further, i which is an intermediate between i = 0 and i = 255
= 128, a binary threshold matrix is created, and then i = 64, i = 128 and i = 25 which are intermediate between i = 0 and i = 128.
As in the case of i = 191, which is in the middle of 5, the vicinity of the middle of dividing the already binarized density may be binarized using the above conditions.

【0101】[実施の形態3] 前記実施の形態2では、均一濃度画素マトリックスD0
〜D128,D255あるいはその2値化マトリックス
F0〜F128,F255の大きさと同じ大きさの2値
閾値マトリックスを形成していたが、本実施の形態3で
は、図13に示すごとく、均一濃度画素マトリックスD
0〜D128,D255およびその2値化マトリックス
F0〜F128,F255の大きさが、目的とする2値
閾値マトリックスに比較して非常に大きいものを用いる
とともに、2値化マトリックスF128の特定の領域に
おける2値化結果を抽出して2値閾値マトリックスとし
て生成する。
[Third Embodiment] In the second embodiment, the uniform density pixel matrix D0 is used.
.About.D128, D255 or a binary threshold matrix of the same size as that of the binarized matrices F0 to F128, F255, the third embodiment forms a uniform density pixel matrix as shown in FIG. D
0-D128, D255 and the binarization matrices F0-F128, F255 of which the size is very large compared to the target binary threshold matrix are used, and in the specific region of the binarization matrix F128. The binarized result is extracted and generated as a binary threshold matrix.

【0102】本実施の形態3における2値閾値マトリッ
クス生成処理について説明する。尚、本2値閾値マトリ
ックス生成処理は、前記実施の形態2とは、ステップS
440,S450の処理が異なり、他は同じであるの
で、異なる部分のみ図14に示す。
The binary threshold value matrix generation process in the third embodiment will be described. The binary threshold matrix generation process is different from that of the second embodiment in step S
Since the processes of 440 and S450 are different and the others are the same, only different parts are shown in FIG.

【0103】ステップS430,S470で濃度値iが
設定された後、濃度値iの均一濃度画素マトリックスに
おける注目画素の濃度(濃度値iに等しい)を読み込む
(S510)。最初の注目画素は原点位置(0,0)の
画素である。次に、前記条件の基に注目画素の濃度
値iに周辺画素から分配される2値化誤差を加えた値を
誤差拡散法により2値化する(S520)。すなわち、
条件に該当する場合には、閾値によらず必ずオンに2
値化し、条件に該当する場合には、閾値によらず必ず
オフに2値化し、それ以外は閾値により2値化し、2値
化誤差を求める。
After the density value i is set in steps S430 and S470, the density (equal to the density value i) of the pixel of interest in the uniform density pixel matrix of the density value i is read (S510). The first pixel of interest is the pixel at the origin position (0,0). Next, the value obtained by adding the binarization error distributed from the peripheral pixels to the density value i of the target pixel based on the above conditions is binarized by the error diffusion method (S520). That is,
If the condition is met, it is always turned on regardless of the threshold value. 2
If binarization is performed and the condition is met, binarization is performed without fail regardless of the threshold, and otherwise binarization is performed using the threshold.

【0104】次に、現在の注目画素が特定領域A1に含
まれているか否かが判定される(S530)。特定領域
A1とは、図13に示したごとく、最終的な2値閾値マ
トリックスM1を形成する領域であり、本実施の形態で
は全ての均一濃度画素マトリックスにおいて同一の位置
に存在する領域である。
Next, it is determined whether or not the current target pixel is included in the specific area A1 (S530). The specific area A1 is an area forming the final binary threshold matrix M1 as shown in FIG. 13, and is an area existing at the same position in all uniform density pixel matrices in the present embodiment.

【0105】この特定領域A1は、誤差拡散処理におけ
る先頭画素ラインL0部分は含まず、最終画素ラインL
x部分を含んでいる。これは、先頭画素ラインL0部分
では、その前のラインが存在しないため2値化誤差の拡
散において、後方のラインと比較して歪みを生じてお
り、ドットの集中や特定のパターンが生じ易いからであ
り、この2値化誤差拡散の歪みの影響は先頭画素ライン
L0から後方に離れるにしたがって少なくなり、最終画
素ラインLx部分では最も影響が少ないからである。
This specific area A1 does not include the first pixel line L0 portion in the error diffusion processing, but the last pixel line L0.
It contains the x part. This is because, in the head pixel line L0 portion, since there is no preceding line, distortion occurs in diffusion of the binarization error as compared with the following line, and dot concentration or a specific pattern is likely to occur. This is because the influence of the distortion of the binarization error diffusion becomes smaller as the distance from the head pixel line L0 becomes farther backward, and the influence becomes minimal in the last pixel line Lx portion.

【0106】現在の注目画素が特定領域A1に含まれて
いると判定されると(S530で「YES」)、注目画
素の2値化値が作業用メモリ19に保存される(S54
0)。現在の注目画素が特定領域A1に含まれていない
と判定されると(S530で「NO」)、注目画素の2
値化値は保存されない。
If it is determined that the current target pixel is included in the specific area A1 ("YES" in S530), the binarized value of the target pixel is stored in the working memory 19 (S54).
0). If it is determined that the current target pixel is not included in the specific area A1 (“NO” in S530), the target pixel 2
Quantized values are not stored.

【0107】次に濃度値iにおいて未処理の画素が有る
か否かが判定されて(S550)、未処理画素が有れば
(S550で「YES」)、再度ステップS510に戻
り、未処理画素を注目画素として上述の処理を続ける。
尚、ステップS550での未処理画素の判定は、特定領
域A1内に未処理画素が有るか否かの判定でも良い。
Next, it is judged whether or not there are unprocessed pixels in the density value i (S550), and if there are unprocessed pixels ("YES" in S550), the process returns to step S510 again and the unprocessed pixels are processed. The above processing is continued with the pixel of interest as.
Note that the unprocessed pixel determination in step S550 may be a determination as to whether or not there are unprocessed pixels in the specific area A1.

【0108】ステップS550で「NO」と判定された
後、ステップS460の判定処理に移る。したがって、
ステップS460にて「YES」と判定された時には、
作業用メモリ19には、図13に示した場合と同じよう
に濃度値i毎に特定領域A1に該当する2値化マトリッ
クスF0〜F128,F255が形成されている。
After the determination of "NO" is made at step S550, the routine goes to the determination processing of step S460. Therefore,
When “YES” is determined in the step S460,
In the working memory 19, as in the case shown in FIG. 13, binarization matrices F0 to F128, F255 corresponding to the specific area A1 are formed for each density value i.

【0109】この内、2値閾値マトリックスとして、2
値化マトリックスF128を閾値マトリックス記憶部1
4に保存する(S480)。こうして、閾値マトリック
ス生成処理を終了する。この2値閾値マトリックスを用
いて、図6に示した閾値マトリックス誤差拡散処理を実
行した結果、前述した実施の形態1,2と同様な効果が
得られた。更に、均一濃度画素マトリックスから、先頭
画素ラインL0を含まず、かつ最終画素ラインLxを含
む特定領域A1の2値化マトリックスF128を求めて
いるため、先頭画素ラインL0部分で生じている誤差分
配の歪みの影響が及びにくく、一層、紋様の発生が抑制
された疑似中間調の2値化画像を生成することができ
た。
Of these, the binary threshold matrix is 2
The threshold matrix F128 is stored in the threshold matrix storage unit 1
4 (S480). In this way, the threshold matrix generation process ends. As a result of executing the threshold matrix error diffusion processing shown in FIG. 6 using this binary threshold matrix, the same effects as those of the above-described first and second embodiments are obtained. Furthermore, since the binarization matrix F128 of the specific area A1 that does not include the leading pixel line L0 and that includes the final pixel line Lx is obtained from the uniform density pixel matrix, the error distribution that occurs in the leading pixel line L0 portion is calculated. It was possible to generate a pseudo halftone binarized image in which the influence of distortion was less likely to occur and the generation of patterns was further suppressed.

【0110】[実施の形態4] 実施の形態3の2値化処理の代わりに、図15のフロー
チャートに示すごとくの処理を実行しても良い。本実施
の形態は、誤差拡散として平均誤差最小法を用いてい
る。
[Fourth Embodiment] Instead of the binarization process of the third embodiment, the process as shown in the flowchart of FIG. 15 may be executed. The present embodiment uses the minimum mean error method as the error diffusion.

【0111】まず、最初の濃度値i=1の均一濃度画素
マトリックスを2値化処理対象とし、まず、2値化済み
の濃度値、すなわち既に2値化マトリックスが求められ
ている濃度値の内で、濃度値i=1に対する最近上方2
値化マトリックスHと、最近下方2値化マトリックスL
とを作業用メモリ19の内容から検索する(S62
1)。最初の濃度値i=1の場合は、既にステップS4
10にて2値化されている濃度値i=255の均一濃度
画素マトリックスが最近上方2値化マトリックスHに該
当し、濃度値i=0の均一濃度画素マトリックスが最近
下方2値化マトリックスLに該当する。
First, the uniform density pixel matrix with the first density value i = 1 is targeted for binarization processing. First, of the density values already binarized, that is, the density values for which the binarization matrix has already been obtained. Then, for the density value i = 1, the uppermost 2
The binarization matrix H and the latest lower binarization matrix L
And are searched from the contents of the work memory 19 (S62).
1). If the first density value i = 1, step S4 has already been performed.
The uniform density pixel matrix with the density value i = 255 binarized in 10 corresponds to the uppermost binarization matrix H, and the uniform density pixel matrix with the density value i = 0 corresponds to the lowermost binarization matrix L. Applicable

【0112】次に、誤差バッファ16を初期化する(S
622)。次に、濃度値iの均一濃度画素マトリックス
の画素位置(x,y)の濃度値I(x,y)を読み取る(S
623)。最初の画素位置は均一濃度画素マトリックス
の左上隅の原点(0,0)であり、各均一濃度画素マト
リックスのサイズがm×n画素であるとすると、以後ス
テップS623が処理される毎に、主走査方向(x方
向)へ順次移動し、x=m−1の次には、副走査方向
(y方向)の次の画素ラインに移動してx=0から主走
査方向へ順次移動して行くように画素位置(x,y)が
指定される。
Next, the error buffer 16 is initialized (S
622). Next, the density value I (x, y) at the pixel position (x, y) of the uniform density pixel matrix of the density value i is read (S
623). The first pixel position is the origin (0, 0) at the upper left corner of the uniform density pixel matrix, and assuming that the size of each uniform density pixel matrix is m × n pixels, the main pixel position is changed every time step S623 is processed. It sequentially moves in the scanning direction (x direction), and after x = m−1, it moves to the next pixel line in the sub scanning direction (y direction) and sequentially moves from x = 0 to the main scanning direction. The pixel position (x, y) is designated as follows.

【0113】尚、この画素位置(x,y)の濃度値I
(x,y)は濃度値iの均一濃度画素マトリックスの全ての
画素において濃度値iと同じ値であるので、特に濃度値
iの均一濃度画素マトリックスから読み取らなくても、
単にI(x,y)にiを設定するのみでも良い。
The density value I at this pixel position (x, y)
Since (x, y) is the same value as the density value i in all pixels of the uniform density pixel matrix of the density value i, even if it is not read from the uniform density pixel matrix of the density value i,
It is also possible to simply set i to I (x, y).

【0114】次に、式11のごとく、濃度値iが周辺画
素の2値化誤差和Eにて補正されて補正濃度値I′(x,
y)が算出される(S624)。
Next, as shown in Expression 11, the density value i is corrected by the binarization error sum E of the peripheral pixels to obtain the corrected density value I '(x,
y) is calculated (S624).

【0115】[0115]

【数11】 [Equation 11]

【0116】2値化誤差和Eは、式12のごとく、係数
マトリックスαと周辺画素の2値化誤差eとに基づいて
計算される。
The binarization error sum E is calculated based on the coefficient matrix α and the binarization error e of the peripheral pixels, as shown in Expression 12.

【0117】[0117]

【数12】 [Equation 12]

【0118】係数マトリックスαは、本実施の形態4で
は、次のようなマトリックスが用いられている。αpqは
係数マトリックスαの位置(p,q)の係数を表してい
る。またeabは画素位置(a,b)における2値化誤差
を表している。
As the coefficient matrix α, the following matrix is used in the fourth embodiment. αpq represents the coefficient at the position (p, q) of the coefficient matrix α. Further, eab represents a binarization error at the pixel position (a, b).

【0119】[0119]

【数13】 [Equation 13]

【0120】ここで、*は注目画素の位置を表してい
る。ただし、a,bは次式のようにして設定される。
Here, * represents the position of the pixel of interest. However, a and b are set as in the following equation.

【0121】[0121]

【数14】 [Equation 14]

【0122】ここで、%はmで割り算した場合の余りを
求める演算子、mは均一濃度画素マトリックスの主走査
方向のサイズ、int{}は{}内の値の整数部分のみ
を取り出す演算子である。また、p,qは、注目画素*
を原点とする係数マトリックスα上の座標位置を示し、
pは横軸座標、qは縦軸座標である。ここで、−2≦q
≦0であり、q=0のとき−2≦p≦−1、q=−1,
−2のとき−2≦p≦2である。
Here,% is an operator for obtaining the remainder when divided by m, m is the size of the uniform density pixel matrix in the main scanning direction, and int {} is an operator for extracting only the integer part of the value within {}. Is. In addition, p and q are the target pixel *
Indicates the coordinate position on the coefficient matrix α whose origin is
p is the abscissa coordinate and q is the ordinate coordinate. Where −2 ≦ q
≦ 0, and when q = 0, −2 ≦ p ≦ −1, q = −1,
When -2, -2? P? 2.

【0123】上述したa,bの設定は、図16に模式的
に示すごとく、均一濃度画素マトリックスを主走査方向
xの先端縁部AEと後端縁部BEとを、後端縁部BEの
画素が、主走査方向xの先端縁部AEの画素の内で副走
査方向yの次の画素ラインの画素へ螺旋状に連続した画
素配置状態で誤差分配されることを表している。
The above-described settings of a and b are performed by setting the uniform density pixel matrix to the leading edge portion AE and the trailing edge portion BE in the main scanning direction x and the trailing edge portion BE as shown in FIG. It indicates that the pixels are error-distributed in a pixel arrangement state in which the pixels are spirally continuous to the pixels of the next pixel line in the sub-scanning direction y among the pixels in the leading edge portion AE in the main scanning direction x.

【0124】すなわち、図17に示すごとく通常の座標
で表すと、画素位置P0(m−3,k+1)が注目画素
であった場合、係数マトリックスαの分配係数が適用さ
れる画素は、前記式13,14から、q=0のときはa
=m−5,m−4、b=k+1であり、q=−1のとき
はa=m−5,m−4,m−3,m−2,m−1、b=
kであり、q=−2のときはa=m−5,m−4,m−
3,m−2,m−1、b=k−1である。すなわち、図
示の斜線の部分に該当し、P0の画素はこの斜線部分の
周辺画素から2値化誤差の分配を受ける。
That is, in the normal coordinates as shown in FIG. 17, when the pixel position P 0 (m−3, k + 1) is the target pixel, the pixel to which the distribution coefficient of the coefficient matrix α is applied is From 13, 14 a when q = 0
= M-5, m-4, b = k + 1, and when q = -1, a = m-5, m-4, m-3, m-2, m-1, b =
k, and when q = -2, a = m-5, m-4, m-
3, m-2, m-1, and b = k-1. That is, the pixel P0 corresponds to the shaded portion in the figure, and the binarization error is distributed from the peripheral pixels of the shaded portion.

【0125】次の注目画素の画素位置P1(m−2,k
+1)では、係数マトリックスαの分配係数が適用され
る画素は、図18に示すごとく、前記式13,14か
ら、q=0のときはa=m−4,m−3、b=k+1で
あり、q=−1のときはa=m−4,m−3,m−2,
m−1、b=kおよびa=0、b=k+1であり、q=
−2のときはa=m−4,m−3,m−2,m−1、b
=k−1およびa=0、b=kである。すなわち、図示
の斜線の部分に該当し、均一濃度画素マトリックスの主
走査方向xの後端縁部BEからはみ出た誤差分配領域の
一部が、先端縁部AE側で副走査方向yへ1画素ライン
ずれた位置に設定される。P1の画素はこの斜線部分の
周辺画素から2値化誤差の分配を受ける。
The pixel position P1 (m-2, k) of the next target pixel
+1), the pixels to which the distribution coefficient of the coefficient matrix α is applied are, as shown in FIG. 18, from the expressions 13 and 14, a = m−4, m−3, b = k + 1 when q = 0. Yes, when q = -1, a = m-4, m-3, m-2,
m-1, b = k and a = 0, b = k + 1, and q =
When -2, a = m-4, m-3, m-2, m-1, b
= K-1 and a = 0, b = k. That is, a part of the error distribution area corresponding to the shaded portion in the drawing and protruding from the trailing edge portion BE of the uniform density pixel matrix in the main scanning direction x is one pixel in the sub scanning direction y on the leading edge portion AE side. It is set to the position where the line is deviated. The pixel P1 receives the binarization error distribution from the peripheral pixels in the shaded area.

【0126】以後同様に、次の注目画素の画素位置P2
(m−1,k+1)では、係数マトリックスαの分配係
数が適用される画素は、図19に斜線で示すごとく、前
記式13,14から、q=0のときはa=m−3,m−
2、b=k+1であり、q=−1のときはa=m−3,
m−2,m−1、b=kおよびa=0,1、b=k+1
であり、q=−2のときはa=m−3,m−2,m−
1、b=k−1およびa=0,1、b=kである。P2
の画素はこの斜線部分の周辺画素から2値化誤差の分配
を受ける。
Thereafter, similarly, the pixel position P2 of the next target pixel
In (m-1, k + 1), the pixel to which the distribution coefficient of the coefficient matrix α is applied is, as shown by the slanted lines in FIG. 19, from the above equations 13 and 14, when q = 0, a = m-3, m −
2, b = k + 1, and when q = -1, a = m-3,
m-2, m-1, b = k and a = 0, 1, b = k + 1
And when q = -2, a = m-3, m-2, m-
1, b = k−1 and a = 0,1, b = k. P2
The pixels of are subject to the binarization error distribution from the peripheral pixels of the shaded area.

【0127】先端縁部AEに戻った次の注目画素の画素
位置P3(0,k+2)では、係数マトリックスαの分
配係数が適用される画素は、図20に斜線で示すごと
く、前記式13,14から、q=0のときはa=m−
2,m−1、b=k+1であり、q=−1のときはa=
m−2,m−1、b=kおよびa=0,1,2、b=k
+1であり、q=−2のときはa=m−2,m−1、b
=k−1およびa=0,1,2、b=kである。P3の
画素はこの斜線部分の周辺画素から2値化誤差の分配を
受ける。
At the pixel position P3 (0, k + 2) of the next pixel of interest that has returned to the leading edge portion AE, the pixel to which the distribution coefficient of the coefficient matrix α is applied is represented by the above formula 13, 14 indicates that when q = 0, a = m−
2, m−1, b = k + 1, and when q = −1, a =
m-2, m-1, b = k and a = 0, 1, 2, b = k
+1 and when q = -2, a = m-2, m-1, b
= K-1 and a = 0,1,2, b = k. The pixel P3 receives the binarization error distribution from the peripheral pixels in the shaded area.

【0128】次の注目画素の画素位置P4(1,k+
2)では、係数マトリックスαの分配係数が適用される
画素は、図21に斜線で示すごとく、前記式13,14
から、q=0のときはa=m−1、b=k+1およびa
=0、b=k+2であり、q=−1のときはa=m−
1、b=kおよびa=0,1,2,3、b=k+1であ
り、q=−2のときはa=m−1、b=k−1およびa
=0,1,2,3、b=kである。P4の画素はこの斜
線部分の周辺画素から2値化誤差の分配を受ける。
The pixel position P4 (1, k +) of the next target pixel
In 2), the pixels to which the distribution coefficient of the coefficient matrix α is applied are represented by the above equations 13 and 14 as indicated by the shaded areas in FIG.
Therefore, when q = 0, a = m-1, b = k + 1 and a
= 0, b = k + 2, and when q = -1, a = m-
1, b = k and a = 0, 1, 2, 3, b = k + 1, and when q = -2, a = m-1, b = k-1 and a
= 0, 1, 2, 3, and b = k. The pixel P4 receives the binarization error distribution from the peripheral pixels in the shaded area.

【0129】次の注目画素の画素位置P5(2,k+
2)では、係数マトリックスαの分配係数が適用される
画素は、図22に斜線で示すごとく、前記式13,14
から、q=0のときはa=0,1、b=k+2であり、
q=−1のときはa=0,1,2,3,4、b=k+1
であり、q=−2のときはa=0,1,2,3,4、b
=kである。P5の画素はこの斜線部分の周辺画素から
2値化誤差の分配を受ける。
The pixel position P5 (2, k +) of the next pixel of interest
In 2), the pixels to which the distribution coefficient of the coefficient matrix α is applied are represented by the equations 13 and 14 as indicated by the hatched lines in FIG.
Therefore, when q = 0, a = 0, 1, b = k + 2,
When q = -1, a = 0, 1, 2, 3, 4, b = k + 1
And when q = -2, a = 0, 1, 2, 3, 4, b
= K. The pixel P5 receives the binarization error distribution from the peripheral pixels in the shaded area.

【0130】このようにして、均一濃度画素マトリック
スの主走査方向xの後端縁部BEが誤差拡散処理におい
て先端縁部AE側へ螺旋状に連続する誤差分配がなされ
る。このことは、誤差拡散処理による2値化が、均一濃
度画素マトリックスの主走査方向xの後端縁部BEと先
端縁部AEとが螺旋状に連続してなされていることを意
味する。
In this way, the error distribution in which the trailing edge portion BE of the uniform density pixel matrix in the main scanning direction x is spirally continuous to the leading edge portion AE side in the error diffusion process is performed. This means that the binarization by the error diffusion process is performed by spirally connecting the trailing edge portion BE and the leading edge portion AE of the uniform density pixel matrix in the main scanning direction x.

【0131】このようにして2値化誤差和Eの補正によ
り求められた補正濃度値I′(x,y)は、次の条件の
いずれかに合致しないものが、閾値T(例えばT=12
8)と比較されて、I′(x,y)>Tならば、注目画素を
オン(「1」)に2値化し、I′(x,y)≦Tならば、注
目画素をオフ(「0」)に2値化され、条件のいず
れかに合致するものは、その合致した条件にしたがって
2値化される(S625)。
In the correction density value I '(x, y) thus obtained by the correction of the binarization error sum E, a value which does not meet any of the following conditions is a threshold value T (for example, T = 12).
8), if I '(x, y)> T, the pixel of interest is binarized to ON ("1"), and if I' (x, y) ≤T, the pixel of interest is turned OFF ( Those which are binarized to "0") and which meet any of the conditions are binarized according to the matched conditions (S625).

【0132】条件: 最近上方2値化マトリックスH
と最近下方2値化マトリックスLとの両者にて共に
「1」オンが配置されている画素位置。この位置に対応
する2値化マトリックスの要素は、必ず「1」オンとす
る。 条件: 最近上方2値化マトリックスHと最近下方2
値化マトリックスLとの両者にて共に「0」オフが配置
されている画素位置。この位置に対応する2値化マトリ
ックスの要素は、必ず「0」オフとする。すなわち、通
常、誤差拡散法においては、周辺の画素から分配された
誤差Eと注目画素の濃度値I(x,y)とを合計した値を、
閾値と比較して、閾値以上であれば「1」オン、閾値未
満であれば「0」オフに2値化しているが、前記また
はの条件に該当する画素の場合には、その画素につい
ては閾値との比較をせずに、前記またはの条件通り
に、「1」オンまたは「0」オフに設定する。尚、条件
は、「最近上方2値化マトリックスHの画素値=最
近下方2値化マトリックスLの画素値であるならば、最
近上方2値化マトリックスHまたは最近下方2値化マト
リックスLのいずれかの画素値に設定する」と表現する
こともできる。 次いで注目画素をオンに2値化した場
合、次式の計算により、注目画素の2値化誤差e(x,y)
が求められ、この2値化誤差e(x,y)が誤差バッファに
記憶される(S626)。
Condition: Recent upper binarization matrix H
Pixel positions in which "1" is turned on in both of the lower binarization matrix L and the latest. The element of the binarization matrix corresponding to this position is always set to "1". Condition: Recently upper binarization matrix H and recently lower binarization 2
Pixel position where “0” off is arranged in both of the binarization matrix L. The element of the binarization matrix corresponding to this position is always "0" off. That is, normally, in the error diffusion method, the sum of the error E distributed from the surrounding pixels and the density value I (x, y) of the pixel of interest is
Compared with the threshold value, if it is equal to or more than the threshold value, “1” is turned on, and if it is less than the threshold value, “0” is turned off. “1” is turned on or “0” is turned off according to the above condition or without comparing with the threshold value. It should be noted that the condition is "if the pixel value of the nearest upper binarization matrix H = the pixel value of the nearest lower binarization matrix L, then either the nearest upper binarization matrix H or the nearest lower binarization matrix L is used. Can be expressed as "set to the pixel value of." Next, when the pixel of interest is binarized to ON, the binarization error e (x, y) of the pixel of interest is calculated by the following formula.
Is obtained, and the binarization error e (x, y) is stored in the error buffer (S626).

【0133】[0133]

【数15】 [Equation 15]

【0134】また、注目画素をオフに2値化した場合に
は、次式のごとく、注目画素の2値化誤差eにI′(x,
y)が設定される。
When the target pixel is binarized off, I '(x,
y) is set.

【0135】[0135]

【数16】 [Equation 16]

【0136】前記条件により、図23(a)に示す
ごとく、各要素位置において、濃度値の小さい方から見
ると、一旦、オンとなると、以後の濃度値iおいては必
ずオンとなる。次に、一つの均一濃度画素マトリックス
について全ての画素の2値化処理が終了したか否かが判
定され(S627)、終了していなければ(S627で
「NO」)、次の画素位置を設定して(S628)、ス
テップS623の処理に戻る。
According to the above conditions, as shown in FIG. 23 (a), at each element position, when viewed from the smaller density value, once turned on, it will always be turned on for the subsequent density values i. Next, it is determined whether or not the binarization processing of all the pixels has been completed for one uniform density pixel matrix (S627), and if not completed (“NO” in S627), the next pixel position is set. Then (S628), the process returns to step S623.

【0137】全ての画素の2値化が終了すれば(S62
7で「YES」)、ステップ450の処理に移る。この
ようにして形成された2値閾値マトリックスを用いて誤
差拡散法により、中間調のカラー画像を2値化処理した
ところ、実施の形態3の効果とともに、次のような効果
も存在した。
When binarization of all pixels is completed (S62)
7 is “YES”), and the process proceeds to step 450. When the halftone color image was binarized by the error diffusion method using the binary threshold matrix formed in this way, the following effects existed in addition to the effects of the third embodiment.

【0138】すなわち、誤差拡散法による2値化処理に
て閾値マトリックスを作成する場合に、誤差拡散法の2
値化処理において、均一濃度画素マトリックスの主走査
方向xの先端縁部AEの画素と後端縁部BEの画素とを
連続した画素配置状態で2値化処理することにより主走
査方向xにおける縁部AE,BE同士の連続性を維持さ
せている。その結果、得られた2値閾値マトリックスに
て、画像データを2値化処理すると、領域の境界での色
むらや明暗むらによる疑似的な境界線の発生も十分に抑
制された。
That is, when the threshold matrix is created by the binarization processing by the error diffusion method, the error diffusion method 2
In the binarization processing, the pixels in the leading edge portion AE and the pixels in the trailing edge portion BE in the main scanning direction x of the uniform density pixel matrix are binarized in a continuous pixel arrangement state to thereby obtain an edge in the main scanning direction x. The continuity between the parts AE and BE is maintained. As a result, when the image data was binarized with the obtained binary threshold matrix, the occurrence of pseudo boundary lines due to uneven color and uneven brightness at the boundaries of the regions was sufficiently suppressed.

【0139】特に、本実施の形態では、均一濃度画素マ
トリックスの主走査方向xの後端縁部BEの画素が、主
走査方向xの先端縁部AEの画素の内で副走査方向yの
次の画素ラインの画素へ連続した画素配置状態で2値化
処理すると、すなわち、主走査方向xの画素の配列が螺
旋状にされた状態で2値化処理すると、後端縁部BEの
画素から先端縁部AEの画素へと2値化処理が移行する
場合にも、同一の係数マトリックスαを用いて同じ2値
化誤差分配処理を行えば良いので、簡易な処理になると
共に、2値化処理の連続性が、より良好となり一層疑似
的な境界線の発生を抑制できる。
In particular, in the present embodiment, the pixel at the rear edge portion BE in the main scanning direction x of the uniform density pixel matrix is the next pixel in the sub scanning direction y among the pixels at the leading edge portion AE in the main scanning direction x. When the binarization process is performed on the pixels of the pixel line in the continuous pixel arrangement state, that is, when the binarization process is performed in the state where the pixel array in the main scanning direction x is spiraled, the pixels of the rear edge portion BE are changed. Even when the binarization process shifts to the pixel of the leading edge portion AE, the same binarization error distribution process may be performed using the same coefficient matrix α, so that the process becomes simple and binarization is performed. The continuity of the processing is improved, and it is possible to further suppress the generation of pseudo boundary lines.

【0140】更に、本実施の形態では、図15における
2値化において、前記の条件を用いて、既に2値化
されている前後の均一濃度画素マトリックスの2値化状
態を考慮した2値化が行われている。もし、前記の
条件を用いない通常の2値化を行うと、図23(b)に
示すごとく、オンとなった後も同じ要素位置でオフが出
現する。このため、通常の2値化のみでは各要素位置に
おける1(オン)/0(オフ)の分布が偏る傾向が有る
が、本実施の形態では、適度に分散して好適な分布とな
る。したがって、特に、図23(b)に示したごとくの
各均一濃度画素マトリックス独立に2値化している場合
に得られる2値閾値マトリックスに比較して、図23
(a)のごとくに得られた2値閾値マトリックスは、中
間調画像データを閾値マトリックス誤差拡散法にて2値
化する際に用いれば、一層、解像度が向上し、紋様の抑
制が行われる。
Further, in the present embodiment, in the binarization in FIG. 15, using the above conditions, the binarization in consideration of the binarization states of the uniform density pixel matrix before and after the binarization is performed. Is being done. If normal binarization that does not use the above conditions is performed, OFF appears at the same element position even after it is turned ON, as shown in FIG. For this reason, the distribution of 1 (on) / 0 (off) at each element position tends to be biased only by normal binarization, but in the present embodiment, the distribution is appropriately dispersed to provide a suitable distribution. Therefore, in particular, as compared with the binary threshold matrix obtained when binarization is performed independently for each uniform density pixel matrix as shown in FIG.
If the binary threshold matrix obtained as in (a) is used when the halftone image data is binarized by the threshold matrix error diffusion method, the resolution is further improved and the pattern is suppressed.

【0141】[実施の形態5] 本実施の形態は、前述した各実施の形態にて形成された
2値閾値マトリックスを、更に、マトリックスの主走査
方向xに行くにつれて、各閾値要素列を副走査方向yに
1要素づつずらすことにより、図24に示すごとく、副
走査方向yの先端縁部UTおよび後端縁部DTを主走査
方向xに対して不一致とさせた2値閾値マトリックスM
2として形成している。
[Embodiment 5] In the present embodiment, the binary threshold matrix formed in each of the above-described embodiments is further divided into sub-threshold elements in the main scanning direction x. By shifting by one element in the scanning direction y, as shown in FIG. 24, a binary threshold matrix M in which the leading edge portion UT and the trailing edge portion DT in the sub-scanning direction y do not match the main scanning direction x.
It is formed as 2.

【0142】本実施の形態の場合は、2値閾値マトリッ
クスM2の副走査方向yの先端縁部UTおよび後端縁部
DTを斜めにして、主走査方向xに対して所定の角度θ
を有する直線状としているので、2値閾値マトリックス
M2全体は、平行四辺形に形成されている。
In the case of the present embodiment, the leading edge portion UT and the trailing edge portion DT of the binary threshold value matrix M2 in the sub-scanning direction y are slanted and a predetermined angle θ with respect to the main scanning direction x.
, The binary threshold matrix M2 as a whole is formed into a parallelogram.

【0143】このように形成された2値閾値マトリック
スM2を用いて閾値マトリックス誤差拡散法でなされる
2値化は、図25に示すごとくに、領域EM毎に2値閾
値マトリックスM2が切り替わって2値化処理すること
になる。しかし、斜めの境界部分BTで色むらや明暗む
らが生じたとしても、そのことにより生じる疑似的な境
界線は斜めの状態、すなわち主走査方向xの直線以外の
状態となる。このような方法で2値化処理して見たとこ
ろ、疑似的な境界線は一層目立たなくなった。すなわ
ち、疑似的な境界線の発生を抑制できる。主走査方向x
の境界部分ATについては、前記実施の形態と同様に、
色むらや明暗むらを生じること無く、疑似的な境界線の
発生は無い。
Binarization performed by the threshold value matrix error diffusion method using the binary threshold value matrix M2 formed as described above is performed by switching the binary threshold value matrix M2 for each region EM as shown in FIG. It will be value-processed. However, even if color unevenness or light and dark unevenness occurs in the oblique boundary portion BT, the pseudo boundary line caused by the unevenness is in an oblique state, that is, a state other than a straight line in the main scanning direction x. As a result of the binarization processing by such a method, the pseudo boundary line became even more inconspicuous. That is, it is possible to suppress the generation of a pseudo boundary line. Main scanning direction x
Regarding the boundary portion AT of, as in the above embodiment,
There is no unevenness of color or unevenness of light and shade, and no pseudo boundary line is generated.

【0144】尚、本実施の形態では、副走査方向yの先
端縁部UTおよび後端縁部DTは、主走査方向xに対し
て所定の角度θを有する直線状としているが、波を打つ
ように凸凹に形成しても良い。またV字形あるいは逆V
字形にしても良い。すなわち、2値閾値マトリックスの
副走査方向yの先端縁部および後端縁部を、主走査方向
xに直線状に配列されている状態から、斜めや凸凹に配
列し直せば、疑似的な境界線は目立たなくなる。すなわ
ち、疑似的な境界線の発生を抑制できる。
In the present embodiment, the leading edge portion UT and the trailing edge portion DT in the sub-scanning direction y are linear with a predetermined angle θ with respect to the main scanning direction x, but wavy. It may be formed in an uneven shape. V-shaped or inverted V
You may make it a letter shape. That is, if the leading edge portion and the trailing edge portion in the sub-scanning direction y of the binary threshold matrix are rearranged obliquely or unevenly from the state of being linearly arranged in the main scanning direction x, a pseudo boundary is formed. The line becomes unnoticeable. That is, it is possible to suppress the generation of a pseudo boundary line.

【0145】また、図24の閾値マトリックスM2を更
に、図26に示すごとく、図24にて、元の位置より副
走査方向yにずれてはみ出した分Zを、同じ閾値要素列
の上部に移動させることにより、平行四辺形から元の形
と同じ矩形に戻した閾値マトリックスM3としても良
い。このようにすると、閾値マトリックスM3が矩形で
あるので、通常、矩形である画像データに適用し易く、
中間調画像の2値化処理が容易となる。
Further, as shown in FIG. 26, the threshold value matrix M2 of FIG. 24 is further moved to the upper part of the same threshold value element row by a distance Z which is offset from the original position in the sub-scanning direction y and protrudes. By doing so, a threshold matrix M3 in which the parallelogram is returned to the same rectangle as the original shape may be used. In this way, since the threshold matrix M3 is rectangular, it is easy to apply it to image data that is normally rectangular.
Binarization processing of a halftone image becomes easy.

【0146】[実施の形態6] 前記実施の形態2〜4において、順次、全画素が濃度値
i=1の画像から濃度値を上げつつ2値化して、最終的
にi=128にて2値化したマトリックスを2値閾値マ
トリックスとして閾値マトリックス誤差拡散法に利用し
たが、これを所望の濃度値iまで行って、各濃度値にお
ける複数の2値化マトリックスを求め、このマトリック
スを利用して、複数種類の閾値からなる閾値マトリック
スを求め、閾値マトリックス誤差拡散法に使用しても良
い。
[Sixth Embodiment] In the second to fourth embodiments, an image in which all pixels have a density value i = 1 is sequentially binarized while increasing the density value, and finally 2 at i = 128. The binarized matrix was used as a binary threshold matrix in the threshold matrix error diffusion method, but this is performed up to a desired density value i to obtain a plurality of binarized matrices at each density value, and this matrix is used. Alternatively, a threshold matrix composed of a plurality of types of thresholds may be obtained and used in the threshold matrix error diffusion method.

【0147】すなわち、たとえば64種類の閾値からな
る閾値マトリックスを生成したい場合には、i=63の
処理が終了した後に(図8のS460にて「YE
S」)、i=0からi=63までの2値化マトリックス
について、同一要素のオン「1」の数をカウントし、こ
のカウント値を要素とするマトリックスを形成する。
That is, for example, when it is desired to generate a threshold value matrix composed of 64 kinds of threshold values, after the processing of i = 63 is completed (in S460 of FIG.
S ”), the number of ON“ 1 ”s of the same element is counted for the binarized matrix from i = 0 to i = 63, and a matrix having this count value as an element is formed.

【0148】たとえば、図27に示すごとく、左上隅を
原点(0,0)として横方向をx軸、縦方向をy軸とす
ると、まず、2値化マトリックスF0〜F63の(0,
0)についてオン「1」の数をカウントする。そのカウ
ント結果を、図28に示すごとく作業用メモリ19内に
用意された集積マトリックスM1の同一要素位置に格納
する。このカウント処理を各要素位置について行い、集
積マトリックスM1をすべて埋める。このカウント処理
は、2値化マトリックスの各画素において、オンが
「1」で、オフが「0」で表されていれば、各画素につ
いて値を合計すれば、カウント値が得られる。
For example, as shown in FIG. 27, assuming that the upper left corner is the origin (0, 0) and the horizontal direction is the x-axis and the vertical direction is the y-axis, first, (0, 0) of the binarization matrices F0 to F63.
For 0), count the number of ON "1" s. The count result is stored in the same element position of the integrated matrix M1 prepared in the work memory 19 as shown in FIG. This counting process is performed for each element position, and the integrated matrix M1 is completely filled. In this counting process, if each pixel of the binarization matrix is represented by "1" for ON and "0" for OFF, a count value is obtained by summing the values for each pixel.

【0149】次に、集積マトリックスM1のカウント値
の低い要素位置から、順に閾値マトリックス用の64種
類の閾値をそれぞれ設定することにより、多値からなる
閾値マトリックスを生成し、メモリに保存し、閾値マト
リックス誤差拡散法に使用する。
Next, 64 kinds of threshold values for the threshold value matrix are set in order from the element position of the integrated matrix M1 having a low count value to generate a multi-valued threshold value matrix, which is stored in the memory and the threshold value is stored. Used for the matrix error diffusion method.

【0150】この閾値マトリックスは、カウント値を識
別値として、カウント値のままで保存して、閾値化は実
際に中間調画像を2値化する際に行っても良い。このよ
うにすると、小さい値で保存できメモリが節約できる。 [実施の形態7] 前記実施の形態6にては、濃度値i=0から閾値の種類
数nに該当する濃度値i=n−1までの濃度値を2値化
したマトリックスについて集積して3値以上の閾値マト
リックスを生成したが、次のようにしても良い。
This threshold value matrix may be stored with the count value as an identification value, and the threshold value may be set when actually binarizing the halftone image. In this way, you can save a small value and save memory. [Embodiment 7] In Embodiment 6, the density values from density value i = 0 to density value i = n-1 corresponding to the number n of threshold values are integrated for a binarized matrix. Although a threshold matrix of three or more values is generated, the following may be done.

【0151】すなわち、濃度値i=0〜最大濃度値i=
255までについてすべての濃度において2値化し、こ
の2値化マトリックスF0〜F255の各要素位置につ
いて実施の形態6と同様にオン「1」の数をカウントす
る。そして、このカウント値の小さい方から大きい方
へ、すなわち、「0」から〜「255」へ、要素位置と
対応づけて並べたテーブルを作成する。なお、カウント
値の大きい方から小さい方に並べても良い。
That is, the density value i = 0 to the maximum density value i =
All the densities up to 255 are binarized, and the number of ON "1" is counted for each element position of this binarization matrix F0 to F255 as in the sixth embodiment. Then, a table in which the count values are arranged from the smaller count value to the larger count value, that is, from "0" to "255" in association with the element position is created. The count values may be arranged in descending order.

【0152】このテーブルは、2値化マトリックスが1
28×128の大きさであれば、16384個の数字と
要素位置とのテーブルとなる。そして、閾値マトリック
ス誤差拡散法で、2種類の閾値からなる閾値マトリック
スを使用したいのであれば、テーブルのカウント値の小
さい方の半分(1〜8192番目)に該当する要素位置
に一方の閾値を与え、大きい方の半分(8193〜16
384番目)に該当する要素位置に他方の閾値を与える
ことにより、2値閾値マトリックスが容易に生成でき
る。
In this table, the binarization matrix is 1
If the size is 28 × 128, it is a table of 16384 numbers and element positions. Then, if it is desired to use a threshold matrix composed of two types of thresholds in the threshold matrix error diffusion method, one threshold is given to the element position corresponding to the half (1-8192nd) of the smaller count values in the table. , The larger half (8193-16
By giving the other threshold value to the element position corresponding to the (384th) element, a binary threshold value matrix can be easily generated.

【0153】また、16種類の閾値からなる閾値マトリ
ックスを使用したいのであれば、テーブルを16のブロ
ックに分け、そのそれぞれに、16種類の閾値を振り分
けて、該当する要素位置に閾値を配置すれば、16種類
の閾値からなる多値の閾値マトリックスが容易に生成で
きる。
Further, if it is desired to use a threshold matrix composed of 16 kinds of thresholds, the table is divided into 16 blocks, 16 kinds of thresholds are distributed to each of the blocks, and the thresholds are arranged at the corresponding element positions. , A multi-valued threshold matrix composed of 16 kinds of thresholds can be easily generated.

【0154】また、このブロックに分ける際、それぞれ
のブロックに含まれる要素位置の数は同一である必要は
ない。利用する出力装置(カラープリンタ24)等の入
出力特性に合わせて、ブロックに含まれる要素位置の数
を変えれば、より優れた効果を生じさせることができ
る。
When dividing into blocks, the number of element positions included in each block does not have to be the same. If the number of element positions included in a block is changed according to the input / output characteristics of the output device (color printer 24) used, a more excellent effect can be produced.

【0155】このようにして、必要な閾値の種類数で前
記テーブルを分割し、それぞれの分割ブロックに閾値を
当てはめて、各要素位置にブロックに対応する閾値を配
置すれば、任意の種類の閾値からなる閾値マトリックス
が容易に生成できる。しかもこのように生成された閾値
マトリックスは前述した各実施の形態の閾値マトリック
スと同様な閾値の配置特性を有しており、同様な優れた
効果を生じさせることができる。
In this way, by dividing the table by the required number of types of threshold values, applying the threshold value to each divided block, and arranging the threshold value corresponding to the block at each element position, an arbitrary threshold value of the threshold value can be obtained. A threshold matrix consisting of can be easily generated. Moreover, the threshold matrix thus generated has the same threshold arrangement characteristics as the threshold matrix of each of the above-described embodiments, and the same excellent effect can be produced.

【0156】[実施の形態8] 前述の実施の形態1では、「1」,「0」の2値閾値マ
トリックスを作成したが、実施の形態1にて作成した図
4,5に例示する2値閾値マトリックスをベースにし
て、図29,30のフローチャートのようにして多値閾
値マトリックスを作成することができる。
[Embodiment 8] In Embodiment 1 described above, a binary threshold matrix of "1" and "0" was created, but in Embodiment 1 illustrated in FIGS. A multi-valued threshold matrix can be created based on the value-threshold matrix as shown in the flowcharts of FIGS.

【0157】まず、図29の処理にて、2値閾値マトリ
ックスの全画素について、前記式5に基づいて期待濃度
D(x,y)を計算する(S702)。この内、「mino
rity value」となる要素の内で、期待濃度D(x,y)
が最大の要素は、「minority value」が密に集まる部分
の「minority value」であるとして、「majority valu
e」に変更される(S704)。
First, in the process of FIG. 29, the expected density D (x, y) is calculated based on the above equation 5 for all the pixels of the binary threshold matrix (S702). Of these, "mino
The expected density D (x, y) among the elements that become “rity value”
The element with the largest value is the "minority value" of the densely gathered "minority value".
It is changed to "e" (S704).

【0158】次にステップS704の変更前における
「minority value」の数を閾値として、多値閾値マトリ
ックス内の該当要素位置に設定する(S706)。次
に、終了か否かが判定され(S708)、「minority v
alue」が2値閾値マトリックス中に残っていれば継続す
るので(S708で「NO」)、再度、ステップS70
2〜S706の処理が繰り返される。こうして、1つづ
つ小さくした閾値の要素位置が設定される。
Next, the number of "minority value" before the change in step S704 is set as a threshold value and the corresponding element position in the multi-valued threshold matrix is set (S706). Next, it is determined whether or not the process is finished (S708), and "minority v
If “alue” remains in the binary threshold matrix, it continues (“NO” in step S708), and thus step S70 is performed again.
The processing of 2 to S706 is repeated. In this way, the element position of the threshold value which is decreased by one is set.

【0159】更に、大きい方の閾値については、図30
のように設定される。まず、2値閾値マトリックスの全
画素について、前記式5に基づいて期待濃度D(x,
y)を計算する(S802)。この内、「majority val
ue」となる要素の内で、前記期待濃度D(x,y)が最
小の要素は、「minority value」が疎に散っている部分
の「majority value」であるとして、「minority valu
e」に変更される(S804)。
Further, regarding the larger threshold value, FIG.
Is set as follows. First, for all pixels in the binary threshold matrix, the expected density D (x,
y) is calculated (S802). Of these, "majority val
Among the elements that become “ue”, the element having the smallest expected density D (x, y) is the “majority value” of the portion where the “minority value” is sparsely distributed, and the “minority valu
It is changed to "e" (S804).

【0160】次にステップS804の変更後における
「minority value」の数を閾値として、多値閾値マトリ
ックス内の該当要素位置に設定する(S806)。次
に、終了か否かが判定され(S808)、「majority v
alue」が2値閾値マトリックス中に残っていれば継続す
るので(S808で「NO」)、再度、ステップS80
2〜S806の処理が繰り返される。こうして、1つづ
つ大きくした閾値の要素位置が設定される。
Next, the number of "minority value" after the change in step S804 is set as a threshold value and the corresponding element position in the multi-valued threshold value matrix is set (S806). Next, it is determined whether or not the processing is to end (S808), and "majority v
If “alue” remains in the binary threshold matrix, it continues (“NO” in step S808), and thus step S80 is performed again.
The processing of 2 to S806 is repeated. In this way, the element position of the threshold value which is increased by one is set.

【0161】したがって、図29,30の処理を行うこ
とにより、全要素の数の種類の閾値からなる多値閾値マ
トリックスが完成する。更に、閾値を識別値として捉え
て、小さい方から大きい方へ、または逆に大きい方から
小さい方へ、要素位置と対応づけて並べたテーブルを作
成すれば、実施の形態7と同様に、必要な閾値の種類数
で前記テーブルを分割し、それぞれの分割ブロックに閾
値を当てはめて、各要素位置にブロックに対応する閾値
を配置すれば、任意の種類の閾値からなる閾値マトリッ
クスが容易に生成できる。しかもこのように生成された
閾値マトリックスは前述した実施の形態1の閾値マトリ
ックスと同様にブルーノイズマスクの性質を有してお
り、同様な優れた効果を生じさせることができる。
Therefore, by performing the processing of FIGS. 29 and 30, a multi-valued threshold matrix consisting of thresholds of the number of types of all elements is completed. Further, if a table is created in which the threshold values are regarded as identification values and are arranged in association with the element positions from the smaller one to the larger one, or conversely from the larger one to the smaller one, it is necessary as in the seventh embodiment. By dividing the table by the number of different types of thresholds, applying the threshold to each divided block, and arranging the threshold corresponding to the block at each element position, a threshold matrix consisting of arbitrary types of thresholds can be easily generated. . Moreover, the threshold matrix thus generated has the characteristics of a blue noise mask like the threshold matrix of the first embodiment described above, and the same excellent effect can be produced.

【0162】[その他] 前記実施の形態2において、所望濃度i=128をステ
ップS430で設定し、ステップS440で2値化処理
した結果を2値化マトリックスF128として閾値マト
リックス記憶部14に保存しても良い。
[Others] In the second embodiment, the desired density i = 128 is set in step S430, and the result of the binarization process in step S440 is stored in the threshold matrix storage unit 14 as the binarization matrix F128. Is also good.

【0163】前記実施の形態4における2値化は、2値
化時に周辺画素から2値化誤差の分配を受けるタイプの
誤差拡散法、いわゆる平均誤差最小法であったが、前記
実施の形態1〜3のごとく、注目画素を2値化した場合
に2値化の誤差を未だ2値化していない周辺の画素の濃
度に分配する方法による誤差拡散法であっても良い。逆
に、実施の形態1〜3は実施の形態4のごとく平均誤差
最小法であっても良い。
The binarization in the fourth embodiment is an error diffusion method of the type in which the binarization error is distributed from the peripheral pixels at the time of binarization, that is, the so-called average error minimum method. 3 to 3, an error diffusion method may be used in which, when a pixel of interest is binarized, the binarization error is distributed to the densities of surrounding pixels that have not been binarized. On the contrary, the first to third embodiments may be the minimum average error method as in the fourth embodiment.

【0164】また、閾値マトリックスは、その各閾値と
2値化処理対象の画素と1:1に対応させていたが、一
つの閾値を近傍同士の複数の画素の閾値として対応させ
ても良い。このような閾値マトリックスをROMに格納
して、レーザプリンタ、インクジェットプリンタあるい
は複写機等の画像形成装置や、イメージスキャナ等の画
像読み取り装置に使用することも可能である。
In the threshold matrix, each threshold and the pixel to be binarized have a one-to-one correspondence, but one threshold may correspond to a plurality of neighboring pixels. It is also possible to store such a threshold matrix in the ROM and use it in an image forming apparatus such as a laser printer, an inkjet printer or a copying machine, or an image reading apparatus such as an image scanner.

【図面の簡単な説明】[Brief description of drawings]

【図1】 実施の形態1としての閾値マトリックス誤差
拡散法による2値化方法が適用された中間調画像データ
2値化装置の概略構成を表すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a halftone image data binarization device to which a binarization method by a threshold matrix error diffusion method is applied as a first embodiment.

【図2】 実施の形態1における閾値マトリックス生成
処理のフローチャートである。
FIG. 2 is a flowchart of threshold matrix generation processing according to the first embodiment.

【図3】 実施の形態1における期待濃度算出上参照さ
れる近傍範囲の説明図である。
FIG. 3 is an explanatory diagram of a neighborhood range referred to in calculating expected density in the first embodiment.

【図4】 実施の形態1における100×100要素の
2値閾値マトリックスの構成説明図である。
FIG. 4 is an explanatory diagram of the configuration of a binary threshold matrix of 100 × 100 elements according to the first embodiment.

【図5】 実施の形態1における128×128要素の
2値閾値マトリックスの構成説明図である。
FIG. 5 is an explanatory diagram of the configuration of a binary threshold matrix of 128 × 128 elements according to the first embodiment.

【図6】 実施の形態1における閾値マトリックス誤差
拡散処理のフローチャートである。
FIG. 6 is a flowchart of threshold matrix error diffusion processing according to the first embodiment.

【図7】 実施の形態1における閾値生成処理のフロー
チャートである。
FIG. 7 is a flowchart of threshold generation processing according to the first embodiment.

【図8】 実施の形態2における閾値マトリックス生成
処理のフローチャートである。
FIG. 8 is a flowchart of threshold matrix generation processing according to the second embodiment.

【図9】 実施の形態2における2値化処理のフローチ
ャートである。
FIG. 9 is a flowchart of a binarization process according to the second embodiment.

【図10】 実施の形態2における均一濃度画素マトリ
ックスの構成説明図である。
FIG. 10 is a diagram illustrating the configuration of a uniform density pixel matrix according to the second embodiment.

【図11】 実施の形態2における2値化マトリックス
の構成説明図である。
FIG. 11 is an explanatory diagram of the configuration of a binarization matrix according to the second embodiment.

【図12】 実施の形態2における2値化マトリックス
の構成説明図である。
FIG. 12 is an explanatory diagram of the configuration of a binarization matrix according to the second embodiment.

【図13】 実施の形態3における均一濃度画素マトリ
ックスと特定領域との関係を示す説明図である。
FIG. 13 is an explanatory diagram showing a relationship between a uniform density pixel matrix and a specific region according to the third embodiment.

【図14】 実施の形態3における2値化マトリックス
作成処理の一部を示すフローチャートである。
FIG. 14 is a flowchart showing a part of a binarization matrix creation process according to the third embodiment.

【図15】 実施の形態4における2値化マトリックス
作成処理の一部を示すフローチャートである。
FIG. 15 is a flowchart showing a part of a binarization matrix creation process according to the fourth embodiment.

【図16】 実施の形態4の2値化処理の連続性説明図
である。
FIG. 16 is an explanatory diagram of continuity of binarization processing according to the fourth embodiment.

【図17】 実施の形態4の誤差分配説明図である。FIG. 17 is an explanatory diagram of error distribution according to the fourth embodiment.

【図18】 実施の形態4の誤差分配説明図である。FIG. 18 is an explanatory diagram of error distribution according to the fourth embodiment.

【図19】 実施の形態4の誤差分配説明図である。FIG. 19 is an explanatory diagram of error distribution according to the fourth embodiment.

【図20】 実施の形態4の誤差分配説明図である。FIG. 20 is an explanatory diagram of error distribution according to the fourth embodiment.

【図21】 実施の形態4の誤差分配説明図である。FIG. 21 is an explanatory diagram of error distribution according to the fourth embodiment.

【図22】 実施の形態4の誤差分配説明図である。FIG. 22 is an explanatory diagram of error distribution according to the fourth embodiment.

【図23】 実施の形態4の各要素位置のオン・オフ設
定状態の説明図である。
FIG. 23 is an explanatory diagram of an on / off setting state of each element position according to the fourth embodiment.

【図24】 実施の形態5の閾値マトリックスの説明図
である。
FIG. 24 is an explanatory diagram of a threshold matrix according to the fifth embodiment.

【図25】 実施の形態5の閾値マトリックスの適用説
明図である。
FIG. 25 is an explanatory diagram of application of a threshold matrix according to the fifth embodiment.

【図26】 実施の形態5の閾値マトリックスの変形例
説明図である。
FIG. 26 is a diagram illustrating a modified example of the threshold matrix according to the fifth embodiment.

【図27】 実施の形態6における2値化マトリックス
の構成説明図である。
FIG. 27 is an explanatory diagram of the configuration of a binarization matrix according to the sixth embodiment.

【図28】 実施の形態6における集積マトリックスの
構成説明図である。
FIG. 28 is an explanatory diagram of a structure of an integrated matrix according to the sixth embodiment.

【図29】 実施の形態8における多値閾値マトリック
ス設定処理1のフローチャートである。
FIG. 29 is a flowchart of a multi-valued threshold matrix setting process 1 according to the eighth embodiment.

【図30】 実施の形態8における多値閾値マトリック
ス設定処理2のフローチャートである。
FIG. 30 is a flowchart of a multi-valued threshold matrix setting process 2 according to the eighth embodiment.

【図31】 小さいサイズの誤差分配マトリックスの一
例を示す説明図である。
FIG. 31 is an explanatory diagram showing an example of a small size error distribution matrix.

【図32】 従来技術の誤差拡散処理のフローチャート
である。
FIG. 32 is a flowchart of a conventional error diffusion process.

【図33】 従来技術の閾値マトリックスの構成説明図
である。
FIG. 33 is an explanatory diagram of the configuration of a threshold matrix of the related art.

【図34】 従来技術の誤差分配マトリックスの構成説
明図である。
FIG. 34 is a diagram illustrating the configuration of a conventional error distribution matrix.

【符号の説明】[Explanation of symbols]

2…中間調画像データ2値化装置 12…CPU 13…プログラム記憶部 14…閾値マトリックス記
憶部 15…誤差分配マトリックス記憶部 16…誤差バッ
ファ 17…入力画像データ記憶部 18…出力画像データ
記憶部 19…作業用メモリ 20…バス 21…キーボー
ド 22…ディスプレイ 23…外部記憶装置 24…
カラープリンタ
2 ... Halftone image data binarization device 12 ... CPU 13 ... Program storage unit 14 ... Threshold matrix storage unit 15 ... Error distribution matrix storage unit 16 ... Error buffer 17 ... Input image data storage unit 18 ... Output image data storage unit 19 Working memory 20 Bus 21 Keyboard 22 Display 23 External storage device 24
Color printer

フロントページの続き (56)参考文献 特開 平7−57081(JP,A) 特開 平7−73310(JP,A) 特開 平8−279920(JP,A) 特開 平4−107068(JP,A) 特開 平4−107067(JP,A) 特開 平4−299668(JP,A) 特開 平4−54768(JP,A) 特開 平6−70170(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04N 1/40 - 1/409 H04N 1/46 H04N 1/60 Continuation of front page (56) Reference JP-A-7-57081 (JP, A) JP-A-7-73310 (JP, A) JP-A-8-279920 (JP, A) JP-A-4-107068 (JP , A) JP-A-4-107067 (JP, A) JP-A-4-299668 (JP, A) JP-A-4-54768 (JP, A) JP-A-6-70170 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) H04N 1/40-1/409 H04N 1/46 H04N 1/60

Claims (17)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力画像の画素濃度と閾値との比較により
中間調画像を2値化する際に生じた誤差を周辺の画素の
2値化に反映させるに際して、前記閾値として、閾値が
位置に応じて設定されている閾値マトリックスから、前
記画素位置に応じて抽出された閾値を用いる閾値マトリ
ックス誤差拡散法による2値化方法であって、 前記閾値マトリックスの閾値の配置が、2次元配置のブ
ルーノイズマスクの手法により形成され、前記閾値マト
リックスを構成している閾値が2種類であることを特徴
とする閾値マトリックス誤差拡散法による2値化方法。
1. When reflecting an error generated when a halftone image is binarized by comparing the pixel density of an input image and the threshold to the binarization of peripheral pixels, the threshold is set to a position. It is a binarization method by a threshold matrix error diffusion method using a threshold value extracted according to the pixel position from a threshold value matrix set accordingly, wherein the threshold values of the threshold value matrix are two-dimensionally arranged in blue. 2. A binarization method by a threshold matrix error diffusion method, characterized in that there are two types of thresholds formed by a noise mask method and forming the threshold matrix.
【請求項2】前記ブルーノイズマスクの手法として、前
記2種類の閾値をランダムに配置したマトリックスの各
値について、その周辺の同一値の期待濃度を求め、期待
濃度の最大となる位置の一方の値を期待濃度の最大とな
る位置の他方の値と入れ替える処理を所定の値分布状態
になるまで繰り返すことにより前記閾値マトリックスを
得ることを特徴とする請求項1記載の閾値マトリックス
誤差拡散法による2値化方法。
2. As a method of the blue noise mask, for each value of a matrix in which the two types of threshold values are randomly arranged, an expected density of the same value around the matrix is obtained, and one of the positions at which the expected density becomes maximum is obtained. 2. The threshold value matrix error diffusion method according to claim 1, wherein the threshold value matrix is obtained by repeating the process of replacing the value with the other value at the position where the expected density is maximum until a predetermined value distribution state is achieved. Valuation method.
【請求項3】前記閾値マトリックスとして、 請求項2にて得られた閾値マトリックスに対して、 前記2種類の閾値のうち個数の少ない方の閾値につい
て、該個数の少ない方の閾値が密に集まる部分の該個数
の少ない方の閾値を個数の多い方の閾値に置き換え、該
要素位置に、置き換える前の前記個数の少ない方の閾値
の存在数を閾値として与えることを繰り返す処理、 および、 前記個数の少ない方の閾値が疎に散る部分の前記個数の
多い方の閾値の要素位置を前記個数の少ない方の閾値に
置き換え、該要素位置に、置き換えた後の前記個数の少
ない方の閾値の存在数を閾値として与えることを繰り返
す処理、 を行って得られた複数種類の閾値からなる閾値マトリッ
クスを用いて得られることを特徴とする閾値マトリック
ス誤差拡散法による2値化方法。
3. As the threshold value matrix, with respect to the threshold value matrix obtained in claim 2, with respect to the threshold value having the smaller number of the two types of threshold values, the threshold value having the smaller number is densely gathered. A process of replacing the smaller number of thresholds of a part with a larger number of thresholds, and giving the element position the existing number of the smaller number of thresholds before replacement as a threshold; Of the threshold value of the larger number in the portion where the threshold value of the smaller number is sparsely distributed, is replaced with the threshold value of the smaller number of threshold values, and the existence of the smaller threshold value after replacement is performed at the element position. The threshold matrix error diffusion method is characterized in that it is obtained by using a threshold matrix consisting of a plurality of types of thresholds obtained by repeating the process of giving a number as a threshold. Binary method.
【請求項4】入力画像の画素濃度と閾値との比較により
中間調画像を2値化する際に生じた誤差を周辺の画素の
2値化に反映させるに際して、前記閾値として、閾値が
位置に応じて設定されている閾値マトリックスから、前
記画素位置に応じて抽出された閾値を用いる閾値マトリ
ックス誤差拡散法による2値化方法であって、 前記閾値マトリックスの閾値の配置が、均一濃度画素マ
トリックスを、画素濃度と閾値との比較により2値化す
る際に生じた誤差を周辺の画素の2値化に反映させて2
値化する誤差拡散法を行い、得られた2値化マトリック
スの2値にそれぞれ2種類の閾値を対応させてなる配置
方法にて行われることを特徴とする閾値マトリックス誤
差拡散法による2値化方法。
4. When the error generated when the halftone image is binarized by comparing the pixel density of the input image with the threshold is reflected in the binarization of the surrounding pixels, the threshold is set to the position. It is a binarization method by a threshold matrix error diffusion method that uses thresholds extracted according to the pixel position from a threshold matrix that is set accordingly, wherein the arrangement of the thresholds of the threshold matrix is a uniform density pixel matrix. , The error generated when binarizing by comparing the pixel density and the threshold value is reflected in the binarization of the surrounding pixels,
The binarization by the threshold value matrix error diffusion method, which is performed by an arrangement method in which the binarization error diffusion method is performed and two values of the obtained binarization matrix are respectively associated with two types of threshold values. Method.
【請求項5】入力画像の画素濃度と閾値との比較により
中間調画像を2値化する際に生じた誤差を周辺の画素の
2値化に反映させるに際して、前記閾値として、閾値が
位置に応じて設定されている閾値マトリックスから、前
記画素位置に応じて抽出された閾値を用いる閾値マトリ
ックス誤差拡散法による2値化方法であって、 異なる濃度の均一濃度画素マトリックスにて既に2値化
された2値化マトリックスの2値化状態を参照しつつ、
均一濃度画素マトリックスの各画素を、画素濃度と閾値
との比較により2値化する際に生じた誤差を周辺の画素
の2値化に反映させて2値化する誤差拡散法を繰り返
し、 この繰り返しにより得られた、所望濃度の均一濃度画素
マトリックスによる2値化マトリックスの2値に、それ
ぞれ2種類の閾値を対応させる配置方法にて、前記閾値
マトリックスの閾値の配置が行われることを特徴とする
閾値マトリックス誤差拡散法による2値化方法。
5. When the error generated when the halftone image is binarized by comparing the pixel density of the input image with the threshold is reflected in the binarization of the surrounding pixels, the threshold is set to the position. This is a binarization method by a threshold matrix error diffusion method that uses thresholds extracted according to the pixel positions from a threshold matrix that is set accordingly, and has already been binarized by uniform density pixel matrices of different densities. While referring to the binarized state of the binarized matrix,
The error diffusion method is repeated in which each pixel of the uniform density pixel matrix is binarized by reflecting an error generated when binarizing the pixel by comparing the pixel density with a threshold, and repeating the binarization. The threshold values of the threshold matrix are arranged by an arranging method in which two kinds of threshold values are respectively associated with the binary values of the binarization matrix by the uniform density pixel matrix of the desired density obtained by A binarization method by a threshold matrix error diffusion method.
【請求項6】入力画像の画素濃度と閾値との比較により
中間調画像を2値化する際に生じた誤差を周辺の画素の
2値化に反映させるに際して、前記閾値として、閾値が
位置に応じて設定されている閾値マトリックスから、前
記画素位置に応じて抽出された閾値を用いる閾値マトリ
ックス誤差拡散法による2値化方法であって、 異なる濃度の均一濃度画素マトリックスにて既に2値化
された2値化マトリックスの2値化状態を参照しつつ、
均一濃度画素マトリックスの各画素を、画素濃度と閾値
との比較により2値化する際に生じた誤差を周辺の画素
の2値化に反映させて2値化する誤差拡散法を繰り返
し、 この繰り返しにより得られた2値化マトリックスのすべ
てについて同一位置の要素毎に2値を集積し、この集積
結果に基づいて、前記閾値マトリックスにおける各要素
の閾値を設定することを特徴とする閾値マトリックス誤
差拡散法による2値化方法。
6. When the error generated when binarizing the halftone image by comparing the pixel density of the input image with the threshold value is reflected in the binarization of peripheral pixels, the threshold value is set at the position. This is a binarization method by a threshold matrix error diffusion method that uses thresholds extracted according to the pixel positions from a threshold matrix that is set accordingly, and has already been binarized by uniform density pixel matrices of different densities. While referring to the binarized state of the binarized matrix,
The error diffusion method is repeated in which each pixel of the uniform density pixel matrix is binarized by reflecting an error generated when binarizing the pixel by comparing the pixel density with a threshold, and repeating the binarization. Threshold matrix error diffusion characterized by accumulating binary values for each element at the same position in all of the binarized matrix obtained by, and setting the threshold value of each element in the threshold matrix based on the integration result. Binarization method by the method.
【請求項7】前記2値化状態の参照が、2値化処理しよ
うとする均一濃度画素マトリックスに最も近い濃度の均
一濃度画素マトリックスの2値化状態を参照することを
特徴とする請求項5または6記載の閾値マトリックス誤
差拡散法による2値化方法。
7. The binarized state reference refers to the binarized state of a uniform density pixel matrix having a density closest to the uniform density pixel matrix to be binarized. Or a binarization method by the threshold matrix error diffusion method described in 6 above.
【請求項8】前記2値化状態の参照が、2値化処理しよ
うとする均一濃度画素マトリックスに最も近い濃度の均
一濃度画素マトリックスによる2値化マトリックスの要
素の内、「1」であるの要素と同じ位置は必ず「1」に
2値化することにより行われることを特徴とする請求項
5〜7のいずれか記載の閾値マトリックス誤差拡散法に
よる2値化方法。
8. The reference of the binarized state is "1" among the elements of the binarization matrix by the uniform density pixel matrix having the density closest to the uniform density pixel matrix to be binarized. 8. The binarization method by the threshold matrix error diffusion method according to claim 5, wherein the same position as the element is always binarized to "1".
【請求項9】前記2値化状態の参照が、2値化処理しよ
うとする均一濃度画素マトリックスに、濃度が低い側お
よび濃度が高い側にそれぞれ最も近い濃度の均一濃度画
素マトリックスの2値化状態を参照することを特徴とす
る請求項5または6記載の閾値マトリックス誤差拡散法
による2値化方法。
9. A binarization of a uniform density pixel matrix whose density is closest to a low density side and a high density side of the uniform density pixel matrix to be binarized. The binarization method by the threshold matrix error diffusion method according to claim 5, wherein the state is referred to.
【請求項10】濃度が高い側の2値化マトリックスにお
いて「1」となり、かつ濃度が低い側の2値化マトリッ
クスにおいても「1」となっている要素位置と同じ位置
は必ず「1」とし、濃度が高い側の2値化マトリックス
において「0」となり、かつ濃度が低い側の2値化マト
リックスにおいても「0」となっている要素位置と同じ
位置は必ず「0」として誤差拡散処理することにより2
値化することを特徴とする請求項9記載の閾値マトリッ
クス誤差拡散法による2値化方法。
10. The same position as the element position which is "1" in the binarization matrix on the high density side and "1" in the binarization matrix on the low density side is always "1". , The same position as the element position that is “0” in the binarization matrix on the high density side and “0” in the binarization matrix on the low density side is always “0” and the error diffusion processing is performed. By 2
The binarization method by the threshold matrix error diffusion method according to claim 9, wherein the binarization method is performed.
【請求項11】最終的に得られた2値化マトリックスの
一部分を構成するマトリックスの2値にそれぞれ2種類
の閾値を対応させてなる配置方法にて行われることを特
徴とする請求項4〜10のいずれか記載の閾値マトリッ
クス誤差拡散法による2値化方法。
11. The arrangement method according to claim 4, wherein the arrangement is performed by associating two kinds of threshold values with binary values of a matrix forming a part of the finally obtained binarized matrix. 12. The binarization method by the threshold value matrix error diffusion method described in any one of 10.
【請求項12】前記閾値マトリックスの記憶に際して
は、閾値の代りに、該閾値の種類を識別するための、該
閾値よりも記憶容量が小さい識別値にて記憶され、前記
閾値マトリックスの使用に際しては、該当する要素位置
から読み出された前記識別値から対応する閾値を形成し
て使用することを特徴とする請求項1,2,4,5,1
1のいずれか記載の閾値マトリックス誤差拡散法による
2値化方法。
12. When storing the threshold value matrix, instead of the threshold value, an identification value for discriminating the type of the threshold value and having a storage capacity smaller than the threshold value is stored. When using the threshold value matrix, , A corresponding threshold value is formed from the identification value read from the corresponding element position and used.
1. A binarization method according to the threshold matrix error diffusion method according to any one of 1.
【請求項13】前記閾値マトリックスの記憶に際して
は、閾値の代りに、該閾値の種類を識別するための識別
値にて記憶され、前記識別値がその要素位置とともに、
値順に配置されたテーブルとして記憶され、前記閾値マ
トリックスの使用に際しては、必要な閾値の種類数に応
じて、前記テーブルを分割して、各分割された識別値に
対して、該当する要素位置にそれぞれ閾値を対応させて
使用することを特徴とする請求項1,2,4,5,11
のいずれか記載の閾値マトリックス誤差拡散法による2
値化方法。
13. When the threshold value matrix is stored, an identification value for identifying the type of the threshold value is stored instead of the threshold value, and the identification value is stored together with the element position thereof.
It is stored as a table arranged in the order of values, and when the threshold matrix is used, the table is divided according to the number of kinds of thresholds required, and for each divided identification value, the corresponding element position is set. The threshold values are associated with each other and used.
2 according to the threshold matrix error diffusion method described in
Valuation method.
【請求項14】閾値が位置に応じて設定されている閾値
マトリックスを生成する手段と、 前記閾値マトリックスから入力画像の画素位置に応じて
閾値を抽出して、該入力画像の画素濃度と前記抽出した
閾値との比較により中間調画像を2値化すると共に、該
2値化の際に生じた誤差を周辺の画素の2値化に反映さ
せる手段と、 を備えた、閾値マトリックス誤差拡散法による2値化方
法を実行するためのコンピュータシステムであって、 前記閾値マトリックスを生成する手段は、2次元配置の
ブルーノイズマスクの手法により2種類の閾値にて構成
された前記閾値マトリックスを配置させることを特徴と
するコンピュータシステム。
14. A threshold set according to a position.
A means for generating a matrix and , depending on the pixel position of the input image from the threshold matrix,
The threshold value is extracted, and the pixel density of the input image and the extracted
The halftone image is binarized by comparison with a threshold and
The error generated during binarization is reflected in the binarization of surrounding pixels.
A threshold value matrix error diffusion method for binarizing
A computer system for performing the method, the means for generating the threshold matrix comprising a two-dimensional arrangement.
Configured with two types of threshold values using the blue noise mask method
Characterized by arranging the threshold matrix
Computer system to do.
【請求項15】閾値が位置に応じて設定されている閾値15. A threshold set according to a position
マトリックスを生成する手段と、Means for generating a matrix, 前記閾値マトリックスから入力画像の画素位置に応じてDepending on the pixel position of the input image from the threshold matrix
閾値を抽出して、該入力画像の画素濃度と前記抽出したThe threshold value is extracted, and the pixel density of the input image and the extracted
閾値との比較により中間調画像を2値化すると共に、該The halftone image is binarized by comparison with a threshold and
2値化の際に生じた誤差を周辺の画素の2値化に反映さThe error generated during binarization is reflected in the binarization of surrounding pixels.
せる手段と、Means to を備えた、閾値マトリックス誤差拡散法による2値化方Thresholding method using the threshold matrix error diffusion method
法を実行するためのコンピュータシステムであって、A computer system for performing a law, 前記閾値マトリックスを生成する手段は、The means for generating the threshold matrix comprises 均一濃度画素マトリックスにおける各画素の画素濃度とThe pixel density of each pixel in the uniform density pixel matrix
閾値との比較により2値化する際に生じた誤差を周辺のThe error generated when binarizing by comparing with the threshold value
画素の2値化に反映させて2値化する誤差拡散法を該均The error diffusion method of binarizing by reflecting it in the binarization of pixels
一濃度画素マトリックスに行う手段と、Means for performing a one-density pixel matrix, 該誤差拡散法を行う手段により得られた2値化マトリッBinarized matrix obtained by the means for performing the error diffusion method.
クスの2値にそれぞれ2種類の閾値を対応させてなる配The distribution is made by associating two kinds of thresholds with each binary
置方法にて、前記閾値マトリックスの閾値の配置を行うThe thresholds of the threshold matrix are arranged according to the placement method.
手段と、Means and を備えたことを特徴とするコンピュータシステム。A computer system comprising:
【請求項16】閾値が位置に応じて設定されている閾値16. A threshold value set according to a position.
マトリックスを生成する手段と、Means for generating a matrix, 前記閾値マトリックスから入力画像の画素位置に応じてDepending on the pixel position of the input image from the threshold matrix
閾値を抽出して、該入力画像の画素濃度と前記抽出したThe threshold value is extracted, and the pixel density of the input image and the extracted
閾値との比較により中間調画像を2値化すると共に、該The halftone image is binarized by comparison with a threshold and
2値化の際に生じた誤差を周辺の画素の2値化に反映さThe error generated during binarization is reflected in the binarization of surrounding pixels.
せる手段と、Means to を備えた、閾値マトリックス誤差拡散法による2値化方Thresholding method using the threshold matrix error diffusion method
法を実行するためのコンピュータシステムであって、A computer system for performing a law, 前記閾値マトリックスを生成する手段は、The means for generating the threshold matrix comprises 異なる濃度の均一濃度画素マトリックスにて既に2値化Already binarized with uniform density pixel matrix of different density
された2値化マトリックスの2値化状態を参照しつつ、While referring to the binarized state of the binarized matrix,
均一濃度画素マトリックスの各画素を、画素濃度と閾値Pixel density and threshold for each pixel in the uniform density pixel matrix
との比較により2値化する際に生じた誤差を周辺の画素The error generated when binarizing by comparing with
の2値化に反映Reflected in the binarization of させて2値化する誤差拡散法を繰り返すRepeat the error diffusion method for binarization
手段と、Means and 該繰り返す手段により得られた、所望濃度の均一濃度画Uniform concentration image of desired concentration obtained by the repeating means
素マトリックスによる2値化マトリックスの2値に、そBinarization of a prime matrix
れぞれ2種類の閾値を対応させる配置方法にて、前記閾The threshold value is set by using an arrangement method in which two types of threshold values are associated with each other.
値マトリックスの閾値の配置を行う手段と、Means for arranging the thresholds of the value matrix, を備えたことを特徴とするコンピュータシステム。A computer system comprising:
【請求項17】閾値が位置に応じて設定されている閾値17. A threshold value set according to position.
マトリックスを生成する手段と、Means for generating a matrix, 前記閾値マトリックスから入力画像の画素位置に応じてDepending on the pixel position of the input image from the threshold matrix
閾値を抽出して、該入力画像の画素濃度と前記抽出したThe threshold value is extracted, and the pixel density of the input image and the extracted
閾値との比較により中間調画像を2値化すると共に、該The halftone image is binarized by comparison with a threshold and
2値化の際に生じた誤差を周辺の画素の2値化に反映さThe error generated during binarization is reflected in the binarization of surrounding pixels.
せる手段と、Means to を備えた、閾値マトリックス誤差拡散法による2値化方Thresholding method using the threshold matrix error diffusion method
法を実行するためのコンピュータシステムであって、A computer system for performing a law, 前記閾値マトリックスを生成する手段は、The means for generating the threshold matrix comprises 異なる濃度の均一濃度画素マトリックスにて既に2値化Already binarized with uniform density pixel matrix of different density
された2値化マトリックスの2値化状態を参照しつつ、While referring to the binarized state of the binarized matrix,
均一濃度画素マトリックスの各画素を、画素濃度と閾値Pixel density and threshold for each pixel in the uniform density pixel matrix
との比較により2値化する際に生じた誤差を周辺の画素The error generated when binarizing by comparing with
の2値化に反映させて2値化する誤差拡散法を繰り返すRepeat the error diffusion method of binarizing by reflecting it in the binarization of
手段と、Means and 該繰り返す手段により得られた2値化マトリックスのすThe binarized matrix obtained by the repeating means.
べてについて同一位置の要素毎に2値を集積し、この集This is a collection of binary values for all elements at the same position.
積結果に基づいて、前記閾値マトリックスにおける各要Based on the product result, each element in the threshold matrix is
素の閾値を設定する手段と、Means for setting a prime threshold, を備えたことを特徴とするコンピュータシステム。A computer system comprising:
JP30834396A 1996-11-19 1996-11-19 Threshold value matrix error diffusion binarization method and computer system Expired - Fee Related JP3431780B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP30834396A JP3431780B2 (en) 1996-11-19 1996-11-19 Threshold value matrix error diffusion binarization method and computer system
US08/971,189 US6108450A (en) 1996-11-19 1997-11-17 Threshold matrix-employed error diffusion image conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30834396A JP3431780B2 (en) 1996-11-19 1996-11-19 Threshold value matrix error diffusion binarization method and computer system

Publications (2)

Publication Number Publication Date
JPH10150565A JPH10150565A (en) 1998-06-02
JP3431780B2 true JP3431780B2 (en) 2003-07-28

Family

ID=17979927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30834396A Expired - Fee Related JP3431780B2 (en) 1996-11-19 1996-11-19 Threshold value matrix error diffusion binarization method and computer system

Country Status (1)

Country Link
JP (1) JP3431780B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003028362A1 (en) * 2001-09-21 2003-04-03 Ricoh Company, Ltd. Threshold value matrix creating method, image output system, storage medium, gradation reproducing method, threshold value matrix, image processing method, image processing apparatus, image forming apparatus and printer driver
JP3949931B2 (en) 2001-10-30 2007-07-25 株式会社ルネサステクノロジ Image forming apparatus
JP4670921B2 (en) 2008-09-12 2011-04-13 ブラザー工業株式会社 Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JPH10150565A (en) 1998-06-02

Similar Documents

Publication Publication Date Title
EP0356225B1 (en) Image processing apparatus
JP4107059B2 (en) Image processing method and image processing apparatus
EP1133162B1 (en) Method and apparatus for gradation reproduction of continuous tone image
US20020071140A1 (en) Threshold matrix, and method and apparatus of reproducing gray levels using threshold matrix
US6108450A (en) Threshold matrix-employed error diffusion image conversion method
JP3431780B2 (en) Threshold value matrix error diffusion binarization method and computer system
JP3431778B2 (en) Threshold value matrix error diffusion binarization method and computer system
US6195468B1 (en) Error-distributing image conversion method
US6185006B1 (en) Error-distributing image conversion method
JP3834901B2 (en) Method for binarizing halftone images
JP3431779B2 (en) Threshold value matrix error diffusion binarization method and computer system
JP3287717B2 (en) Image processing device
JPH03151762A (en) Picture processor
JP3399341B2 (en) Image processing method and image processing apparatus
JP2018160883A (en) Image processing apparatus, image forming apparatus, image processing method, and image processing program
JP2003198843A (en) Reduced-buffer error diffusion
JP2745527B2 (en) Halftone image reproduction method
JP3402118B2 (en) Image signal processing method and image signal processing device
JP3136285B2 (en) Image processing apparatus and image processing method
JP3965713B2 (en) Color image binarization method by error diffusion method
JP3740732B2 (en) Dither matrix creation method
JP3300582B2 (en) Image processing device
JPH08321949A (en) Binarization processing method for intermediate tone image
JPH0465974A (en) Image processor
JPH1056568A (en) Image processor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080523

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090523

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090523

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100523

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130523

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130523

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20140523

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees