JP2010109441A - Image processing apparatus, image processing method, image processing program, and storage medium - Google Patents

Image processing apparatus, image processing method, image processing program, and storage medium Download PDF

Info

Publication number
JP2010109441A
JP2010109441A JP2008276802A JP2008276802A JP2010109441A JP 2010109441 A JP2010109441 A JP 2010109441A JP 2008276802 A JP2008276802 A JP 2008276802A JP 2008276802 A JP2008276802 A JP 2008276802A JP 2010109441 A JP2010109441 A JP 2010109441A
Authority
JP
Japan
Prior art keywords
quantization
value
correction
error
image processing
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.)
Pending
Application number
JP2008276802A
Other languages
Japanese (ja)
Inventor
Takashi Ishikawa
尚 石川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2008276802A priority Critical patent/JP2010109441A/en
Publication of JP2010109441A publication Critical patent/JP2010109441A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus for easily performing even pseudo-halftone processing with many output gradations fast and also performing systematized pseudo-halftone processing without depending upon the number of output gradations. <P>SOLUTION: The image processing apparatus which performs pseudo-halftone processing by error diffusion processing on multivalued image data comprising a plurality of density components performs quantization by the plurality of density components, determines a correction value for a quantization output value by comparing the sum of a negative sign of a quantization error of each density component and a quantization error of the each density component with a threshold, and spreads quantization errors after correcting the quantization output value with the correction value. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は画像処理方法及び画像処理装置に係り、とりわけ、入力画像濃度と出力画像濃度等の差を誤差拡散法等により保存しつつ、入力データを2値又は多値データへと量子化する画像処理方法及び画像処理装置に関する。   The present invention relates to an image processing method and an image processing apparatus, and in particular, an image for quantizing input data into binary or multi-value data while storing a difference between input image density and output image density by an error diffusion method or the like. The present invention relates to a processing method and an image processing apparatus.

従来、入力多値データを、2値又は入力多値データのレベルよりも少ないレベルの多値で表現するには、疑似中間調処理が用いられる。その一例として誤差拡散法が知られている。この誤差拡散法については、“An Adaptive Algorithm for Spatial Gray Scale”in society for Information Display 1975 Symposium Digest of Technical Papers,1975,36で発表されている。この方法では、着目画素をPとし、その画素の濃度をvとし、Pの周辺に存在する2値化処理前の画素P0、P1、P2、P3の濃度をそれぞれv0、v1、v2、v3とし、2値化のための閾値をTとして、経験的に求めた重み係数W0、W1、W2、W3を用い、着目点Pにおける2値化誤差Eを重み付けし、周辺画素P0、P1、P2、P3のそれぞれへと配分するものである。すなわち、この方法は、マクロ的に出力画像の平均濃度を入力画像の濃度と等しくする方法である。このとき、出力2値データをoとすると、以下の式により周辺画素P0、P1、P2、P3に対する誤差E0、E1、E2、E3を求めることができる。   Conventionally, pseudo-halftone processing is used to represent input multilevel data with multilevels having a level lower than that of binary or input multilevel data. As an example, an error diffusion method is known. This error diffusion method is published in “An Adaptive Algorithm for Spatial Gray Scale” in society for Information Display 1975 Symposium Digest of Technol, 75. In this method, the pixel of interest is P, the density of the pixel is v, and the densities of pixels P0, P1, P2, and P3 existing around P before binarization are v0, v1, v2, and v3, respectively. The threshold for binarization is set to T, and the weighting factors W0, W1, W2, and W3 obtained empirically are used to weight the binarization error E at the point of interest P, and the surrounding pixels P0, P1, P2, Allocate to each of P3. That is, this method is a method of making the average density of the output image equal to the density of the input image in a macro manner. At this time, if the output binary data is o, errors E0, E1, E2, and E3 with respect to the surrounding pixels P0, P1, P2, and P3 can be obtained by the following formula.

v≧Tならばo=1、E=v−Vmax
v<Tならばo=0、E=v−Vmin
(ただし、Vmax:最大濃度、Vmin:最小濃度)
E0=E×W0;
E1=E×W1;
E2=E×W2;
E3=E×W3;
(重み係数の例:W0=7/16,W1=1/16,W2=5/16,W3=3/16)
ところで、カラーインクジェットプリンタ等では、シアン(C)、マゼンタ(M)、イエロ(Y)、ブラック(K)等のインクを用いて多値画像データを出力する際、各色独立に誤差拡散法等を用いて擬似中間調処理を行っていた。このため、1色について見た場合には高画質に見えていても、2色以上が重なり合うと必ずしも良好な画質が得られない場合があった。
If v ≧ T, o = 1, E = v−Vmax
If v <T, o = 0, E = v-Vmin
(However, Vmax: maximum density, Vmin: minimum density)
E0 = E × W0;
E1 = E × W1;
E2 = E × W2;
E3 = E × W3;
(Examples of weighting factors: W0 = 7/16, W1 = 1/16, W2 = 5/16, W3 = 3/16)
By the way, in a color ink jet printer or the like, when outputting multi-value image data using inks such as cyan (C), magenta (M), yellow (Y), and black (K), an error diffusion method or the like is independently used for each color. Used to perform pseudo halftone processing. For this reason, when one color is seen, even if it looks high in quality, if two or more colors overlap, a good image quality may not always be obtained.

この問題を改善するために、特開平8−279920号公報及び特開平11−10918号公報等においては、2色以上を組み合わせて誤差拡散法を用いることにより、2色以上が重なり合う場合においても視覚的に良好な擬似中間調処理方法が開示されている。   In order to improve this problem, in Japanese Patent Application Laid-Open Nos. 8-279920 and 11-10918, an error diffusion method is used by combining two or more colors, so that even when two or more colors overlap, An excellent pseudo halftone processing method is disclosed.

また、特開平9−139841号公報においては、2色以上を独立に擬似中階調処理した後に、入力値の合計により出力値の修正を行うことにより、上記と同様の効果が得られる方法が開示されている。   Japanese Patent Laid-Open No. 9-139841 discloses a method in which the same effect as described above can be obtained by correcting the output value by summing up the input values after performing pseudo-middle gradation processing on two or more colors independently. It is disclosed.

特に、カラー画像の中濃度領域の粒状感を低減するのに、シアン(C)成分とマゼンタ(M)成分のドットが互いに重なり合わない様に画像処理をすることが効果的であり、そのために以下の方法が用いられている。   In particular, it is effective to perform image processing so that the dots of the cyan (C) component and the magenta (M) component do not overlap each other in order to reduce the graininess in the middle density region of the color image. The following method is used.

図9は、従来のカラー画像の画像処理方法を説明する説明図である。   FIG. 9 is an explanatory view for explaining a conventional color image processing method.

図9において、カラー画像の画像データは、その各画素、各濃度成分(YMCK)が8ビット(階調値が0〜255)の多値データで表現されている。画像データにおける任意の注目画素のシアン(C)成分の濃度値Ctとマゼンタ(M)成分の濃度値Mtは、原画像のC成分とM成分の濃度値をそれぞれC、Mとすると、次式で表される。ここで、CeとMeは、それぞれC成分とM成分の注目画素に対して誤差拡散された値である。   In FIG. 9, the image data of a color image is expressed by multi-value data in which each pixel and each density component (YMCK) are 8 bits (gradation value is 0 to 255). The density value Ct of the cyan (C) component and the density value Mt of the magenta (M) component of an arbitrary pixel of interest in the image data are given by the following equations, where C and M are the density values of the original image: It is represented by Here, Ce and Me are values obtained by error diffusion with respect to the target pixel of the C component and the M component, respectively.

Ct=C+Ce
Mt=M+Me
従来のカラー画像の画像処理方法では、注目画素のC成分とM成分の濃度に従って以下に示す4通りの画像処理制御を行う。
Ct = C + Ce
Mt = M + Me
In a conventional color image processing method, the following four types of image processing control are performed according to the density of the C component and M component of the target pixel.

1.(Ct+Mt)が閾値Th1以下である場合、即ち、図9に示す領域1に属する場合にはドット記録を行わない。   1. When (Ct + Mt) is equal to or less than the threshold Th1, that is, when it belongs to the region 1 shown in FIG. 9, dot recording is not performed.

2.(Ct+Mt)が閾値Th1を越えており、且つ(Ct+Mt)が別の閾値Th2以下であり、且つCt>Mtである場合、即ち、図9の領域2に属する場合には、Cインクのみでドット記録を行う。   2. If (Ct + Mt) exceeds the threshold value Th1, and (Ct + Mt) is not more than another threshold value Th2 and Ct> Mt, that is, if it belongs to the region 2 in FIG. Make a record.

3.(Ct+Mt)が閾値Th1を越えており、且つ(Ct+Mt)が別の閾値Th2以下であり、且つCt≦Mtである場合、即ち、図9の領域3に属する場合には、Mインクのみでドット記録を行う。   3. If (Ct + Mt) exceeds the threshold value Th1, and (Ct + Mt) is equal to or less than another threshold value Th2 and Ct ≦ Mt, that is, belongs to the region 3 in FIG. Make a record.

4.(Ct+Mt)が別の閾値Th2を越えている場合、即ち、図9の領域4に属する場合には、Cインク及びMインクを用いてドット記録を行う。なお、Th1<Th2であるとする。
特開平8−279920号公報 特開平11−10918号公報 特開平9−139841号公報
4). When (Ct + Mt) exceeds another threshold value Th2, that is, when it belongs to the region 4 in FIG. 9, dot recording is performed using C ink and M ink. It is assumed that Th1 <Th2.
JP-A-8-279920 Japanese Patent Laid-Open No. 11-10918 Japanese Patent Laid-Open No. 9-139841

しかしながら、上記従来の画像処理方法では、量子化を行う場合に階調数が多くなればなるほど判定式が複雑化し、処理時間が余計にかかってしまうという問題がある。例えば、従来の画像処理方法によりシアンとマゼンタを3値に量子化した場合のアルゴリズムを次式に示す。   However, the above-described conventional image processing method has a problem in that as the number of gradations increases when quantization is performed, the determination formula becomes more complicated and the processing time becomes longer. For example, the following equation shows an algorithm when cyan and magenta are quantized to three values by a conventional image processing method.

Ct=C+Ce
Mt=M+Me
Cout=0
Mout=0
if(Ct+Mt>Threshold1)
if(Ct+Mt<Threshold2)
if(Ct>Mt)
Cout=1
else
Mout=1
else
if(Ct+Mt<Threshold3)
if(Ct>Mt+Const1)
Cout=2
else
if(Mt<Ct+Const1)
Mout=2
else
Cout=1
Mout=1
else
if(Ct+Mt<Threshold4)
if(Ct>Mt)
Cout=2
Mout=1
else
Cout=1
Mout=2
else
Cout=2
Mout=2
このように、シアンとマゼンタを3値に量子化するだけでも複雑な処理となり、より多い階調に量子化する場合には更に複雑となる。
Ct = C + Ce
Mt = M + Me
Cout = 0
Mout = 0
if (Ct + Mt> Threshold1)
if (Ct + Mt <Threshold2)
if (Ct> Mt)
Cout = 1
else
Mout = 1
else
if (Ct + Mt <Threshold3)
if (Ct> Mt + Const1)
Cout = 2
else
if (Mt <Ct + Const1)
Mout = 2
else
Cout = 1
Mout = 1
else
if (Ct + Mt <Threshold4)
if (Ct> Mt)
Cout = 2
Mout = 1
else
Cout = 1
Mout = 2
else
Cout = 2
Mout = 2
As described above, even when cyan and magenta are quantized to ternary values, the processing becomes complicated, and when quantizing to more gradations, the processing becomes more complicated.

本発明は、上記問題に鑑みてなされたものであり、より出力階調数の多い擬似中間調処理(ハーフトーン)においても高速かつ簡単に処理が可能で、且つ出力階調数に依存せず統一的な擬似中間調処理を行うことができる画像処理方法及び装置を提供することを目的とする。   The present invention has been made in view of the above problems, and can be processed at high speed and easily even in pseudo halftone processing (halftone) with a larger number of output gradations, and does not depend on the number of output gradations. An object of the present invention is to provide an image processing method and apparatus capable of performing unified pseudo-halftone processing.

上記目的を達成するために、本発明の画像処理装置は、複数の濃度成分からなる多値画像データに擬似中間調処理を行う誤差拡散処理手段を備える画像処理装置であって、前記複数の濃度成分毎に量子化を行い、各濃度成分の量子化誤差の負号及び注目画素近傍の量子化誤差負号の数、乱数、各濃度成分の量子化誤差の比較結果により補正値を決定し、量子化出力値を補正した後、量子化誤差を拡散することを特徴とする。   In order to achieve the above object, an image processing apparatus of the present invention is an image processing apparatus comprising error diffusion processing means for performing pseudo halftone processing on multi-value image data composed of a plurality of density components, wherein the plurality of density Perform quantization for each component, determine the correction value based on the comparison result of the quantization error negative sign of each density component, the number of quantization error negative signs near the pixel of interest, random numbers, and the quantization error of each density component, After the quantization output value is corrected, the quantization error is diffused.

以上、説明したように第1の観点によれば、量子化誤差の負号の一致及び量子化誤差の和と閾値との比較にて補正領域の判定を行うため、簡単に補正領域の判定ができ、補正値を容易に生成できる。また、補正される色プレーンの優先順位を近傍画素の量子化誤差負号数によって決定することで少ないメモリ容量で効率的なドットの分散が可能となる。さらに、近傍画素の量子化誤差負号数が同一の場合、乱数にて上記優先順位を決定することにより、同一色ドットの繋がりを排除することができる。なお、これらの処理は量子化レベル数に依存しないため、容易にN値の誤差拡散に拡張できる。さらに、上述したように3色以上への拡張も可能である。   As described above, according to the first aspect, since the correction area is determined by matching the negative sign of the quantization error and comparing the sum of the quantization errors with the threshold value, the correction area can be easily determined. The correction value can be easily generated. Further, by determining the priority order of the color planes to be corrected based on the quantization error negative number of neighboring pixels, efficient dot distribution can be achieved with a small memory capacity. Furthermore, when the quantization error negative signs of neighboring pixels are the same, the connection of the same color dots can be eliminated by determining the priority order with a random number. Since these processes do not depend on the number of quantization levels, they can be easily expanded to N-value error diffusion. Furthermore, as described above, expansion to three or more colors is also possible.

また、第2の観点によれば、色プレーン毎に閾値が逐次変更されても、量子化誤差の負号の一致及び量子化誤差の一部のビットの比較にて補正領域の判定を行うため、簡単に補正領域の判定ができ、補正値生成も容易となる。   Further, according to the second aspect, even if the threshold value is sequentially changed for each color plane, the correction area is determined by matching the negative sign of the quantization error and comparing some bits of the quantization error. The correction area can be easily determined, and correction value generation is facilitated.

また、第3の観点によれば、入力濃度値に応じて補正領域判定方法を切り替えているので、粒状感の少ない最適な色間の重なりを容易に得ることができる。   Further, according to the third aspect, since the correction area determination method is switched according to the input density value, it is possible to easily obtain the optimum overlap between colors with little graininess.

次に、本発明の詳細を実施例の記述に従って説明する。   Next, details of the present invention will be described in accordance with the description of the embodiments.

以下、図面を参照して本発明の実施形態を詳細に説明する。図1は本発明の第1の実施形態に係わる画像処理装置の構成を説明するブロック図である。ここでは便宜上、シアンとマゼンタの2つの色プレーンに処理を施すものとする。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating the configuration of an image processing apparatus according to the first embodiment of the present invention. Here, for convenience, it is assumed that processing is performed on two color planes of cyan and magenta.

図1において1,2は加算器であり、拡散フィルタ3,4からの補正値を入力画像の画素値C,Mに各々加算する。3,4は拡散フィルタであり、量子化誤差の拡散対象画素の量子化誤差に、対応する拡散係数を乗して総和を求め、補正値として加算器1,2にて次の入力画像の画素値に各々加算する。5,6は減算器であり、拡散フィルタ3,4により補正された入力画像の画素値から逆量子化器17,18から出力される量子化代表値を減算することで量子化誤差を生成し、各々拡散フィルタ3,4に入力する。7,8は減算器であり、拡散フィルタ3,4により補正された入力画像の画素値より逆量子化器13,14から出力される量子化代表値を減算することで量子化コード補正前の量子化誤差を生成し、各々補正領域判定部19に入力する。9,10は加算器であり、上記補正された入力画像の画素値に閾値生成部24より生成される閾値Thを各々加算する。11,12は量子化器であり、閾値Thが加算された入力画素値を所定の量子化ステップにて各々量子化する。13,14は逆量子化器であり、量子化器11,12の出力コードを量子化代表値に各々変換する。15,16は加算器であり、補正値生成部20から出力される補正値を加算して上記出力コードを補正する。17,18は逆量子化器であり、上記補正された出力コードを量子化代表値に各々変換する。19は補正領域判定部であり、補正前の量子化誤差の負号及び閾値Thから補正領域内外の判定を行い、補正領域と判定した場合、負号数カウント部21,22より出力される近傍画素の負号の数を比較し、判定結果を補正値生成部20に入力する。20は補正値生成部であり、量子化器11,12の出力コード及び補正領域判定部19の判定結果、乱数生成部23からの乱数から補正値を生成し、出力コード補正値として加算器15,16に入力する。21,22は負号数カウント部であり、注目画素近傍の量子化誤差の負号の数(即ち、量子化誤差が負となった画素の数)をカウントする。23は乱数生成部であり、例えば、LFSR(Linear Feedback Shift Register)を用いていたM系列乱数等の公知の乱数生成方法を用いて、1ビットの乱数を生成する。24は閾値生成部であり、例えば、負号数カウント部21,22より出力される近傍画素の量子化誤差負号の数より閾値を変動させる。   In FIG. 1, reference numerals 1 and 2 denote adders, which add correction values from the diffusion filters 3 and 4 to pixel values C and M of the input image, respectively. Numerals 3 and 4 denote diffusion filters, which are obtained by multiplying the quantization error of the quantization error diffusion target pixel by the corresponding diffusion coefficient to obtain a sum, and adders 1 and 2 as the correction values are pixels of the next input image. Add to each value. Reference numerals 5 and 6 denote subtractors, which generate quantization errors by subtracting the quantized representative values output from the inverse quantizers 17 and 18 from the pixel values of the input image corrected by the diffusion filters 3 and 4. Are respectively input to the diffusion filters 3 and 4. Reference numerals 7 and 8 denote subtracters, which subtract the quantized representative values output from the inverse quantizers 13 and 14 from the pixel values of the input image corrected by the diffusion filters 3 and 4 before the quantization code correction. Quantization errors are generated and input to the correction area determination unit 19, respectively. Reference numerals 9 and 10 denote adders, which respectively add the threshold value Th generated by the threshold value generation unit 24 to the pixel value of the corrected input image. Reference numerals 11 and 12 denote quantizers that quantize the input pixel values to which the threshold value Th is added in a predetermined quantization step. Reference numerals 13 and 14 denote inverse quantizers that convert the output codes of the quantizers 11 and 12 into quantized representative values, respectively. Reference numerals 15 and 16 denote adders that correct the output code by adding the correction values output from the correction value generator 20. Reference numerals 17 and 18 denote inverse quantizers that convert the corrected output codes into quantized representative values, respectively. Reference numeral 19 denotes a correction area determination unit, which determines whether the correction area is inside or outside from the negative sign of the quantization error before correction and the threshold value Th. If the correction area is determined, the vicinity output from the negative number counting units 21 and 22 The negative numbers of the pixels are compared, and the determination result is input to the correction value generation unit 20. A correction value generation unit 20 generates a correction value from the output codes of the quantizers 11 and 12, the determination result of the correction region determination unit 19, and the random number from the random number generation unit 23, and the adder 15 , 16. Reference numerals 21 and 22 denote negative number counting units, which count the number of negative signs of quantization errors in the vicinity of the target pixel (that is, the number of pixels in which the quantization error is negative). A random number generator 23 generates a 1-bit random number by using a known random number generation method such as an M-sequence random number using LFSR (Linear Feedback Shift Register). Reference numeral 24 denotes a threshold value generator, which varies the threshold value based on the number of negative signs of neighboring pixels output from the negative number counters 21 and 22, for example.

まず、量子化処理について具体的に説明する。以下では3値の誤差拡散に本発明を適用した場合の具体的な数値を記載する。   First, the quantization process will be specifically described. Hereinafter, specific numerical values when the present invention is applied to ternary error diffusion will be described.

周辺の量子化誤差により補正された入力画素データは加算器9,10にて閾値Thが各々加算される。ここで、量子化器11,12の量子化特性を線形とし、入力画素値をxとすれば、出力コードc、量子化代表値rは次式のようになる。   The threshold value Th is added to the input pixel data corrected by the peripheral quantization error by the adders 9 and 10, respectively. Here, if the quantization characteristics of the quantizers 11 and 12 are linear and the input pixel value is x, the output code c and the quantized representative value r are as follows.

x<64の時c=0、r=0
64≦x<192の時c=1、r=128
192≦xの時c=2、r=255
即ち、上記閾値Thとして64を入力画素に加算し、キャリーとMSBを取り出せば出力コードcとなり、下位7ビットを0でパディングすれば量子化代表値rとなる。但し、出力コードc=2の時の上記方法により生成される量子化代表値r=256は入力画素データのレンジを越えてしまうので、キャリーが1の時の量子化代表値は全ビットを1(即ち255)とする。これにより、量子化器11,12、逆量子化器13,14,17,18は単純化される。なお、“はき寄せ”や“テクスチャ”を排除するため、閾値を変動させた場合も同様に閾値Thを加算することで対応できる。
When x <64, c = 0, r = 0
When 64 ≦ x <192, c = 1, r = 128
When 192 ≦ x, c = 2, r = 255
That is, 64 is added to the input pixel as the threshold Th, and if the carry and MSB are extracted, the output code c is obtained, and if the lower 7 bits are padded with 0, the quantized representative value r is obtained. However, since the quantized representative value r = 256 generated by the above method when the output code c = 2 exceeds the range of the input pixel data, the quantized representative value when the carry is 1 is set to 1 for all bits. (Ie 255). As a result, the quantizers 11 and 12 and the inverse quantizers 13, 14, 17, and 18 are simplified. It should be noted that in order to eliminate “creaking” and “texture”, even when the threshold value is changed, it can be dealt with by similarly adding the threshold value Th.

次に、図2のフローチャートを用いて具体的な補正処理を詳細に説明する。図2は本発明の第1の実施形態に係わる補正処理を説明するフローチャートである。以下では、補正する色プレーンをC,Mの2色とし、補正前の量子化誤差をCer,Mer、近傍画素の量子化誤差負号の数をCss,Mssとして説明する。   Next, specific correction processing will be described in detail with reference to the flowchart of FIG. FIG. 2 is a flowchart for explaining a correction process according to the first embodiment of the present invention. In the following description, it is assumed that the color plane to be corrected is two colors C and M, the quantization error before correction is Cer and Mer, and the numbers of negative quantization error of neighboring pixels are Css and Mss.

ステップS1では拡散フィルタ3,4により補正された入力画像の画素値Ct,Mtより量子化誤差Cer,Merを求める。ステップS2では量子化誤差Cer,Merの負号が一致するかを判定し、負号が一致しない場合は出力コードの補正なしと判断し、補正値を0としてステップS23へ進む。ステップS23では決定された補正値を出力コードに加算した後、量子化誤差を求め、量子化誤差を周囲の画素に拡散し、ステップS24へ進む。ステップS24では、全画素の処理の終了を判定し、全画素の処理が終了した場合は、処理を終了し、全画素の処理が終了していない場合は、次の画素の処理をするためステップS1へ戻る。   In step S1, quantization errors Cer and Mer are obtained from the pixel values Ct and Mt of the input image corrected by the diffusion filters 3 and 4. In step S2, it is determined whether or not the negative signs of the quantization errors Cer and Mer match. If the negative signs do not match, it is determined that the output code is not corrected, the correction value is set to 0, and the process proceeds to step S23. In step S23, after the determined correction value is added to the output code, a quantization error is obtained, the quantization error is diffused to surrounding pixels, and the process proceeds to step S24. In step S24, it is determined whether or not all pixels have been processed. If all pixels have been processed, the process ends. If all pixels have not been processed, the next pixel is processed. Return to S1.

一方、ステップS2で量子化誤差Cer,Merの負号が一致すると判定された場合はステップS3へ進む。ステップS3では量子化誤差Cer,Merの和が閾値Thを超えているか、あるいは量子化誤差Cer,Merの和が閾値Thから量子化ステップ幅Qsを引いた値Th−Qs未満であるかを判定し、上記条件を満たしていない場合は出力コードの補正なしと判断し、補正値を0としてステップS23へ進み、上記条件を満たしている場合はステップS4へ進む。ステップS4では色プレーン毎に近傍画素の量子化誤差負号の数Css,Mssを求め、ステップS5へ進む。ステップS4では上記近傍画素の量子化誤差負号の数Css,Mssが等しいかどうかを判定し、Css≠MssであればステップS6へ、Css=MssであればステップS7へ進む。ステップS6では上記近傍画素の量子化誤差負号の数Css,Mssを比較し、Css>MssであればステップS8へ、Css≦MssであればステップS9へ進む。ステップS7では1ビットの乱数を生成し、乱数が0であればステップS8へ、乱数が1であればステップS9へ進む。ステップS8では量子化誤差Cerの負号を検出し、負号が1であればステップS12へ進み、負号が0であればステップS14へ進む。同様に、ステップS9では量子化誤差Cerの負号を検出し、負号が1であればステップS10へ進み、負号が0であればステップS16へ進む。上記一連の操作により、補正される色プレーンの優先順位及び補正値の負号が決定される。   On the other hand, if it is determined in step S2 that the negative signs of the quantization errors Cer and Mer match, the process proceeds to step S3. In step S3, it is determined whether the sum of the quantization errors Cer and Mer exceeds the threshold value Th, or whether the sum of the quantization errors Cer and Mer is less than a value Th−Qs obtained by subtracting the quantization step width Qs from the threshold value Th. If the above condition is not satisfied, it is determined that the output code is not corrected, the correction value is set to 0, and the process proceeds to step S23. If the above condition is satisfied, the process proceeds to step S4. In step S4, the numbers Css and Mss of quantization error negative signs of neighboring pixels are obtained for each color plane, and the process proceeds to step S5. In step S4, it is determined whether or not the numbers Css and Mss of the quantization error signs of the neighboring pixels are equal. If Css ≠ Mss, the process proceeds to step S6, and if Css = Mss, the process proceeds to step S7. In step S6, the quantization error negative numbers Css and Mss of the neighboring pixels are compared. If Css> Mss, the process proceeds to step S8, and if Css ≦ Mss, the process proceeds to step S9. In step S7, a 1-bit random number is generated. If the random number is 0, the process proceeds to step S8. If the random number is 1, the process proceeds to step S9. In step S8, the negative sign of the quantization error Cer is detected. If the negative sign is 1, the process proceeds to step S12, and if the negative sign is 0, the process proceeds to step S14. Similarly, in step S9, the negative sign of the quantization error Cer is detected. If the negative sign is 1, the process proceeds to step S10, and if the negative sign is 0, the process proceeds to step S16. Through the above series of operations, the priority order of the color plane to be corrected and the negative sign of the correction value are determined.

ステップS10,S11,S12,S13ではステップS18,S19にて量子化出力を−1するので、補正前の量子化出力値が最小値0であるかがチェックされる。もし、補正の優先順位の高い色プレーンの量子化出力値が最小値であった場合、その色プレーンは補正せずに次の優先順位の色プレーンへと補正対象を移す。全ての色プレーンの量子化出力値が最小値であった場合は、補正なしとしてステップS23へ進む。   In steps S10, S11, S12, and S13, since the quantization output is decremented by -1 in steps S18 and S19, it is checked whether the quantization output value before correction is the minimum value 0 or not. If the quantized output value of a color plane having a high correction priority is the minimum value, the correction target is moved to the next priority color plane without correcting the color plane. If the quantized output values of all the color planes are the minimum value, the process proceeds to step S23 with no correction.

一方、ステップS14,S15,S16,S17ではステップS21,S22にて量子化出力を+1するので、入力画素値が0または補正前の量子化出力値が最大値であるかがチェックされる。もし、補正の優先順位の高い色プレーンの入力画素値が0または補正前の量子化出力値が最大値であった場合、その色プレーンは補正せずに次の優先順位の色プレーンへと補正対象を移す。全ての色プレーンの入力画素値が0または補正前の量子化出力値が最大値であった場合は、補正なしとしてステップS23へ進む。ここで、入力画素値が0かどうかをチェックするのは、本来ドットが生成されるはずのない部分に補正によるドットが生成されるのを防止するためである。   On the other hand, in steps S14, S15, S16, and S17, since the quantization output is incremented by 1 in steps S21 and S22, it is checked whether the input pixel value is 0 or the quantization output value before correction is the maximum value. If the input pixel value of a color plane having a high correction priority is 0 or the quantized output value before correction is the maximum value, the color plane is corrected to the next priority color plane without correction. Move the subject. If the input pixel values of all color planes are 0 or the quantized output value before correction is the maximum value, the process proceeds to step S23 with no correction. Here, the reason for checking whether the input pixel value is 0 is to prevent generation of corrected dots in a portion where dots should not be generated.

ステップS18,S19,S20,S21,S22による補正処理が終わるとステップS23に進む。ステップS23では決定された補正値を出力コードに加算した後、量子化誤差を求め、量子化誤差を周囲の画素に拡散し、ステップS24へ進む。ステップS24では、全画素の処理の終了を判定し、全画素の処理が終了した場合は、処理を終了し、全画素の処理が終了していない場合は、次の画素の処理をするためステップS1へ戻る。   When the correction process in steps S18, S19, S20, S21, and S22 ends, the process proceeds to step S23. In step S23, after the determined correction value is added to the output code, a quantization error is obtained, the quantization error is diffused to surrounding pixels, and the process proceeds to step S24. In step S24, it is determined whether or not all pixels have been processed. If all pixels have been processed, the process ends. If all pixels have not been processed, the next pixel is processed. Return to S1.

次に、図2のフローチャートを用いて具体的な補正処理判定方法を詳細に説明する。   Next, a specific correction processing determination method will be described in detail using the flowchart of FIG.

ステップS2,S3にて補正が不要な領域の判定が行われる。例えば、図9の領域2、領域3のように補正が不要な領域では量子化誤差の負号は一致しない。従って、補正前の量子化誤差負号の一致を調べることで、補正が不要な部分の判定ができる。また、量子化誤差負号が共に正の場合は、量子化誤差の和が閾値Thを超える領域にドットを追加するので、量子化誤差の和が閾値Th以下の場合は補正が不要となる。一方、量子化誤差負号が共に負の場合は、量子化誤差の和が閾値−Th未満の領域のドットを削除するので、量子化誤差の和が閾値−Th以上の場合は補正が不要となる。なお、ステップS3では量子化誤差負号に関係なく共通に処理するため、量子化誤差の和の絶対値を用いたが、量子化誤差負号別に処理する場合は、ステップS3,S5,S6,S7を量子化誤差負号別に行うことにより、ステップS8,S9は不要となる。   In steps S2 and S3, a determination is made of an area that does not require correction. For example, the negative sign of the quantization error does not match in areas that do not require correction, such as areas 2 and 3 in FIG. Accordingly, by examining the coincidence of the quantization error negative sign before correction, it is possible to determine a portion that does not require correction. Further, when both of the quantization error negative signs are positive, dots are added to a region where the sum of the quantization errors exceeds the threshold Th, and therefore no correction is required when the sum of the quantization errors is equal to or less than the threshold Th. On the other hand, when the quantization error negative signs are both negative, the dots in the region where the sum of the quantization errors is less than the threshold value -Th are deleted. Therefore, if the sum of the quantization errors is greater than or equal to the threshold value -Th, correction is unnecessary. Become. In step S3, the absolute value of the sum of the quantization errors is used because the processing is commonly performed regardless of the quantization error negative sign. However, when processing is performed for each quantization error negative sign, steps S3, S5, S6, and so on are used. By performing S7 for each quantization error sign, steps S8 and S9 become unnecessary.

次に、補正される色プレーンの優先順位について説明する。   Next, the priority order of the color planes to be corrected will be described.

誤差拡散においては、ドットが生成されると量子化誤差の負号が反転する。従って、視覚上重要なハイライト部においては、量子化誤差の負号が0となる画素が連続している領域では、ドットが生成されていない。つまり、所定範囲の量子化誤差負号の数を調べることにより、上記所定範囲近傍のドットの有無が判定できる。特に、誤差拡散では量子化誤差を2次元的に拡散するので、量子化誤差負号も2次元的に拡散し、上記所定範囲を超える範囲のドットの有無が判定できる。また、量子化誤差負号は1ビットなので、非常に少ないメモリ容量で広範囲のドット検出が可能となる。そこで、色プレーン毎に近傍画素の量子化誤差負号の数を求めて比較することで、ドット数の少ない色プレーンの判定ができる。つまり、近傍画素の量子化誤差負号数の少ない方の優先順位を高くする。近傍画素の量子化誤差負号数が同じ場合は、どちらの色プレーンも同じと判断し、乱数によって優先順位を決定する。   In error diffusion, when a dot is generated, the negative sign of the quantization error is inverted. Accordingly, in a visually important highlight portion, no dot is generated in a region where pixels where the negative sign of the quantization error is 0 are continuous. That is, the presence or absence of dots in the vicinity of the predetermined range can be determined by checking the number of quantization error negative signs in the predetermined range. In particular, since error quantization diffuses the quantization error two-dimensionally, the quantization error negative sign also diffuses two-dimensionally, and the presence / absence of dots in the range exceeding the predetermined range can be determined. Further, since the quantization error negative sign is 1 bit, a wide range of dot detection can be performed with a very small memory capacity. Therefore, it is possible to determine a color plane with a small number of dots by obtaining and comparing the number of quantization error negative signs of neighboring pixels for each color plane. In other words, the priority order of the smaller quantization error negative number of the neighboring pixels is increased. When the quantization error negative signs of neighboring pixels are the same, it is determined that both color planes are the same, and the priority is determined by a random number.

同様に、シャドー部においては、量子化誤差の負号が1となる画素が連続している領域では、ボイド(ドットが打たれてないブランク部分)が発生していない。つまり、所定範囲の量子化誤差負号の数を調べることにより、上記所定範囲近傍のボイドの有無が判定できる。特に、誤差拡散では量子化誤差を2次元的に拡散するので、量子化誤差負号も2次元的に拡散し、上記所定範囲を超える範囲のボイドの有無が判定できる。そこで、色プレーン毎に近傍画素の量子化誤差負号の数を求めて比較することで、ボイド数の少ない色プレーンの判定ができる。つまり、近傍画素の量子化誤差負号数の多い方の優先順位を高くする。近傍画素の量子化誤差負号数が同じ場合は、どちらの色プレーンも同じと判断し、乱数によって優先順位を決定する。   Similarly, in the shadow portion, no void (a blank portion where no dot is formed) is not generated in a region where pixels where the negative sign of the quantization error is 1 are continuous. That is, the presence or absence of a void near the predetermined range can be determined by examining the number of quantization error negative signs in the predetermined range. In particular, in error diffusion, the quantization error is two-dimensionally diffused, so that the quantization error negative sign is also two-dimensionally diffused, and the presence / absence of voids in a range exceeding the predetermined range can be determined. Therefore, a color plane with a small number of voids can be determined by obtaining and comparing the number of quantization error negative signs of neighboring pixels for each color plane. That is, the priority order of the one with the larger quantization error negative number of the neighboring pixels is increased. When the quantization error negative signs of neighboring pixels are the same, it is determined that both color planes are the same, and the priority is determined by a random number.

次に、補正値について説明する。   Next, the correction value will be described.

上述したように量子化誤差負号が共に正の場合は、ドットを追加するため、いずれかの色プレーンの量子化出力を+1する。この時、上述したように入力画素値が0の部分の量子化出力は補正しない。従って、補正の優先順位の高い色プレーンの入力画素値が0の場合は次の優先順位の色プレーンに補正対象が移される。また、補正前の量子化出力値が最大値であった場合も+1すると量子化出力値のレンジを越えてしまうので、補正しない。この場合も次の優先順位の色プレーンに補正対象が移される。なお、補正対象の全ての色プレーンが補正なしと判定された場合は、補正が必要とされる領域であっても補正は行わない。   As described above, when both of the quantization error negative signs are positive, the quantization output of any color plane is incremented by 1 in order to add a dot. At this time, as described above, the quantized output of the portion where the input pixel value is 0 is not corrected. Therefore, when the input pixel value of a color plane having a high correction priority is 0, the correction target is moved to the color plane having the next priority. Further, even when the quantized output value before correction is the maximum value, if the value is incremented by 1, the range of the quantized output value is exceeded, so correction is not performed. Also in this case, the correction target is moved to the next priority color plane. When it is determined that all the color planes to be corrected are not corrected, no correction is performed even in an area where correction is required.

同様に量子化誤差負号が共に負の場合は、ドットを削除するため、いずれかの色プレーンの量子化出力を−1する。この時、補正前の量子化出力値が最小値(通常0)であった場合、−1すると量子化出力値のレンジを越えてしまうので、補正しない。この場合、次の優先順位の色プレーンに補正対象が移される。なお、補正対象の全ての色プレーンが補正なしと判定された場合は、補正が必要とされる領域であっても補正は行わない。   Similarly, when both of the quantization error negative signs are negative, the quantization output of any color plane is decreased by −1 in order to delete the dot. At this time, if the quantized output value before correction is the minimum value (usually 0), since it exceeds the range of the quantized output value by -1, correction is not performed. In this case, the correction target is moved to the next priority color plane. When it is determined that all the color planes to be corrected are not corrected, no correction is performed even in an area where correction is required.

3色以上の色プレーンに補正処理を行うには、ステップS3,S6を拡張する。例えば3色の場合、3色全体での補正判定と任意の2色での補正判定を行い、プレーン毎に補正値を集計した後、補正値の絶対値を1以下にリミットした後、補正を行う。3色間の優先順位は近傍画素の量子化誤差負号数の比較にて行うが、3色とも一致した場合、乱数にて判定するが、この場合の乱数は2ビットになる。但し、色プレーンに割り当てられていない乱数も生成されるので、その場合は色プレーンに割り当てられている数がでるまで乱数の生成を繰り返すか、3進カウンタを別途設け、色プレーンに割り当てられていない乱数が生成された場合、3進カウンタの値を用いるようにしても良い。   In order to perform correction processing on three or more color planes, steps S3 and S6 are expanded. For example, in the case of three colors, the correction determination for all three colors and the correction determination for any two colors are performed, the correction values are tabulated for each plane, the absolute value of the correction values is limited to 1 or less, and then the correction is performed. Do. Priorities among the three colors are determined by comparing the quantization error negative numbers of neighboring pixels. If all three colors match, the random number is determined. However, in this case, the random number is 2 bits. However, random numbers that are not assigned to the color plane are also generated.In this case, generation of random numbers is repeated until the number assigned to the color plane is obtained, or a ternary counter is separately provided and assigned to the color plane. If no random number is generated, the value of the ternary counter may be used.

この様に本発明の第1の実施形態によれば、量子化誤差の負号の一致及び量子化誤差の和と閾値または閾値から量子化ステップ幅を引いた値との比較にて補正領域の判定を行うため、簡単に補正領域の判定ができ、同時に補正値の負号も決定される。また、補正される色プレーンの優先順位を近傍画素の量子化誤差負号数によって決定することで少ないメモリ容量で効率的なドットの分散が可能となる。さらに、近傍画素の量子化誤差負号数が同一の場合、乱数にて上記優先順位を決定することにより、同一色ドットの繋がりを排除することができる。なお、これらの処理は量子化レベル数に依存しないため、容易にN値の誤差拡散に拡張できる。さらに、上述したように3色以上への拡張も可能である。   As described above, according to the first embodiment of the present invention, the correction region is compared by matching the negative sign of the quantization error and comparing the sum of the quantization errors with a threshold value or a value obtained by subtracting the quantization step width from the threshold value. Since the determination is performed, the correction area can be easily determined, and at the same time, the negative sign of the correction value is determined. Further, by determining the priority order of the color planes to be corrected based on the quantization error negative number of neighboring pixels, efficient dot distribution can be achieved with a small memory capacity. Furthermore, when the quantization error negative signs of neighboring pixels are the same, the connection of the same color dots can be eliminated by determining the priority order with a random number. Since these processes do not depend on the number of quantization levels, they can be easily expanded to N-value error diffusion. Furthermore, as described above, expansion to three or more colors is also possible.

図3は本発明の第2の実施形態に係わる画像処理装置の構成を説明するブロック図である。図中、25,26は閾値生成部、27は補正領域判定部、28,29は負号数カウント部である。以下、第1の実施形態と異なる部分のみ説明する。   FIG. 3 is a block diagram illustrating the configuration of an image processing apparatus according to the second embodiment of the present invention. In the figure, 25 and 26 are threshold generation units, 27 is a correction area determination unit, and 28 and 29 are negative number counting units. Only the parts different from the first embodiment will be described below.

本実施形態では、閾値生成部25,26によって、色プレーン毎に閾値が逐次変更されても、色間の重なりを制御できるようにしたものである。   In the present embodiment, the threshold value generators 25 and 26 can control the overlap between colors even if the threshold value is sequentially changed for each color plane.

閾値制御部25,26は、誤差拡散の画質劣化要因である“はき寄せ”(ドット生成の遅れ)や“テクスチャ”を排除するため、閾値を変動させる。通常、“はき寄せ”は量子化代表値付近の入力値に隣接するエッジ部で顕著に表れる。そこで、入力値に最も近い量子化代表値との差に応じて、量子化代表値に近づく方向に閾値を変動させることにより、ドットの生成を早まらせる(遅らせる)方法が知られている。本実施形態では、複数色の入力値が存在するので、いずれの入力値を用いるかによって効果が異なってくる。   The threshold value control units 25 and 26 change the threshold value in order to eliminate “arrival” (dot generation delay) and “texture” that are causes of image quality degradation due to error diffusion. Ordinarily, “creeping” appears prominently at the edge portion adjacent to the input value near the quantized representative value. Therefore, a method is known in which dot generation is accelerated (delayed) by changing the threshold value in a direction approaching the quantized representative value according to the difference from the quantized representative value closest to the input value. In the present embodiment, since there are input values of a plurality of colors, the effect differs depending on which input value is used.

例えば入力画像の画素値の和C+Mにて閾値を変動させた場合は、2つのプレーンのトータルでのドットに対する“はき寄せ”が軽減されるが、ある色プレーンのみに発生している“はき寄せ”を排除することは困難である。つまり、ある色プレーンの入力値が量子化代表値に非常に近接していても、他方の色プレーンの入力値が量子化代表値から充分離れていれば閾値の変動量は少なくなってしまうので、効果は薄れてしまう。   For example, when the threshold value is changed by the sum C + M of the pixel values of the input image, “arrival” with respect to the total dots of the two planes is reduced, but “occurring only in a certain color plane” is It is difficult to eliminate “getting together”. In other words, even if the input value of a certain color plane is very close to the quantized representative value, if the input value of the other color plane is sufficiently far from the quantized representative value, the amount of variation in the threshold will be reduced. The effect will fade.

また、量子化代表値からの距離が小さい方の入力値を用いて閾値を変動させた場合は、特定の色プレーンの”はき寄せ”を効果的に排除できるが、他の色プレーンにとっては過補償となる場合がある。   In addition, if the threshold value is changed using the input value with the smaller distance from the quantized representative value, the “rushing” of a specific color plane can be effectively eliminated, but for other color planes There may be overcompensation.

そこで、色プレーン毎に注目画素近傍の量子化誤差負号数をカウントし、該カウント値に基づき閾値を変動させることで、上記“はき寄せ”や“テクスチャ”を排除する。例えば、上述したように、量子化誤差の負号が0となる画素が連続している領域では、ドットが生成されていない。つまり、このような領域は“はき寄せ”の可能性があるので、閾値を下げ、ドットの生成を早める。同様に、量子化誤差の負号が1となる画素が連続している領域では、ボイド(ブランク)が生成されていない。つまり、このような領域はボイド(ブランク)の“はき寄せ”の可能性があるので、閾値を上げ、ドットの生成を遅らせる。なお、入力濃度値に応じて出力ドットの密度は異なるので、入力濃度値に応じて量子化誤差の負号検出のためのウインドウのサイズ(形状)を替えることが望ましい。   Therefore, the quantization error negative number in the vicinity of the target pixel is counted for each color plane, and the threshold value is changed based on the count value, thereby eliminating the above-mentioned “choke up” and “texture”. For example, as described above, no dot is generated in a region where pixels where the negative sign of the quantization error is 0 are continuous. In other words, such a region has a possibility of “crushing”, so the threshold value is lowered and dot generation is accelerated. Similarly, no void (blank) is generated in a region where pixels where the negative sign of the quantization error is 1 are continuous. In other words, since such a region may have a “cracking” of voids (blanks), the threshold value is increased to delay dot generation. Since the density of output dots varies depending on the input density value, it is desirable to change the size (shape) of the window for detecting a quantization error negative sign depending on the input density value.

図4は、各濃度における量子化誤差の負号検出のためのウインドウの変更例を示したものである。ハイライトから中間濃度までは、同図(A)→(B)→(C)→(D)に示すように範囲が狭まって行き、中間濃度からシャドー部へは逆に同図(D)→(C)→(B)→(A)と範囲を広げる。なお、多値誤差拡散の場合は、濃度の低い代表値から量子化ステップの中央値に向かって範囲が狭まって行き、量子化ステップの中央値から次の濃度の代表値に向かって範囲を広げる。このように量子化ステップ毎に負号検出のためのウインドウの変動が繰り返すように制御される。   FIG. 4 shows an example of changing the window for detecting the negative sign of the quantization error at each concentration. From the highlight to the intermediate density, the range narrows as shown in (A) → (B) → (C) → (D). On the contrary, from the intermediate density to the shadow portion, (D) → The range is expanded as (C) → (B) → (A). In the case of multilevel error diffusion, the range narrows from the representative value of low density toward the median value of the quantization step, and the range is expanded from the median value of the quantization step to the representative value of the next density. . In this way, control is performed so that the fluctuation of the window for detecting the negative sign is repeated at each quantization step.

このような閾値制御を色プレーン毎に行うと、補正領域判定に閾値を用いることが困難になる。そこで、本実施例では上記閾値を用いずに量子化誤差のみで補正領域判定を行う。   If such threshold control is performed for each color plane, it is difficult to use the threshold for correction area determination. Therefore, in this embodiment, the correction area determination is performed only by the quantization error without using the threshold value.

図5は本発明の第2の実施形態に係わる画像処理装置の補正方法を説明するフローチャートである。図中、図2と同じ動作を行う部分は同じ番号を付してある。以下、図2と異なる部分いついてのみ説明する。   FIG. 5 is a flowchart for explaining a correction method of the image processing apparatus according to the second embodiment of the present invention. In the figure, parts that perform the same operations as in FIG. Hereinafter, only different portions from FIG. 2 will be described.

ステップS2で量子化誤差Cer,Merの負号が一致すると判定された場合、ステップS25にて補正領域の判定が行われる。   If it is determined in step S2 that the negative signs of the quantization errors Cer and Mer match, the correction area is determined in step S25.

ステップS25では、量子化誤差Cer,Merの所定のビットを抽出し、抽出したビットによって補正領域(補正される色プレーンの優先順位及び補正値の負号で分類した領域)が決定される。例えば、量子化誤差Cer,Merより抽出した2ビットで量子化誤差Cer,Merの各量子化ステップ幅が4領域に分割される場合(図6(A)参照)、抽出したビットが01または10で一致した場合を領域0とし、抽出したビットのCer側が01かつMer側が00の場合を領域1とし、抽出したビットのCer側が00かつMer側が01の場合を領域2とし、抽出したビットのCer側が10かつMer側が11の場合を領域3とし、抽出したビットのCer側が11かつMer側が10の場合を領域4とし、上記以外を補正なしと判定する。また、量子化誤差Cer,Merより抽出した3ビットで量子化誤差Cer,Merの各量子化ステップ幅が8領域に分割される場合(図6(B)参照)、抽出したビットの上位2ビットが01または10で一致した場合を領域0とし、抽出したビットのCer側が011であるか抽出したビットのCer側が010かつMer側が001の場合を領域1、抽出したビットのMer側が011であるか抽出したビットのCer側が001かつMer側が010の場合を領域2、抽出したビットのCer側が100であるか抽出したビットのCer側が101かつMer側が110の場合を領域3、抽出したビットのMer側が100であるか抽出したビットのCer側が110かつMer側が101の場合を領域4と判定する。   In step S25, predetermined bits of the quantization errors Cer and Mer are extracted, and correction regions (regions classified by priority of color planes to be corrected and negative signs of correction values) are determined based on the extracted bits. For example, when each quantization step width of the quantization errors Cer and Mer is divided into four regions by 2 bits extracted from the quantization errors Cer and Mer (see FIG. 6A), the extracted bits are 01 or 10 Is the region 0, the Cer side of the extracted bit is 01 and the Mer side is 00, the region 1 is the extracted bit, the Cer side of the extracted bit is 00 and the Mer side is 01, the region 2 is the Cer of the extracted bit If the side is 10 and the Mer side is 11, the region 3 is set. If the Cer side of the extracted bit is 11 and the Mer side is 10, the region 4 is set. Further, when each quantization step width of the quantization errors Cer and Mer is divided into 8 regions by 3 bits extracted from the quantization errors Cer and Mer (see FIG. 6B), the upper 2 bits of the extracted bits Is the region 0, the Cer side of the extracted bit is 011 or the Cer side of the extracted bit is 010 and the Mer side is 001, is the region 1 and whether the Mer side of the extracted bit is 011? If the extracted bit Cer side is 001 and the Mer side is 010, the region 2; if the extracted bit Cer side is 100 or the extracted bit is the Cer side 101 and the Mer side is 110, the region 3; the extracted bit Mer side is If the extracted bit is 110 on the Cer side and 101 on the Mer side, it is determined as the region 4.

一般的には、抽出したビットのMSBが0の領域ではMSB以外のビットを加算し、加算した結果のMSBが1となる場合とMSB以外の全ビットが1となる場合以外は補正なしとし、上記加算した結果のMSBが1となるかMSB以外の全ビットが1となる場合で、抽出したビットが一致する場合は領域0とし、抽出したビットのMSB以外の全ビットで比較を行い、Cer側が大きければ領域1、Mer側が大きければ領域2と判定する。同様に抽出したビットのMSBが1の領域ではMSB以外のビットを加算し、加算した結果のMSBが1となる場合は補正なしとし、上記加算した結果のMSBが0となる場合で、抽出したビットが一致する場合は領域0とし、抽出したビットのMSB以外の全ビットで比較を行い、Cer側が大きければ領域4、Mer側が大きければ領域3と判定する。   In general, in the area where the MSB of the extracted bits is 0, bits other than the MSB are added, and there is no correction unless the MSB of the addition result is 1 and all the bits other than the MSB are 1. If the MSB as a result of the addition is 1 or all the bits other than the MSB are 1, and if the extracted bits match, the area 0 is set, and comparison is made with all the bits other than the MSB of the extracted bits. If the side is large, the region 1 is determined. If the Mer side is large, the region 2 is determined. Similarly, when the MSB of the extracted bit is 1, the bits other than the MSB are added. When the MSB as the result of addition is 1, no correction is performed. When the MSB of the result of addition is 0, the extracted is performed. If the bits match, the area is set to 0, and all the bits other than the MSB of the extracted bits are compared, and if the Cer side is large, the area 4 is determined, and if the Mer side is large, the area 3 is determined.

ステップS25で補正なしと判定された場合はステップS20へ進み、領域0と判定された場合はステップS7へ進み、領域1と判定された場合はステップS16へ進み、領域2と判定された場合はステップS14へ進み、領域3と判定された場合はステップS12へ進み、領域4と判定された場合はステップS10へ進み、以下図2の場合と同様に処理される。   If it is determined in step S25 that there is no correction, the process proceeds to step S20. If it is determined as area 0, the process proceeds to step S7. If it is determined as area 1, the process proceeds to step S16. The process proceeds to step S14. If it is determined that the region 3 is determined, the process proceeds to step S12. If it is determined that the region 4 is determined, the process proceeds to step S10.

この様に本発明の第2の実施形態によれば、色プレーン毎に閾値が逐次変更されても、量子化誤差の負号の一致及び量子化誤差の一部のビットの比較にて補正領域の判定を行うため、簡単に補正領域の判定ができ、同時に補正値の負号も決定される。   As described above, according to the second embodiment of the present invention, even if the threshold value is sequentially changed for each color plane, the correction region is obtained by matching the negative sign of the quantization error and comparing some bits of the quantization error. Therefore, the correction area can be easily determined, and the negative sign of the correction value is determined at the same time.

図7は本発明の第3の実施形態に係わる画像処理装置の構成を説明するブロック図である。図中、30は補正領域判定部である。以下、第1及び第2の実施形態と異なる部分のみ説明する。   FIG. 7 is a block diagram illustrating the configuration of an image processing apparatus according to the third embodiment of the present invention. In the figure, reference numeral 30 denotes a correction area determination unit. Hereinafter, only different parts from the first and second embodiments will be described.

本実施形態は、第1及び第2の実施形態の補正領域判定方法を入力濃度値に応じて切り替えることでより最適な色間の重なりを制御できるようにしたものである。従って、補正領域判定部30には各色プレーンの閾値だけでなく、各色プレーンの入力濃度値も入力される。具体的な判定方法を図7のフローチャートを用いて説明する。   In the present embodiment, the optimum overlap between colors can be controlled by switching the correction area determination method of the first and second embodiments according to the input density value. Therefore, not only the threshold value of each color plane but also the input density value of each color plane is input to the correction area determination unit 30. A specific determination method will be described with reference to the flowchart of FIG.

図7は本発明の第3の実施形態に係わる画像処理装置の補正方法を説明するフローチャートである。図中、図2及び図5と同じ動作を行う部分は同じ番号を付してある。以下、図2及び図5と異なる部分いついてのみ説明する。   FIG. 7 is a flowchart for explaining a correction method of the image processing apparatus according to the third embodiment of the present invention. In the figure, parts that perform the same operations as in FIGS. 2 and 5 are given the same reference numerals. Hereinafter, only different portions from FIGS. 2 and 5 will be described.

図8において、
ステップS26では量子化誤差Cer,Merの和が2つの閾値の平均Th’=(Th_m+Th_c)/2を超えているか、或いは量子化誤差Cer,Merの和が2つの閾値の平均Th’から量子化ステップ幅Qsを引いた値Th−Qs未満であるかを判定し、上記条件を満たしていない場合は出力コードの補正なしと判断し、補正値を0としてステップS23へ進み、上記条件を満たしている場合はステップS27へ進む。ステップS27では入力濃度値C,Mの和の絶対値が所定値α未満であるかを判定し、上記和の絶対値が所定値α未満の場合はステップS4へ進み、上記和の絶対値が所定値α以上の場合はステップS25へ進む。つまり、2色の入力濃度値が近い場合は近傍画素の入力誤差の負号数にて領域判定を行い、2色の入力濃度値の差が大きい場合は2色の量子化誤差により領域分割を行うのである。これは、2色の入力濃度が近い場合(薄いブルーの画像が入力されたような場合)、色毎にドットが分離して見えてしまう場合があり、このような領域では負号数にて領域分けを行った方が色プレーン間の分散性は良い。一方、2色の入力濃度値の差が大きい場合(マゼンタ色の画像が入力されたような場合)は、濃度の低い色プレーンのハイライトの部分に不用意に他方のドットが打たれてしまうことがある。このように、入力濃度によって最適な領域判定方法がある場合は、入力濃度に応じて最適な領域判定方法を選択した方が良い。なお、このような切替えを行っても、誤差拡散ではフィードバックがかかるため、マクロ的な濃度は変わらない。
In FIG.
In step S26, the sum of the quantization errors Cer and Mer exceeds the average of the two thresholds Th ′ = (Th_m + Th_c) / 2, or the sum of the quantization errors Cer and Mer is quantized from the average Th ′ of the two thresholds. It is determined whether or not the value Th−Qs is less than the value Th−Qs obtained by subtracting the step width Qs. If the above condition is not satisfied, it is determined that the output code is not corrected. If yes, go to Step S27. In step S27, it is determined whether or not the absolute value of the sum of the input density values C and M is less than a predetermined value α. If the absolute value of the sum is less than the predetermined value α, the process proceeds to step S4, where the absolute value of the sum is If it is greater than or equal to the predetermined value α, the process proceeds to step S25. That is, when the input density values of two colors are close, the area is determined by the negative sign of the input error of neighboring pixels, and when the difference between the input density values of the two colors is large, the area is divided by the quantization error of the two colors. Do it. This is because when the input densities of the two colors are close (when a light blue image is input), the dots may appear to be separated for each color. Dispersion between color planes is better when the area is divided. On the other hand, when the difference between the input density values of the two colors is large (when a magenta image is input), the other dot is inadvertently applied to the highlight portion of the low-density color plane. Sometimes. As described above, when there is an optimum region determination method depending on the input density, it is better to select the optimum region determination method according to the input density. Even if such switching is performed, feedback is applied in error diffusion, so the macro density does not change.

この様に本発明の第3の実施形態によれば、入力濃度値に応じて補正領域判定方法を切り替えることにより、最適な色間の重なりを容易に得ることができる。   As described above, according to the third embodiment of the present invention, the optimum overlap between colors can be easily obtained by switching the correction area determination method according to the input density value.

[他の実施形態]
前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、本願発明の目的が達成される。
[Other Embodiments]
A storage medium storing software program codes for realizing the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus stores program codes stored in the storage medium. The object of the present invention is also achieved by executing the reading.

この場合、記憶媒体から読み出されたプログラムコード自体が本願発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本願発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM,CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。   As a storage medium for supplying the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

また、コンピュータが読み出したプログラムコードを実行することによって、前述した実施形態の機能が実現される他、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOSなどが実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   In addition to executing the program code read out by the computer, the functions of the above-described embodiments are realized, and an OS running on the computer is part of the actual processing based on an instruction of the program code. Alternatively, the functions of the above-described embodiment can be realized by performing all of them and performing the processing.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   Further, after the program code read from the storage medium is written to a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. The CPU of the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments can also be realized by the processing.

なお、本願発明は、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体から、そのプログラムを、パソコン通信など通信ラインを介して要求者にそのプログラムを配信する場合にも適用できる。   The present invention also applies to a case where the program is distributed to a requester via a communication line such as personal computer communication from a storage medium in which a program code of software that realizes the functions of the above-described embodiments is recorded. Applicable.

図1は、第1の実施形態に係る例示的な画像処理装置の構成を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration of an exemplary image processing apparatus according to the first embodiment. 図2は、第1の実施形態に係わる補正処理を説明するフローチャートである。FIG. 2 is a flowchart for explaining the correction processing according to the first embodiment. 図3は、第2の実施形態に係る例示的な画像処理装置の構成を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration of an exemplary image processing apparatus according to the second embodiment. 図4は、各濃度における量子化誤差の負号検出のためのウインドウの変更例である。FIG. 4 is an example of changing the window for detecting the negative sign of the quantization error at each concentration. 図5は、第2の実施形態に係わる補正処理を説明するフローチャートである。FIG. 5 is a flowchart for explaining the correction processing according to the second embodiment. 図6は、第2の実施形態に係わる補正処理の判定領域を示す図である。FIG. 6 is a diagram illustrating a determination region for correction processing according to the second embodiment. 図7は、第3の実施形態に係る例示的な画像処理装置の構成を示すブロック図である。FIG. 7 is a block diagram illustrating a configuration of an exemplary image processing apparatus according to the third embodiment. 図8は、第3の実施形態に係わる補正処理を説明するフローチャートである。FIG. 8 is a flowchart for explaining the correction processing according to the third embodiment. 図9は、従来の補正処理を説明する図である。FIG. 9 is a diagram for explaining a conventional correction process.

符号の説明Explanation of symbols

1 加算器
2 加算器
3 拡散フィルタ
4 拡散フィルタ
5 減算器
6 減算器
7 減算器
8 減算器
9 加算器
10 加算器
11 量子化器
12 量子化器
13 逆量子化器
14 逆量子化器
15 加算器
16 加算器
17 逆量子化器
18 逆量子化器
19 補正領域判定部
20 補正値生成部
21 負号数カウント部
22 負号数カウント部
23 乱数生成部
24 閾値生成部
25 閾値生成部
26 閾値生成部
27 補正領域判定部
28 負号数カウント部
29 負号数カウント部
30 補正領域判定部
DESCRIPTION OF SYMBOLS 1 Adder 2 Adder 3 Spread filter 4 Spread filter 5 Subtractor 6 Subtractor 7 Subtractor 8 Subtractor 9 Adder 10 Adder 11 Quantizer 12 Quantizer 13 Inverse quantizer 14 Inverse quantizer 15 Addition Device 16 Adder 17 Inverse quantizer 18 Inverse quantizer 19 Correction area determination unit 20 Correction value generation unit 21 Negative sign count unit 22 Negative sign count unit 23 Random number generation unit 24 Threshold generation unit 25 Threshold generation unit 26 Threshold Generation unit 27 Correction region determination unit 28 Negative sign count unit 29 Negative sign count unit 30 Correction region determination unit

Claims (28)

複数色の画像データを入力する手段と、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算する手段と、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化手段と、
上記量子化手段の量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出手段と、
上記算出された複数の量子化誤差の負号及び上記複数の量子化誤差の和と量子化閾値または量子化閾値から量子化ステップ幅を引いた値との比較により量子化出力の補正を判定する判定手段と、
上記複数色毎に近傍画素の量子化誤差負号の数を検出する手段と、
上記近傍画素の量子化誤差負号の数により補正領域を判定する判定手段と、
上記補正領域毎に補正する色の優先順位及び補正値を決定する手段と、
上記補正値により上記量子化出力を補正する手段と、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出手段とを備え、
上記第2の量子化誤差算出手段による誤差を用いて誤差拡散処理を行うことを特徴とする画像処理装置。
Means for inputting image data of multiple colors;
A means for weighting a quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization means for quantizing the input image data to which the quantization error is added;
First quantization error calculation means for calculating a plurality of quantization errors generated by the quantization processing of the quantization means;
The correction of the quantization output is determined by comparing the negative sign of the calculated plurality of quantization errors and the sum of the plurality of quantization errors with a quantization threshold value or a value obtained by subtracting the quantization step width from the quantization threshold value. A determination means;
Means for detecting the number of negative quantization error of neighboring pixels for each of the plurality of colors;
Determining means for determining a correction region based on the number of negative quantization errors of the neighboring pixels;
Means for determining priority and correction value of the color to be corrected for each correction region;
Means for correcting the quantized output by the correction value;
Second quantization error calculation means for calculating a quantization error from the corrected quantization output,
An image processing apparatus, wherein error diffusion processing is performed using an error generated by the second quantization error calculating means.
前記量子化出力の補正は2色以上の量子化誤差の負号が一致した時に行うことを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the quantization output is corrected when negative signs of quantization errors of two or more colors coincide with each other. 前記量子化出力の補正値は、一致した量子化誤差の負号が正の場合は+1または0とし、一致した量子化誤差の負号が負の場合は−1または0とすることを特徴とする請求項2に記載の画像処理装置。   The correction value of the quantization output is +1 or 0 when the negative sign of the matched quantization error is positive, and is -1 or 0 when the negative sign of the matched quantization error is negative. The image processing apparatus according to claim 2. 前記量子化出力の補正値は、一致した量子化誤差の負号が正の場合は補正前の量子化誤差の総和が閾値を超えていた場合、量子化誤差の負号が一致する色プレーン中で量子化誤差の負号数の小さい順に補正の優先順位を決定し、一致した量子化誤差の負号が負の場合は補正前の量子化誤差の総和が閾値Thから量子化ステップ幅Qsを引いた値Th−Qs未満であった場合、量子化誤差の負号が一致する色プレーン中で量子化誤差の負号数の大きい順に補正の優先順位を決定することを特徴とする請求項3に記載の画像処理装置。   The correction value of the quantization output is a value in a color plane in which the negative sign of the quantization error matches when the sum of the quantization errors before correction exceeds the threshold when the negative sign of the matched quantization error is positive. , The priority of correction is determined in ascending order of the number of negative signs of quantization error, and if the negative sign of the matched quantization error is negative, the sum of quantization errors before correction is set to the quantization step width Qs from the threshold Th. 4. The correction priority order is determined in descending order of the number of negative signs of quantization error in a color plane in which the negative signs of quantization error coincide with each other when less than the subtracted value Th-Qs. An image processing apparatus according to 1. 上記量子化誤差の負号数が等しい場合は、乱数によって優先順位を決定することを特徴とする請求項4に記載の画像処理装置。   5. The image processing apparatus according to claim 4, wherein when the negative numbers of the quantization errors are equal, priority is determined by a random number. 入力濃度が0であるかどうかを判定する手段と、
量子化出力値が最大値であるかどうかを判定する手段を備え、
前記一致した量子化誤差の負号が正の場合は優先順位の高い方より入力濃度値が0でなく、かつ量子化出力値が最大値でないかの判定を行い、最初に上記条件を満たした色の補正値を+1とすることを特徴とする請求項3に記載の画像処理装置。
Means for determining whether the input density is 0;
Means for determining whether the quantized output value is a maximum value;
If the negative sign of the matched quantization error is positive, it is determined whether the input density value is not 0 and the quantized output value is not the maximum value from the higher priority, and the above condition is satisfied first. The image processing apparatus according to claim 3, wherein the color correction value is +1.
上記、条件を満たす色がない場合、補正を行わないことを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein when there is no color satisfying the condition, correction is not performed. 量子化出力値が最小値であるかどうかを判定する手段を備え、
前記一致した量子化誤差の負号が負の場合は優先順位の高い方より量子化出力値が最小値でないかの判定を行い、最初に上記条件を満たした色の補正値を−1とすることを特徴とする請求項3に記載の画像処理装置。
Means for determining whether the quantized output value is a minimum value;
When the negative sign of the matched quantization error is negative, it is determined whether the quantized output value is not the minimum value from the higher priority order, and the correction value of the color satisfying the above condition is first set to -1. The image processing apparatus according to claim 3.
上記、条件を満たす色がない場合、補正を行わないことを特徴とする請求項8に記載の画像処理装置。   The image processing apparatus according to claim 8, wherein no correction is performed when there is no color satisfying the condition. 前記複数色の画像データは、シアン及びマゼンタであることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the plurality of colors of image data are cyan and magenta. 前記複数色の画像データは、シアン、マゼンタ、イエローであることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the plurality of colors of image data are cyan, magenta, and yellow. 複数色の画像データを入力する手段と、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算する手段と、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化手段と、
上記量子化手段の量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出手段と、
上記複数の量子化誤差より所定のビットを抽出するビット抽出手段と、
上記算出された複数の量子化誤差の負号及び上記ビット抽出手段により抽出されたビット列の比較により量子化出力の補正領域を判定する領域判定手段と、
上記補正領域毎に補正する色の優先順位及び補正値を決定する手段と、
上記補正値により上記量子化出力を補正する手段と、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出手段とを備え、
上記第2の量子化誤差算出手段による誤差を用いて誤差拡散処理を行うことを特徴とする画像処理装置。
Means for inputting image data of multiple colors;
A means for weighting a quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization means for quantizing the input image data to which the quantization error is added;
First quantization error calculation means for calculating a plurality of quantization errors generated by the quantization processing of the quantization means;
Bit extraction means for extracting predetermined bits from the plurality of quantization errors;
A region determination unit that determines a correction region of the quantization output by comparing the calculated negative sign of the plurality of quantization errors and the bit string extracted by the bit extraction unit;
Means for determining priority and correction value of the color to be corrected for each correction region;
Means for correcting the quantized output by the correction value;
Second quantization error calculation means for calculating a quantization error from the corrected quantization output,
An image processing apparatus, wherein error diffusion processing is performed using an error generated by the second quantization error calculating means.
前記量子化出力の補正は2色以上の量子化誤差の負号が一致した時に行うことを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the quantization output is corrected when negative signs of quantization errors of two or more colors coincide with each other. 前記量子化出力の補正値は、一致した量子化誤差の負号が正の場合は+1または0とし、一致した量子化誤差の負号が負の場合は−1または0とすることを特徴とする請求項13に記載の画像処理装置。   The correction value of the quantization output is +1 or 0 when the negative sign of the matched quantization error is positive, and is -1 or 0 when the negative sign of the matched quantization error is negative. The image processing apparatus according to claim 13. 上記ビット抽出手段は、量子化代表値間を2のべき乗に分割するビットを抽出することを特徴とする請求項12に記載の画像処理装置。   13. The image processing apparatus according to claim 12, wherein the bit extraction unit extracts bits that divide the quantized representative values into powers of 2. 上記抽出したビット列のMSBが0となる領域ではMSB以外のビット列を加算し、加算した結果のMSBが1となるかMSB以外の全ビットが1となる場合以外は補正値を0とし、上記加算した結果のMSBが1となるかMSB以外の全ビットが1となる場合で、抽出したビット列が一致する場合は領域0とし、上記抽出したビット列のMSB以外の全ビットで比較を行い、第1色側が大きければ領域1、第2色側が大きければ領域2と判定して補正することを特徴とする請求項15に記載の画像処理装置。   In the region where the MSB of the extracted bit string is 0, a bit string other than the MSB is added, and the correction value is 0 unless the MSB of the result of addition is 1 or all the bits other than the MSB are 1, and the addition If the resulting MSB is 1 or all the bits other than the MSB are 1 and the extracted bit strings match, the area 0 is set, and comparison is made with all the bits other than the MSB of the extracted bit string. The image processing apparatus according to claim 15, wherein the image processing apparatus corrects by determining as a region 1 if the color side is large, and as a region 2 if the second color side is large. 上記抽出したビットのMSBが1となる領域ではMSB以外のビット列を加算し、加算した結果のMSBが1となる場合は補正値を0とし、上記加算した結果のMSBが0となる場合で、抽出したビット列が一致する場合は領域0とし、抽出したビットのMSB以外の全ビットで比較を行い、第1色側が大きければ領域4、第2色側が大きければ領域3と判定して補正することを特徴とする請求項15に記載の画像処理装置。   In the region where the MSB of the extracted bits is 1, a bit string other than the MSB is added. When the MSB of the result of addition is 1, the correction value is 0, and when the MSB of the result of addition is 0, If the extracted bit strings match, the area 0 is set, and all bits other than the MSB of the extracted bits are compared. If the first color side is large, the area 4 is determined, and if the second color side is large, the area 3 is determined and corrected. The image processing apparatus according to claim 15. 上記領域0と判定された場合は、乱数によって優先順位を決定することを特徴とする請求項16及び17に記載の画像処理装置。   18. The image processing apparatus according to claim 16, wherein when the area is determined to be 0, the priority order is determined by a random number. 入力濃度が0であるかどうかを判定する手段と、
量子化出力値が最大値であるかどうかを判定する手段を備え、
上記領域1と判定された場合は、上記第1色、第2色の順に入力濃度値が0でなく、かつ量子化出力値が最大値でないかの判定を行い、最初に上記条件を満たした色の補正値を+1とし、上記領域2と判定された場合は、上記第2色、第1色の順に入力濃度値が0でなく、かつ量子化出力値が最大値でないかの判定を行い、最初に上記条件を満たした色の補正値を+1とすることを特徴とする請求項16に記載の画像処理装置。
Means for determining whether the input density is 0;
Means for determining whether the quantized output value is a maximum value;
When it is determined that the region 1 is determined, it is determined whether the input density value is not 0 and the quantized output value is not the maximum value in the order of the first color and the second color, and the above condition is satisfied first. If the color correction value is set to +1 and the area 2 is determined, it is determined whether the input density value is not 0 and the quantized output value is not the maximum value in the order of the second color and the first color. The image processing apparatus according to claim 16, wherein a correction value of a color that first satisfies the above condition is set to +1.
量子化出力値が最小値であるかどうかを判定する手段を備え、
上記領域3と判定された場合は、上記第1色、第2色の順に量子化出力値が最小値でないかの判定を行い、最初に上記条件を満たした色の補正値を−1とし、上記領域4と判定された場合は、上記第2色、第1色の順に量子化出力値が最小値でないかの判定を行い、最初に上記条件を満たした色の補正値を−1とすることを特徴とする請求項17に記載の画像処理装置。
Means for determining whether the quantized output value is a minimum value;
When it is determined as the region 3, it is determined whether the quantized output value is not the minimum value in the order of the first color and the second color, and the correction value of the color satisfying the above condition is first set to -1. If it is determined that the region 4 is determined, it is determined whether the quantized output value is not the minimum value in the order of the second color and the first color, and the correction value of the color satisfying the above condition is first set to -1. The image processing apparatus according to claim 17.
上記、条件を満たす色がない場合、補正を行わないことを特徴とする請求項19、又は請求項20に記載の画像処理装置。   21. The image processing apparatus according to claim 19, wherein correction is not performed when there is no color that satisfies the above condition. 前記複数色の画像データは、シアン及びマゼンタであることを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the plurality of colors of image data are cyan and magenta. 複数色の画像データを入力する手段と、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算する手段と、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化手段と、
上記量子化手段の量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出手段と、
上記複数の量子化手段における量子化閾値の平均値を求める閾値平均化手段と、
上記算出された複数の量子化誤差の負号及び上記複数の量子化誤差の和と上記量子化閾値の平均値または上記量子化閾値の平均値から量子化ステップ幅を引いた値との比較により量子化出力の補正を判定する判定手段と、
上記複数色毎に近傍画素の量子化誤差負号の数を検出する量子化誤差負号数検出手段と、
上記算出された複数の量子化誤差の負号及び上記近傍画素の量子化誤差負号の数により補正領域を判定する第1の補正領域判定手段と、
上記複数の量子化誤差より所定のビットを抽出するビット抽出手段と、
上記算出された複数の量子化誤差の負号及び上記ビット抽出手段により抽出されたビット列の比較により量子化出力の補正領域を判定する第2の補正領域判定手段と、
上記補正領域毎に補正する色の優先順位及び補正値を決定する手段と、
上記補正値により上記量子化出力を補正する量子化出力補正手段と、
上記複数色の画像データの差分の絶対値を所定値と比較する差分比較手段と、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出手段と、
上記第2の量子化誤差算出手段による誤差を用いて誤差拡散処理を行う手段とを備え、
上記差分比較手段の判定結果に従い、上記第1及び第2の補正領域判定手段による領域判定結果を選択して補正することを特徴とする画像処理装置。
Means for inputting image data of multiple colors;
A means for weighting a quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization means for quantizing the input image data to which the quantization error is added;
First quantization error calculation means for calculating a plurality of quantization errors generated by the quantization processing of the quantization means;
Threshold averaging means for obtaining an average value of quantization thresholds in the plurality of quantization means;
By comparing the negative sign of the calculated plurality of quantization errors and the sum of the plurality of quantization errors with an average value of the quantization threshold or a value obtained by subtracting the quantization step width from the average value of the quantization threshold. A determination means for determining correction of the quantized output;
A quantization error negative number detection means for detecting the number of quantization error negative signs of neighboring pixels for each of the plurality of colors;
First correction region determination means for determining a correction region based on the calculated negative number of quantization errors and the number of quantization error negative signs of the neighboring pixels;
Bit extraction means for extracting predetermined bits from the plurality of quantization errors;
A second correction area determination means for determining a correction area of the quantization output by comparing the calculated negative sign of the plurality of quantization errors and the bit string extracted by the bit extraction means;
Means for determining priority and correction value of the color to be corrected for each correction region;
A quantized output correcting means for correcting the quantized output by the correction value;
Difference comparison means for comparing the absolute value of the difference between the image data of the plurality of colors with a predetermined value;
Second quantization error calculating means for calculating a quantization error from the corrected quantization output;
Means for performing error diffusion processing using an error from the second quantization error calculation means,
An image processing apparatus characterized by selecting and correcting the area determination results by the first and second correction area determination means according to the determination result of the difference comparison means.
複数色の画像データを入力するステップと、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算するステップと、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化ステップと、
上記量子化ステップの量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出ステップと、
上記算出された複数の量子化誤差の負号及び上記複数の量子化誤差の和と量子化閾値または量子化閾値から量子化ステップ幅を引いた値との比較により量子化出力の補正を判定する判定ステップと、
上記複数色毎に近傍画素の量子化誤差負号の数を検出するステップと、
上記近傍画素の量子化誤差負号の数により補正領域を判定する判定ステップと、
上記補正領域毎に補正する色の優先順位及び補正値を決定するステップと、
上記補正値により上記量子化出力を補正するステップと、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出ステップとを備え、
上記第2の量子化誤差算出ステップによる誤差を用いて誤差拡散処理を行うことを特徴とする画像処理方法。
Inputting multiple color image data;
Weighting the quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization steps for quantizing the input image data to which the quantization error is added;
A first quantization error calculation step for calculating a plurality of quantization errors generated by the quantization process of the quantization step;
The correction of the quantization output is determined by comparing the negative sign of the calculated plurality of quantization errors and the sum of the plurality of quantization errors with a quantization threshold value or a value obtained by subtracting the quantization step width from the quantization threshold value. A determination step;
Detecting a quantization error negative number of neighboring pixels for each of the plurality of colors;
A determination step of determining a correction region based on the number of negative quantization errors of the neighboring pixels;
Determining the priority order and correction value of the color to be corrected for each correction region;
Correcting the quantized output by the correction value;
A second quantization error calculation step of calculating a quantization error from the corrected quantization output,
An image processing method, wherein error diffusion processing is performed using an error in the second quantization error calculation step.
複数色の画像データを入力するステップと、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算するステップと、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化ステップと、
上記量子化ステップの量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出ステップと、
上記複数の量子化誤差より所定のビットを抽出するビット抽出ステップと、
上記算出された複数の量子化誤差の負号及び上記ビット抽出ステップにより抽出されたビット列の比較により量子化出力の補正領域を判定する領域判定ステップと、
上記補正領域毎に補正する色の優先順位及び補正値を決定するステップと、
上記補正値により上記量子化出力を補正するステップと、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出ステップとを備え、
上記第2の量子化誤差算出ステップによる誤差を用いて誤差拡散処理を行うことを特徴とする画像処理方法。
Inputting multiple color image data;
Weighting the quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization steps for quantizing the input image data to which the quantization error is added;
A first quantization error calculation step for calculating a plurality of quantization errors generated by the quantization process of the quantization step;
A bit extraction step for extracting a predetermined bit from the plurality of quantization errors;
A region determination step of determining a correction region of the quantization output by comparing the calculated negative sign of the plurality of quantization errors and the bit string extracted by the bit extraction step;
Determining the priority order and correction value of the color to be corrected for each correction region;
Correcting the quantized output by the correction value;
A second quantization error calculation step of calculating a quantization error from the corrected quantization output,
An image processing method, wherein error diffusion processing is performed using an error in the second quantization error calculation step.
複数色の画像データを入力するステップと、
上記複数色毎に注目画素近傍の量子化誤差に重み付けを行い、上記入力画像データに加算するステップと、
上記量子化誤差が加算された入力画像データを量子化する複数の量子化ステップと、
上記量子化ステップの量子化処理により発生した複数の量子化誤差を算出する第1の量子化誤差算出ステップと、
上記複数の量子化ステップにおける量子化閾値の平均値を求める閾値平均化ステップと、
上記算出された複数の量子化誤差の負号及び上記複数の量子化誤差の和と上記量子化閾値の平均値または上記量子化閾値の平均値から量子化ステップ幅を引いた値との比較により量子化出力の補正を判定する判定ステップと、
上記複数色毎に近傍画素の量子化誤差負号の数を検出する量子化誤差負号数検出ステップと、
上記算出された複数の量子化誤差の負号及び上記近傍画素の量子化誤差負号の数により補正領域を判定する第1の補正領域判定ステップと、
上記複数の量子化誤差より所定のビットを抽出するビット抽出ステップと、
上記算出された複数の量子化誤差の負号及び上記ビット抽出ステップにより抽出されたビット列の比較により量子化出力の補正領域を判定する第2の補正領域判定ステップと、
上記補正領域毎に補正する色の優先順位及び補正値を決定するステップと、
上記補正値により上記量子化出力を補正する量子化出力補正ステップと、
上記複数色の画像データの差分の絶対値を所定値と比較する差分比較ステップと、
上記補正された量子化出力より量子化誤差を算出する第2の量子化誤差算出ステップと、
上記第2の量子化誤差算出ステップによる誤差を用いて誤差拡散処理を行うステップとを備え、
上記差分比較ステップの判定結果に従い、上記第1及び第2の補正領域判定ステップによる領域判定結果を選択して補正することを特徴とする画像処理方法。
Inputting multiple color image data;
Weighting the quantization error in the vicinity of the target pixel for each of the plurality of colors, and adding to the input image data;
A plurality of quantization steps for quantizing the input image data to which the quantization error is added;
A first quantization error calculation step for calculating a plurality of quantization errors generated by the quantization process of the quantization step;
A threshold averaging step for obtaining an average value of quantization thresholds in the plurality of quantization steps;
By comparing the negative sign of the calculated plurality of quantization errors and the sum of the plurality of quantization errors with an average value of the quantization threshold or a value obtained by subtracting the quantization step width from the average value of the quantization threshold. A determination step of determining correction of the quantized output;
A quantization error negative number detection step for detecting the number of quantization error negative signs of neighboring pixels for each of the plurality of colors;
A first correction area determination step of determining a correction area based on the calculated negative number of quantization errors and the number of quantization error negative signs of the neighboring pixels;
A bit extraction step for extracting a predetermined bit from the plurality of quantization errors;
A second correction region determination step of determining a correction region of the quantization output by comparing the calculated negative sign of the plurality of quantization errors and the bit string extracted by the bit extraction step;
Determining the priority order and correction value of the color to be corrected for each correction region;
A quantization output correction step of correcting the quantization output by the correction value;
A difference comparison step of comparing the absolute value of the difference between the image data of the plurality of colors with a predetermined value;
A second quantization error calculation step for calculating a quantization error from the corrected quantization output;
Performing error diffusion processing using the error in the second quantization error calculation step,
An image processing method comprising: selecting and correcting the region determination results in the first and second correction region determination steps according to the determination result in the difference comparison step.
請求項24〜請求項26のいずれかに記載の画像処理方法をコンピュータに実行させるための画像処理プログラム。   An image processing program for causing a computer to execute the image processing method according to any one of claims 24 to 26. コンピュータで読み出し可能なプログラムを記憶した記憶媒体であって、請求項27に記載の画像処理プログラムを格納したことを特徴とする記憶媒体。   A storage medium storing a computer-readable program, wherein the image processing program according to claim 27 is stored.
JP2008276802A 2008-10-28 2008-10-28 Image processing apparatus, image processing method, image processing program, and storage medium Pending JP2010109441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008276802A JP2010109441A (en) 2008-10-28 2008-10-28 Image processing apparatus, image processing method, image processing program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008276802A JP2010109441A (en) 2008-10-28 2008-10-28 Image processing apparatus, image processing method, image processing program, and storage medium

Publications (1)

Publication Number Publication Date
JP2010109441A true JP2010109441A (en) 2010-05-13

Family

ID=42298493

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008276802A Pending JP2010109441A (en) 2008-10-28 2008-10-28 Image processing apparatus, image processing method, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP2010109441A (en)

Similar Documents

Publication Publication Date Title
JP4533218B2 (en) Image processing apparatus, image processing method, and image processing program
JP4217657B2 (en) Image processing method, program, storage medium, and apparatus
US8208172B2 (en) Image forming apparatus and image forming method
JP4243854B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2006065834A (en) Image processing device and image processing method
EP0664643B1 (en) Image processing method and apparatus
JP2007306513A (en) Method and device for image data compression
JP2006270897A (en) Image processing device, method and program
JP2010109441A (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2007208639A (en) Image processing method, image processing device, image recording device and recording medium
JP2003304408A (en) Image processor and processing method
JP2000022951A (en) Image processing method and image processor
JP3770291B2 (en) Image processing method and image processing apparatus
JP5312158B2 (en) Image processing apparatus and image processing method
JP3870056B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
JP2004096709A (en) Image processing apparatus and image processing method
JP4027300B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP2018160883A (en) Image processing apparatus, image forming apparatus, image processing method, and image processing program
JPH05167842A (en) Image processor
JP4208583B2 (en) Image processing apparatus and method and program thereof
JP2999786B2 (en) Color image processing method
KR20030070740A (en) Method and apparatus for converting level of image
JP3048170B2 (en) Color image processing equipment
JP4158652B2 (en) Image processing apparatus, image processing method, and image processing program
JPH11339032A (en) Image processing method and device therefor

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20100630