JP4293255B2 - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JP4293255B2
JP4293255B2 JP2007081837A JP2007081837A JP4293255B2 JP 4293255 B2 JP4293255 B2 JP 4293255B2 JP 2007081837 A JP2007081837 A JP 2007081837A JP 2007081837 A JP2007081837 A JP 2007081837A JP 4293255 B2 JP4293255 B2 JP 4293255B2
Authority
JP
Japan
Prior art keywords
image data
weighting factor
input image
filter
range
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
JP2007081837A
Other languages
Japanese (ja)
Other versions
JP2007181250A (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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2007081837A priority Critical patent/JP4293255B2/en
Publication of JP2007181250A publication Critical patent/JP2007181250A/en
Application granted granted Critical
Publication of JP4293255B2 publication Critical patent/JP4293255B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、誤差拡散処理を行って画像データの少階調化を行う画像処理方法および装置に関する。   The present invention relates to an image processing method and apparatus for performing gradation reduction of image data by performing error diffusion processing.

例えば、コンピュータで作成したり画像入力装置で入力して得られたような多階調の画像を、より少ない階調のプリンタ等の画像出力装置によって出力する場合には、画像データの少階調化を行う必要がある。このように画像データの少階調化を行う場合でも、原画像が持つ画品質をできるだけ維持する技術として、従来より擬似中間調表現が利用されている。擬似中間調表現の手法としては、種々提案されているが、そのうち、誤差拡散法による疑似中間調表現は、画品質が良いため、出力階調が2値のプリンタ等で広く利用されている。なお、誤差拡散法は、注目画素について発生した量子化誤差を、注目画素の近傍における未量子化画素の入力画像データに対して拡散する方法である。   For example, when a multi-gradation image created by a computer or input by an image input device is output by an image output device such as a printer with fewer gradations, Need to be done. As described above, pseudo halftone expression has been used as a technique for maintaining the image quality of the original image as much as possible even when the gradation of the image data is reduced. Various methods of pseudo-halftone expression have been proposed. Among them, pseudo-halftone expression by the error diffusion method is widely used in printers having a binary output gradation because of good image quality. The error diffusion method is a method of diffusing the quantization error generated for the target pixel to the input image data of the unquantized pixel in the vicinity of the target pixel.

ここで、一般的な誤差拡散法の原理(非特許文献1参照)について詳しく説明する。   Here, the principle of a general error diffusion method (see Non-Patent Document 1) will be described in detail.

誤差拡散法は、人間の視覚特性を考慮して、量子化誤差を高域に変調することによって目立たなくし、擬似中間調を表現する方法である。図10は、一般的な誤差拡散処理を実現するための画像処理装置の構成を示すブロック図である。この画像処理装置は、入力画像データx(i,j)から後述するフィルタ114の出力データを減算する減算器111と、この減算器111の出力データを量子化して、出力画像データy(i,j)として出力する量子化器(図ではQと記す。)112と、出力画像データy(i,j)から減算器111の出力データを減算する減算器113と、この減算器113の出力データに対して所定のフィルタリング処理を行って、減算器111に出力するフィルタ114とを備えている。なお、図中、e(i,j)は、量子化器112における量子化によって発生する量子化誤差を表している。従って、減算器113の出力データは、量子化誤差e(i,j)となる。なお、i,jは、互いに直交する2方向(以下、i方向およびj方向という。)の各座標を表している。   The error diffusion method is a method of expressing a pseudo halftone by making the quantization error inconspicuous by taking human visual characteristics into account and modulating it. FIG. 10 is a block diagram showing a configuration of an image processing apparatus for realizing general error diffusion processing. This image processing apparatus includes a subtractor 111 that subtracts output data of a filter 114 (to be described later) from input image data x (i, j), and quantizes the output data of the subtractor 111 to output image data y (i, j), a quantizer (denoted as Q in the figure) 112, a subtractor 113 for subtracting the output data of the subtractor 111 from the output image data y (i, j), and output data of the subtractor 113 And a filter 114 that performs a predetermined filtering process and outputs the result to the subtractor 111. In the figure, e (i, j) represents a quantization error caused by quantization in the quantizer 112. Therefore, the output data of the subtracter 113 becomes a quantization error e (i, j). Note that i and j represent coordinates in two directions orthogonal to each other (hereinafter referred to as i direction and j direction).

フィルタ114は、一種の線形フィルタであり、ここでは、その伝達関数を、G(z1,2 )とする。なお、z1,2 は、それぞれ、i方向、j方向に関するz変換における変数である。図10に示した画像処理装置の構成全体は、2次元のΣΔ変調回路とみなすことができる。従って、この画像処理装置における入出力関係は、次の式(1)のように与えられる。 The filter 114 is a kind of linear filter, and here, its transfer function is G (z 1, z 2 ). Note that z 1 and z 2 are variables in z-conversion regarding the i direction and the j direction, respectively. The entire configuration of the image processing apparatus shown in FIG. 10 can be regarded as a two-dimensional ΣΔ modulation circuit. Therefore, the input / output relationship in this image processing apparatus is given by the following equation (1).

[数1]
Y(z1,2 )=X(z1,2 )+H(z1,2 )E(z1,2 )…(1)
[Equation 1]
Y (z 1, z 2) = X (z 1, z 2) + H (z 1, z 2) E (z 1, z 2) ... (1)

なお、式(1)において、Y(z1,2 ),X(z1,2 ),E(z1,2 )は、それぞれ、y(i,j),x(i,j),e(i,j)をz変換した値である。また、量子化誤差E(z1,2 )を変調するフィルタの伝達関数H(z1,2 )は、次の式(2)で与えられる。 In equation (1), Y (z 1, z 2 ), X (z 1, z 2 ), and E (z 1, z 2 ) are y (i, j) and x (i, j), respectively. ), E (i, j) are values obtained by z conversion. The transfer function H (z 1, z 2 ) of the filter that modulates the quantization error E (z 1, z 2 ) is given by the following equation (2).

[数2]
H(z1,2 )=1−G(z1,2 ) …(2)
[Equation 2]
H (z 1, z 2) = 1-G (z 1, z 2) ... (2)

伝達関数H(z1,2 )は、2次元の有限インパルス応答(FIR)ハイパスフィルタを表しており、このハイパスフィルタは、量子化誤差E(z1,2 )の高域への変調特性を決定する誤差変調用フィルタとなる。なお、以下、伝達関数H(z1,2 ),G(z1,2 )で表されるフィルタを表す場合にも、フィルタH(z1,2 ),フィルタG(z1,2 )と記す。 The transfer function H (z 1, z 2 ) represents a two-dimensional finite impulse response (FIR) high pass filter, which modulates the quantization error E (z 1, z 2 ) to the high range. It becomes an error modulation filter that determines the characteristics. In the following description, the filter H (z 1, z 2 ) and the filter G (z 1, z 1 ) are also used to represent the filters represented by the transfer functions H (z 1, z 2 ) and G (z 1, z 2 ) . z 2 ).

G(z1,2 )は、次の式(3)のように表される。 G (z 1, z 2 ) is expressed as the following formula (3).

[数3]
G(z1,2 )=ΣΣg(n1,n2)z1 -n1 2 -n2 …(3)
[Equation 3]
G (z 1, z 2) = ΣΣg (n1, n2) z 1 -n1 z 2 -n2 ... (3)

なお、式(3)中の最初のΣはn1が−N1 からM1 についての総和を表し、次のΣはn2が−N2 からM2 についての総和を表している。ただし、N1 ,M1 ,N2 ,M2 は、それぞれ所定の正の整数である。また、g(n1,n2)は、フィルタ係数であり、n1=0,n2=0は、注目画素を表す。 Note that the first Σ in equation (3) represents the sum of n1 from −N 1 to M 1 , and the next Σ represents the sum of n2 from −N 2 to M 2 . Here, N 1 , M 1 , N 2 , and M 2 are predetermined positive integers. Further, g (n1, n2) is a filter coefficient, and n1 = 0 and n2 = 0 represent a target pixel.

ここで、式(4)に、G(z1,2 )の係数g(i,j)の例として、代表的なフィルタの場合の例を挙げる。なお、式中の*は注目画素を表し、g(0,0)=0となる。 Here, an example of a typical filter is given as an example of the coefficient g (i, j) of G (z 1, z 2 ) in Expression (4). Note that * in the expression represents a target pixel, and g (0, 0) = 0.

Figure 0004293255
Figure 0004293255

式(4)で表されるフィルタG(z1,2 )を用いた誤差変調用フィルタH(z1,2 )の周波数特性を図11に示す。なお、図11において、周波数を表す数値は、絶対値が大きいほど周波数が高いことを表している。式(4)で表されるフィルタG(z1,2 )およびこれを用いたフィルタH(z1,2 )は、Jarvis,Judice&Ninkeのフィルタ(以下、Jarvisのフィルタと言う。)と呼ばれるものである。 FIG. 11 shows the frequency characteristics of the error modulation filter H (z 1, z 2 ) using the filter G (z 1, z 2 ) represented by Expression (4). In FIG. 11, the numerical value representing the frequency represents that the frequency is higher as the absolute value is larger. The filter G (z 1, z 2 ) represented by the expression (4) and the filter H (z 1, z 2 ) using the filter G (z 1, z 2 ) are called Jarvis, Judice & Ninke filters (hereinafter referred to as Jarvis filters). Is.

貴家仁志、他1名,「ディジタル画像データのCによる階調変換技法」,インターフェース,1993年8月,p.158−171Hitoshi Kiya, and one other, “Tone Conversion Method for Digital Image Data Using C”, Interface, August 1993, p. 158-171

しかしながら、上述のような従来の誤差拡散法では、ハイライト領域(ドットが疎が領域)およびシャドー領域(ドットが密な領域)においてドットの分散性が悪く、誤差拡散法独特の“ワーム”と呼ばれる模様が生じ、これが画品質を劣化させるという問題点があった。   However, in the conventional error diffusion method as described above, dot dispersibility is poor in the highlight area (the area where the dots are sparse) and the shadow area (the area where the dots are dense), and the error diffusion method has a unique “worm”. There was a problem that a pattern called this occurred and this deteriorated the image quality.

図12に、ドットの分散性が悪く、“ワーム”模様が生じている画像の一例を示す。この図は、垂直方向に階調値が徐々に変化する画像(以下、垂直方向のランプ画像と言う。)を、前述の一般的なJarvisのフィルタを用いて誤差拡散処理して得られた画像のうちのハイライト部分を示したものである。この図に示した画像では、ドットが均一に分散されずに、虫が這ったようなドットの連なりである“ワーム”模様が生じ、これが画質を劣化させているのが分かる。   FIG. 12 shows an example of an image with poor dot dispersibility and a “worm” pattern. This figure shows an image obtained by subjecting an image whose gradation value gradually changes in the vertical direction (hereinafter referred to as a vertical ramp image) to error diffusion processing using the above-mentioned general Jarvis filter. The highlighted part is shown. In the image shown in this figure, the dots are not uniformly distributed, but a “worm” pattern, which is a series of dots like insects, appears, which deteriorates the image quality.

ここで、従来の誤差拡散法においてドットの分散性が悪くなる理由について、誤差変調用フィルタの周波数特性の視点から考察する。図13は、図11に示したJarvisのフィルタの周波数特性を等高線を用いて表現した図である。このような表現により、フィルタの周波数特性の空間的な形状(特性)がよく分かる。図13を見ると、まず、式(4)に示したように誤差変調用フィルタの係数が空間的に非対称であるため、フィルタの周波数特性も空間的に非対称になっていることが分かる。そして、特に、図13に示した周波数特性の中央部分、すなわち量子化誤差の低周波域に対する特性の部分において、空間的な歪みが大きい。ドットの分散性が問題になるのは、ハイライト領域やシャドー領域のような平坦な部分が多いので、図13に示した周波数特性の中央部分の空間的な歪みによって、出力画像データの周波数特性に空間的な偏りが発生し、これがドットの分散性を悪化させて“ワーム”模様が生じるものと考えられる。   Here, the reason why the dot dispersibility deteriorates in the conventional error diffusion method will be considered from the viewpoint of the frequency characteristics of the error modulation filter. FIG. 13 is a diagram expressing the frequency characteristics of the Jarvis filter shown in FIG. 11 using contour lines. With such an expression, the spatial shape (characteristic) of the frequency characteristic of the filter is well understood. As can be seen from FIG. 13, since the coefficient of the error modulation filter is spatially asymmetric as shown in Equation (4), the frequency characteristics of the filter are also spatially asymmetric. In particular, the spatial distortion is large in the central portion of the frequency characteristic shown in FIG. 13, that is, the characteristic portion of the quantization error with respect to the low frequency region. The dot dispersibility becomes a problem because there are many flat parts such as highlight areas and shadow areas. Therefore, the frequency characteristics of the output image data are caused by the spatial distortion at the center of the frequency characteristics shown in FIG. It is considered that a spatial deviation occurs in the image, which deteriorates the dispersibility of the dots and produces a “worm” pattern.

従って、誤差変調用フィルタの低周波域に対する特性を、もっと空間的に対称になるように改善すれば、ドットの分散性の問題を解決することができると考えられる。   Accordingly, it is considered that the problem of dot dispersibility can be solved by improving the characteristics of the error modulation filter with respect to the low frequency region so as to be more spatially symmetric.

しかしながら、誤差変調用フィルタの低周波域に対する特性を改善しようとすると、今度は、図13に示した周波数特性の周辺部分、すなわち高周波域に対する特性の部分における歪みが大きくなり、中間調領域で“ワーム”模様が生じてしまう。このように、誤差変調用フィルタでは、全ての周波数帯域で空間的に対称な特性を実現することは難しい。   However, if an attempt is made to improve the characteristics of the error modulation filter in the low frequency range, the distortion in the peripheral portion of the frequency characteristics shown in FIG. "Worm" pattern is generated. As described above, it is difficult for the error modulation filter to realize spatially symmetric characteristics in all frequency bands.

本発明はかかる問題点に鑑みてなされたもので、その目的は、誤差拡散処理を行って、画像データの少階調化を行いながら、画品質の劣化を防止できるようにした画像処理方法および装置を提供することにある。   The present invention has been made in view of such problems, and an object of the present invention is to provide an image processing method capable of preventing image quality deterioration while performing error diffusion processing and reducing the gradation of image data. To provide an apparatus.

本発明の画像処理方法は、入力画像データを、画素毎に量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データに変換する量子化手順と、注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数を選択する重み係数選択手順と、注目画素について量子化手順における量子化によって発生する量子化誤差に、重み係数選択手順によって選択された重み係数を乗じて、注目画素の近傍における未量子化画素の入力画像データに対して拡散する誤差拡散手順とを備えたものである。また、上記重み係数選択手順では、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数を選択し、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択するようになっている。 The image processing method of the present invention includes a quantization procedure for quantizing input image data for each pixel and converting the input image data into output image data having one of two or more quantization levels, and input image data of a target pixel. The weighting factor selected by the weighting factor selection procedure is added to the weighting factor selection procedure for selecting a weighting factor for error diffusion according to the gradation value, and the quantization error generated by the quantization in the quantization procedure for the target pixel. And an error diffusion procedure for diffusing the input image data of unquantized pixels in the vicinity of the pixel of interest by multiplication. In the weighting factor selection procedure, the gradation value of the input image data of the target pixel is within the first range including the values farthest from the minimum value and the maximum value in the gradation value range of the input image data. Is included, the first weighting factor composed of a plurality of elements is selected, and the gradation value of the input image data of the target pixel includes the minimum value or the maximum value in the range of gradation values of the input image data. When included in the predetermined second range, a second weighting factor composed of a plurality of elements including elements different from the elements in the first weighting coefficient is selected, and the gradation value of the input image data of the target pixel is When included in the range between the first range and the second range, each element has an element obtained by linear interpolation based on the first weighting coefficient and the second weighting coefficient. A weighting factor is selected.

本発明の画像処理装置は、入力画像データを、画素毎に量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データに変換する量子化手段と、注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数を選択する重み係数選択手段と、注目画素について量子化手段における量子化によって発生する量子化誤差に、重み係数選択手段によって選択された重み係数を乗じて、注目画素の近傍における未量子化画素の入力画像データに対して拡散する誤差拡散手段とを備えたものである。また、上記重み係数選択手段は、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数を選択し、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択するようになっている。 An image processing apparatus according to the present invention includes a quantization unit that quantizes input image data for each pixel and converts the input image data into output image data having one of two or more quantization levels, and input image data of a target pixel. The weighting coefficient selection means for selecting a weighting coefficient for error diffusion according to the gradation value, and the weighting coefficient selected by the weighting coefficient selection means for the quantization error generated by the quantization in the quantization means for the target pixel. And an error diffusing unit that multiplies and diffuses the input image data of unquantized pixels in the vicinity of the target pixel. Further, the weighting factor selecting means has a gradation value of the input image data of the target pixel within a first range including a value farthest from a minimum value and a maximum value in a range of gradation values of the input image data. Is included, the first weighting factor composed of a plurality of elements is selected, and the gradation value of the input image data of the target pixel includes the minimum value or the maximum value in the range of gradation values of the input image data. When included in the predetermined second range, a second weighting factor composed of a plurality of elements including elements different from the elements in the first weighting coefficient is selected, and the gradation value of the input image data of the target pixel is When included in the range between the first range and the second range, each element has an element obtained by linear interpolation based on the first weighting coefficient and the second weighting coefficient. A weighting factor is selected.

本発明の画像処理方法では、量子化手順によって、入力画像データが、画素毎に量子化されて、2つ以上の量子化レベルのいずれかを有する出力画像データに変換される。また、重み係数選択手順によって、注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数が選択され、誤差拡散手順によって、注目画素について量子化手順における量子化によって発生する量子化誤差に、重み係数選択手順によって選択された重み係数が乗じられて、注目画素の近傍における未量子化画素の入力画像データに対して拡散される。また、重み係数が選択される際には、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数が選択され、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数が選択され、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数が選択される。 In the image processing method of the present invention, the input image data is quantized for each pixel by the quantization procedure, and converted into output image data having one of two or more quantization levels. Further, the weighting factor for error diffusion is selected according to the gradation value of the input image data of the target pixel by the weighting factor selection procedure, and the quantum generated by the quantization in the quantization procedure is performed for the target pixel by the error diffusion procedure. The quantization error is multiplied by the weighting factor selected by the weighting factor selection procedure, and is diffused to the input image data of the unquantized pixel in the vicinity of the target pixel. In addition, when the weighting factor is selected, the gradation value of the input image data of the target pixel includes the first value that is farthest from the minimum value and the maximum value in the gradation value range of the input image data. Is included, the first weighting factor composed of a plurality of elements is selected, and the gradation value of the input image data of the target pixel is the minimum value or the maximum value in the gradation value range of the input image data. When included in a predetermined second range including a value, a second weighting factor composed of a plurality of elements including elements different from the elements in the first weighting coefficient is selected, and the scale of the input image data of the target pixel is selected. When the tone value is included in the range between the first range and the second range, it is obtained by linear interpolation for each element based on the first weighting factor and the second weighting factor. A weighting factor with elements is selected.

本発明の画像処理装置では、量子化手段によって、入力画像データが、画素毎に量子化されて、2つ以上の量子化レベルのいずれかを有する出力画像データに変換される。また、重み係数選択手段によって、注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数が選択され、誤差拡散手段によって、注目画素について量子化手段における量子化によって発生する量子化誤差に、重み係数選択手段によって選択された重み係数が乗じられて、注目画素の近傍における未量子化画素の入力画像データに対して拡散される。また、重み係数が選択される際には、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数が選択され、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数が選択され、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数が選択される。 In the image processing apparatus of the present invention, the input image data is quantized for each pixel by the quantization means and converted into output image data having one of two or more quantization levels. In addition, the weighting factor selection unit selects a weighting factor for error diffusion according to the gradation value of the input image data of the target pixel, and the error diffusion unit causes the target pixel to be generated by quantization in the quantization unit. The quantization error is multiplied by the weighting factor selected by the weighting factor selection means, and is diffused to the input image data of the unquantized pixel in the vicinity of the target pixel. In addition, when the weighting factor is selected, the gradation value of the input image data of the target pixel includes the first value that is farthest from the minimum value and the maximum value in the gradation value range of the input image data. Is included, the first weighting factor composed of a plurality of elements is selected, and the gradation value of the input image data of the target pixel is the minimum value or the maximum value in the gradation value range of the input image data. When included in a predetermined second range including a value, a second weighting factor composed of a plurality of elements including elements different from the elements in the first weighting coefficient is selected, and the scale of the input image data of the target pixel is selected. When the tone value is included in the range between the first range and the second range, it is obtained by linear interpolation for each element based on the first weighting factor and the second weighting factor. A weighting factor with elements is selected.

本発明の画像処理方法または画像処理装置によれば、入力画像データを、画素毎に量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データに変換すると共に、注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数を選択し、注目画素について量子化によって発生する量子化誤差に、選択された重み係数を乗じて、注目画素の近傍における未量子化画素の入力画像データに対して拡散するようにしたので、誤差拡散処理を行って、画像データの少階調化を行いながら、画品質の劣化を防止することができるという効果を奏する。
また、重み係数を選択する際に、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数を選択し、注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択するようにしたので、不連続的な切り換えによる画質劣化もなく、滑らかな階調性を持つ出力画像データを得ることができるという効果を奏する。
According to the image processing method or the image processing apparatus of the present invention, the input image data is quantized for each pixel and converted into output image data having one of two or more quantization levels, and the input of the target pixel is performed. Select the weighting factor for error diffusion according to the tone value of the image data, multiply the quantization error generated by quantization for the pixel of interest by the selected weighting factor, and unquantize in the vicinity of the pixel of interest Since the pixel input image data is diffused, an error diffusion process is performed to reduce the gradation of the image data, and the image quality can be prevented from being deteriorated.
Further, when selecting the weighting factor, the first range in which the gradation value of the input image data of the target pixel includes a value farthest from the minimum value and the maximum value in the range of the gradation value of the input image data. A first weighting factor composed of a plurality of elements is selected, and the gradation value of the input image data of the target pixel is set to a minimum value or a maximum value in a range of gradation values of the input image data. A second weighting factor composed of a plurality of elements including elements different from the elements in the first weighting factor is selected, and the gradation value of the input image data of the target pixel is selected. Is included in the range between the first range and the second range, the elements obtained by linear interpolation for each element based on the first weighting factor and the second weighting factor are Since the weighting factor is selected, discontinuous switching No image deterioration due an effect that it is possible to obtain an output image data with smooth gradation.

以下、本発明の実施の形態について図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の第1の実施の形態に係る画像処理方法を実現するための画像処理装置の構成を示すブロック図である。この画像処理装置10は、入力画像データx(i,j)から後述するフィルタ部14の出力データを減算する減算器11と、この減算器11の出力データを、画素毎に、1つ以上の閾値に基づいて量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データy(i,j)に変換する量子化手段としての量子化器(図ではQと記す。)12と、この量子化器12の出力データから減算器11の出力データを減算して、量子化誤差e(i,j)を生成する減算器13と、この減算器13の出力データに対して所定のフィルタリング処理を行って、減算器11に出力するフィルタ部14と、入力画像データx(i,j)の階調値に応じて、誤差拡散用の重み係数に対応するフィルタ部14におけるフィルタ係数を選択し、フィルタ部14に設定する重み係数選択部15とを備えている。   FIG. 1 is a block diagram showing a configuration of an image processing apparatus for realizing an image processing method according to the first embodiment of the present invention. The image processing apparatus 10 includes a subtractor 11 that subtracts output data of a filter unit 14 (to be described later) from input image data x (i, j), and outputs the output data of the subtracter 11 to one or more pixels for each pixel. A quantizer (denoted as Q in the figure) 12 as a quantization means for performing quantization based on a threshold value and converting it into output image data y (i, j) having one of two or more quantization levels; The subtracter 13 that subtracts the output data of the subtractor 11 from the output data of the quantizer 12 to generate a quantization error e (i, j), and the output data of the subtractor 13 has a predetermined value. The filter coefficient in the filter unit 14 that performs filtering processing and outputs to the subtractor 11 and the filter unit 14 corresponding to the weight coefficient for error diffusion is determined according to the gradation value of the input image data x (i, j). Select and filter part 1 And a weighting coefficient selection unit 15 to be set to.

フィルタ部14および減算器11は、注目画素について量子化器12における量子化によって発生する量子化誤差e(i,j)に、重み係数選択部15によって選択された重み係数(フィルタ係数)を乗じて、注目画素の近傍における未量子化画素の入力画像データに対して拡散する誤差拡散手段に対応し、重み係数に応じた変調特性で、量子化誤差を高周波域に変調するものである。   The filter unit 14 and the subtractor 11 multiply the quantization error e (i, j) generated by the quantization in the quantizer 12 for the pixel of interest by the weight coefficient (filter coefficient) selected by the weight coefficient selection unit 15. This corresponds to error diffusion means for diffusing the input image data of unquantized pixels in the vicinity of the pixel of interest, and modulates the quantization error to a high frequency region with a modulation characteristic corresponding to the weighting factor.

フィルタ部14は、一種の線形フィルタを構成し、ここでは、その伝達関数を、G(z1,2 )とする。なお、z1,2 は、それぞれ、i方向、j方向に関するz変換における変数である。G(z1,2 )は、前出の式(3)のように表される。フィルタ部14は、例えばディジタルフィルタによって実現される。 The filter unit 14 constitutes a kind of linear filter, and its transfer function is G (z 1, z 2 ) here. Note that z 1 and z 2 are variables in z-conversion regarding the i direction and the j direction, respectively. G (z 1, z 2 ) is expressed as in the above equation (3). The filter unit 14 is realized by a digital filter, for example.

画像処理装置10に入力される入力画像データx(i,j)は、例えば、画像入力装置1より与えられ、画像処理装置10より出力される出力画像データy(i,j)は、例えば、画像出力装置2に対して出力される。画像入力装置1としては、イメージスキャナ、ディジタルカメラ、ビデオカメラ等がある。画像出力装置2としては、プリンタ、液晶ディスプレイ等がある。   The input image data x (i, j) input to the image processing apparatus 10 is given from, for example, the image input apparatus 1, and the output image data y (i, j) output from the image processing apparatus 10 is, for example, It is output to the image output device 2. Examples of the image input device 1 include an image scanner, a digital camera, and a video camera. Examples of the image output device 2 include a printer and a liquid crystal display.

なお、本実施の形態に係る画像処理装置10は、例えば、単体の装置として構成してもよいし、IC(集積回路)化する等してプリンタ等の画像出力装置に内蔵するようにしてもよい。   Note that the image processing apparatus 10 according to the present embodiment may be configured as, for example, a single apparatus, or may be incorporated in an image output apparatus such as a printer by being integrated into an IC (integrated circuit). Good.

本実施の形態では、入力画像データx(i,j)の階調値を“0”〜“255”の256段階とし、最終的な出力画像データy(i,j)を2値とするために、量子化器12における各量子化レベルを、“0”と“255”に設定している。   In the present embodiment, the gradation value of the input image data x (i, j) is set to 256 levels from “0” to “255”, and the final output image data y (i, j) is set to binary. In addition, each quantization level in the quantizer 12 is set to “0” and “255”.

重み係数選択部15は、注目画素の入力画像データx(i,j)の階調値が量子化器12における最小または最大の量子化レベルに近いほど、量子化誤差の変調特性が低周波域に対して空間的により対称に近くなるような重み係数を選択するようになっている。   The weighting factor selection unit 15 indicates that the modulation characteristic of the quantization error becomes lower in frequency range as the gradation value of the input image data x (i, j) of the target pixel is closer to the minimum or maximum quantization level in the quantizer 12. The weighting coefficient is selected so as to be more symmetrical with respect to space.

具体的には、重み係数選択部15は、注目画素の入力画像データx(i,j)の階調値が、入力画像データの階調値の範囲のうちの最小値“0”および最大値“255”から最も離れた値を含む第1の範囲(12<x(i,j)<243)内に含まれるときには、複数の要素からなる第1の重み係数を選択し、注目画素の入力画像データx(i,j)の階調値が、入力画像データの階調値の範囲のうちの最小値“0”または最大値“255”を含む所定の第2の範囲(x(i,j)≦5,x(i,j)≧250)内に含まれるときには、第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、注目画素の入力画像データx(i,j)の階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときには、第1の重み係数と第2の重み係数に基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択するようになっている。   Specifically, the weight coefficient selection unit 15 determines that the tone value of the input image data x (i, j) of the target pixel is the minimum value “0” and the maximum value in the tone value range of the input image data. When included in the first range (12 <x (i, j) <243) that includes the value farthest from “255”, the first weighting coefficient composed of a plurality of elements is selected and the pixel of interest is input. The gradation value of the image data x (i, j) is a predetermined second range (x (i, j,) including the minimum value “0” or the maximum value “255” in the gradation value range of the input image data. j) ≦ 5, x (i, j) ≧ 250), a second weighting factor consisting of a plurality of elements including elements different from the elements in the first weighting factor is selected, and the pixel of interest When the gradation value of the input image data x (i, j) is included in a range between the first range and the second range In is adapted to, based on the first and second weighting coefficients, to select a weighting coefficient with a resulting element by linear interpolation for each element.

以下、第1の重み係数が選択されたときにフィルタ部14によって実現されるフィルタを中間調領域用フィルタAと言い、第2の重み係数が選択されたときにフィルタ部14によって実現されるフィルタをハイライト領域用フィルタBと言う。フィルタAのフィルタ係数g(i,j)の一例を式(5)に示し、フィルタBのフィルタ係数g(i,j)の一例を式(6)に示す。   Hereinafter, the filter realized by the filter unit 14 when the first weighting factor is selected is referred to as a halftone region filter A, and the filter realized by the filter unit 14 when the second weighting factor is selected. Is referred to as a highlight area filter B. An example of the filter coefficient g (i, j) of the filter A is shown in Expression (5), and an example of the filter coefficient g (i, j) of the filter B is shown in Expression (6).

Figure 0004293255
Figure 0004293255

Figure 0004293255
Figure 0004293255

図2は、式(5)で表されるフィルタAを用いた誤差変調用フィルタH(z1,2 )の周波数特性を等高線を用いて表現した図であり、図3は、式(6)で表されるフィルタBを用いた誤差変調用フィルタH(z1,2 )の周波数特性を等高線を用いて表現した図である。 FIG. 2 is a diagram in which the frequency characteristics of the error modulation filter H (z 1, z 2 ) using the filter A represented by Expression (5) are expressed using contour lines, and FIG. FIG. 6 is a diagram expressing the frequency characteristics of an error modulation filter H (z 1, z 2 ) using a filter B represented by () using contour lines.

図2を見ると、中間調領域用フィルタAでは、周辺部分、すなわち量子化誤差の高周波域に対する特性の部分が空間的にほぼ対称になっており、中間調領域でテクスチャの空間的な歪みが発生しないようなフィルタになっていることが分かる。一方、図3を見ると、ハイライト用フィルタBでは、中央部分、すなわち量子化誤差の低周波域に対する特性の部分が空間的にほぼ対称(円形)になっており、ハイライト領域およびシャドー領域でドットの分散性がよく、“ワーム”模様が発生しないようなフィルタになっていることが分かる。   Referring to FIG. 2, in the halftone region filter A, the peripheral portion, that is, the characteristic portion of the quantization error with respect to the high frequency region is spatially almost symmetrical, and the spatial distortion of the texture is present in the halftone region. It can be seen that the filter does not occur. On the other hand, in FIG. 3, in the highlight filter B, the central portion, that is, the characteristic portion of the quantization error with respect to the low frequency region is spatially almost symmetric (circular), and the highlight region and the shadow region It can be seen that the filter has a good dot dispersibility and does not generate a “worm” pattern.

注目画素の入力画像データx(i,j)の階調値が、第1の範囲と第2の範囲との間の範囲、すなわち、6≦x(i,j)≦12または243≦x(i,j)≦249に含まれるときには、フィルタ部14によって実現されるフィルタは、フィルタAのフィルタ係数とフィルタBのフィルタ係数とに基づいて、各フィルタ係数毎に直線補間して得られるフィルタ係数からなるフィルタとなる。このように、第1の範囲と第2の範囲との間の範囲では、フィルタ係数が段階的に切り換えられる。   The gradation value of the input image data x (i, j) of the target pixel is a range between the first range and the second range, that is, 6 ≦ x (i, j) ≦ 12 or 243 ≦ x ( i, j) ≦ 249, the filter realized by the filter unit 14 is a filter coefficient obtained by linear interpolation for each filter coefficient based on the filter coefficient of the filter A and the filter coefficient of the filter B. It becomes the filter which consists of. Thus, in the range between the first range and the second range, the filter coefficients are switched stepwise.

図4ないし図6は、フィルタ係数が、フィルタAのフィルタ係数からフィルタBのフィルタ係数へ段階的に切り換えられるときの各フィルタを用いた誤差変調用フィルタH(z1,2 )の周波数特性を等高線を用いて表現した図である。 4 to 6 show frequency characteristics of the error modulation filter H (z 1, z 2 ) using each filter when the filter coefficient is switched in stages from the filter coefficient of the filter A to the filter coefficient of the filter B. It is the figure which expressed using a contour line.

図4(a)は、フィルタAに対応する周波数特性を表している。図4(b)は、注目画素の入力画像データx(i,j)の階調値が“12”または“243”のときに選択されるフィルタに対応する周波数特性を表している。フィルタAの各フィルタ係数を“A”で代表して表し、フィルタBの各フィルタ係数を“B”で代表して表したとき、図4(b)に示した周波数特性に対応するフィルタの各フィルタ係数は、(7A+B)/8となる。図4(c)は、注目画素の入力画像データx(i,j)の階調値が“11”または“244”のときに選択されるフィルタに対応する周波数特性を表している。図4(c)に示した周波数特性に対応するフィルタの各フィルタ係数は、(6A+2B)/8となる。   FIG. 4A shows frequency characteristics corresponding to the filter A. FIG. 4B shows frequency characteristics corresponding to a filter selected when the gradation value of the input image data x (i, j) of the target pixel is “12” or “243”. When each filter coefficient of the filter A is represented by “A” and each filter coefficient of the filter B is represented by “B”, each filter coefficient corresponding to the frequency characteristic shown in FIG. The filter coefficient is (7A + B) / 8. FIG. 4C shows the frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “11” or “244”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 4C is (6A + 2B) / 8.

図5(a)は、注目画素の入力画像データx(i,j)の階調値が“10”または“245”のときに選択されるフィルタに対応する周波数特性を表している。図5(a)に示した周波数特性に対応するフィルタの各フィルタ係数は、(5A+3B)/8となる。図5(b)は、注目画素の入力画像データx(i,j)の階調値が“9”または“246”のときに選択されるフィルタに対応する周波数特性を表している。図5(b)に示した周波数特性に対応するフィルタの各フィルタ係数は、(4A+4B)/8となる。図5(c)は、注目画素の入力画像データx(i,j)の階調値が“8”または“247”のときに選択されるフィルタに対応する周波数特性を表している。図5(c)に示した周波数特性に対応するフィルタの各フィルタ係数は、(3A+5B)/8となる。   FIG. 5A shows the frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “10” or “245”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 5A is (5A + 3B) / 8. FIG. 5B shows frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “9” or “246”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 5B is (4A + 4B) / 8. FIG. 5C shows the frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “8” or “247”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 5C is (3A + 5B) / 8.

図6(a)は、注目画素の入力画像データx(i,j)の階調値が“7”または“248”のときに選択されるフィルタに対応する周波数特性を表している。図6(a)に示した周波数特性に対応するフィルタの各フィルタ係数は、(2A+6B)/8となる。図6(b)は、注目画素の入力画像データx(i,j)の階調値が“6”または“249”のときに選択されるフィルタに対応する周波数特性を表している。図6(b)に示した周波数特性に対応するフィルタの各フィルタ係数は、(A+7B)/8となる。図6(c)は、フィルタBに対応する周波数特性を表している。   FIG. 6A shows the frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “7” or “248”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 6A is (2A + 6B) / 8. FIG. 6B shows frequency characteristics corresponding to the filter selected when the gradation value of the input image data x (i, j) of the target pixel is “6” or “249”. Each filter coefficient of the filter corresponding to the frequency characteristic shown in FIG. 6B is (A + 7B) / 8. FIG. 6C shows frequency characteristics corresponding to the filter B.

次に、本実施の形態に係る画像処理装置10の作用について説明する。なお、以下の説明は、本実施の形態に係る画像処理方法の説明を兼ねている。   Next, the operation of the image processing apparatus 10 according to the present embodiment will be described. The following description also serves as a description of the image processing method according to the present embodiment.

本実施の形態に係る画像処理装置10では、減算器11によって、入力画像データx(i,j)からフィルタ部14の出力データが減算される。減算器11の出力データは、量子化器12によって量子化され、量子化器12の出力データが、出力画像データy(i,j)として、画像処理装置10より出力される。また、減算器13によって、量子化器12の出力データから減算器11の出力データが減算されて、量子化誤差e(i,j)が生成される。減算器13の出力データである量子化誤差e(i,j)は、フィルタ部14に入力されて、重み係数選択部15によって選択されたフィルタ係数(重み係数)に応じたフィルタリング処理が施される。フィルタ部14の出力データは、減算器11に入力される。重み係数選択部15は、入力画像データx(i,j)の階調値に応じて、誤差拡散用の重み係数に対応するフィルタ部14におけるフィルタ係数を選択し、フィルタ部14に設定する。   In the image processing apparatus 10 according to the present embodiment, the subtracter 11 subtracts the output data of the filter unit 14 from the input image data x (i, j). The output data of the subtractor 11 is quantized by the quantizer 12, and the output data of the quantizer 12 is output from the image processing apparatus 10 as output image data y (i, j). Further, the subtracter 13 subtracts the output data of the subtracter 11 from the output data of the quantizer 12 to generate a quantization error e (i, j). The quantization error e (i, j) that is output data of the subtractor 13 is input to the filter unit 14 and subjected to a filtering process according to the filter coefficient (weight coefficient) selected by the weight coefficient selection unit 15. The The output data of the filter unit 14 is input to the subtractor 11. The weight coefficient selection unit 15 selects a filter coefficient in the filter unit 14 corresponding to the weight coefficient for error diffusion according to the gradation value of the input image data x (i, j), and sets it in the filter unit 14.

このような動作により、画像処理装置10は、入力画像データx(i,j)を、1つの閾値に基づいて量子化して、2つの量子化レベルのいずれかを有する出力画像データy(i,j)に変換すると共に、この量子化によって発生する量子化誤差e(i,j)に、重み係数選択部15によって選択された重み係数を乗じて、注目画素の近傍における未量子化画素の入力画像データx(i,j)に対して拡散する誤差拡散処理を行う。   With such an operation, the image processing apparatus 10 quantizes the input image data x (i, j) based on one threshold value, and outputs image data y (i, j, having one of two quantization levels. j), and the quantization error e (i, j) generated by this quantization is multiplied by the weighting factor selected by the weighting factor selection unit 15 to input an unquantized pixel in the vicinity of the target pixel. An error diffusion process for diffusing the image data x (i, j) is performed.

本実施の形態に係る画像処理方法および装置では、注目画素の入力画像データx(i,j)の階調値が、中間調領域である第1の範囲(12<x(i,j)<243)内に含まれるときには、フィルタ部14によって実現されるフィルタを、量子化誤差の高周波域に対する特性の部分が空間的にほぼ対称なフィルタAとし、注目画素の入力画像データx(i,j)の階調値が、ハイライト領域まはたシャドー領域である第2の範囲(x(i,j)≦5,x(i,j)≧250)内に含まれるときには、フィルタ部14によって実現されるフィルタを、量子化誤差の低周波域に対する特性の部分が空間的にほぼ対称なフィルタBとし、注目画素の入力画像データx(i,j)の階調値が、第1の範囲と第2の範囲との間の範囲(6≦x(i,j)≦12または243≦x(i,j)≦249)内に含まれるときには、フィルタ部14によって実現されるフィルタを、フィルタAのフィルタ係数とフィルタBのフィルタ係数とに基づいて、各フィルタ係数毎に直線補間して得られるフィルタ係数からなるフィルタとする。これにより、本実施の形態によれば、ハイライト領域およびシャドー領域においてドットが均一に分散されると共に、中間調領域においてもドットが均一に分散される。従って、本実施の形態によれば、誤差拡散処理を行って、画像データの少階調化を行いながら、画品質の劣化を防止でき、ほとんど“ワーム”模様のない高品質の画像を得ることができる。   In the image processing method and apparatus according to the present embodiment, the gradation value of the input image data x (i, j) of the target pixel has a first range (12 <x (i, j) < 243), the filter realized by the filter unit 14 is a filter A in which the characteristic portion of the quantization error with respect to the high frequency region is spatially symmetric, and the input image data x (i, j of the pixel of interest ) Is included in the second range (x (i, j) ≦ 5, x (i, j) ≧ 250) which is a highlight region or a shadow region, the filter unit 14 The realized filter is a filter B whose characteristic of the quantization error with respect to the low frequency region is spatially symmetric, and the gradation value of the input image data x (i, j) of the target pixel is in the first range. And the second range (6 ≦ x (i, j ≦ 12 or 243 ≦ x (i, j) ≦ 249), the filter realized by the filter unit 14 is determined for each filter coefficient based on the filter coefficient of the filter A and the filter coefficient of the filter B. And a filter composed of filter coefficients obtained by linear interpolation. As a result, according to the present embodiment, the dots are uniformly dispersed in the highlight area and the shadow area, and the dots are also uniformly dispersed in the halftone area. Therefore, according to the present embodiment, it is possible to prevent image quality deterioration while performing error diffusion processing to reduce the gradation of image data, and to obtain a high-quality image having almost no “worm” pattern. Can do.

また、本実施の形態によれば、第1の範囲と第2の範囲との間の範囲では、注目画素の入力画像データx(i,j)の階調値に応じて、フィルタ部14によって実現されるフィルタを、フィルタAからフィルタBの間で段階的に切り換えるようにしたので、フィルタの周波数特性が滑らかに変化し、フィルタの周波数特性が不連続的に切り換えられることによる画質劣化もなく、滑らかな階調性を持つ出力画像データを得ることができる。   Further, according to the present embodiment, in the range between the first range and the second range, by the filter unit 14 according to the gradation value of the input image data x (i, j) of the target pixel. Since the realized filter is switched step by step between the filter A and the filter B, the frequency characteristics of the filter change smoothly, and there is no image quality deterioration due to the frequency characteristics of the filter being switched discontinuously. Thus, output image data having smooth gradation can be obtained.

図7は、垂直方向のランプ画像を、本実施の形態に係る画像処理装置10によって誤差拡散処理して得られた画像のうちのハイライト部分を示したものである。図7と図12を比較すると、本実施の形態によれば、ドットが均一に分散され、“ワーム”模様がほとんど発生していない出力画像が得られることが分かる。 FIG. 7 shows a highlight portion of an image obtained by performing error diffusion processing on the vertical lamp image by the image processing apparatus 10 according to the present embodiment. Comparing FIG. 7 and FIG. 12, it can be seen that according to the present embodiment, an output image in which dots are uniformly dispersed and an “worm” pattern is hardly generated can be obtained.

また、本実施の形態に係る画像処理方法および装置は、一般的な誤差拡散処理に対して、非常に簡単な処理(重み係数選択の処理)を追加するだけで実現でき、一般的な誤差拡散処理に比べて、処理時間はほとんど増加しない。   In addition, the image processing method and apparatus according to the present embodiment can be realized by adding a very simple process (weight coefficient selection process) to a general error diffusion process. Compared with processing, processing time hardly increases.

図8は、本発明の第2の実施の形態に係る画像処理方法を実現するための画像処理装置の構成を示すブロック図である。本実施の形態は、誤差拡散法ではなく、平均誤差最小法を用いた例である。本実施の形態に係る画像処理装置60は、図1に示した第1の実施の形態に係る画像処理装置10において、フィルタ部14の代わりに、平均誤差最小法用のフィルタ部64を設け、重み係数選択部15の代わりに、フィルタ部64におけるフィルタ係数を選択し、フィルタ部64に設定する重み係数選択部65を設けたものである。本実施の形態におけるフィルタ部64は、注目画素の近傍における量子化済の複数の画素における量子化誤差e(i,j)を保持すると共に、これらの量子化誤差e(i,j)に対してそれぞれ所定の重み係数を乗じて平均することにより、平均誤差を算出し、この平均誤差を、注目画素の入力画像データの入力時に出力する処理を行う。このような処理は、注目画素について発生した量子化誤差を、注目画素の近傍における未量子化画素の入力画像データに対して拡散することと同等である。フィルタ部64は、例えばディジタルフィルタによって実現することができる。   FIG. 8 is a block diagram showing a configuration of an image processing apparatus for realizing an image processing method according to the second embodiment of the present invention. The present embodiment is an example in which the average error minimum method is used instead of the error diffusion method. In the image processing apparatus 60 according to the present embodiment, the image processing apparatus 10 according to the first embodiment shown in FIG. 1 is provided with a filter unit 64 for the minimum average error method instead of the filter unit 14. Instead of the weighting factor selecting unit 15, a filtering factor in the filtering unit 64 is selected and a weighting factor selecting unit 65 for setting in the filtering unit 64 is provided. The filter unit 64 in the present embodiment holds the quantization error e (i, j) in a plurality of quantized pixels in the vicinity of the target pixel, and against these quantization errors e (i, j). Then, the average error is calculated by multiplying each by a predetermined weight coefficient, and the average error is output when the input image data of the target pixel is input. Such processing is equivalent to diffusing the quantization error generated for the target pixel with respect to the input image data of the unquantized pixel in the vicinity of the target pixel. The filter unit 64 can be realized by a digital filter, for example.

本実施の形態におけるその他の構成、作用および効果は、第1の実施の形態と同様である。   Other configurations, operations, and effects in the present embodiment are the same as those in the first embodiment.

図9は、本発明の第3の実施の形態に係る画像処理装置の構成を示すブロック図である。本実施の形態は、第1の実施の形態に係る画像処理装置10と同様の機能を、コンピュータを用いてソフトウェア的に実現した例である。   FIG. 9 is a block diagram showing a configuration of an image processing apparatus according to the third embodiment of the present invention. The present embodiment is an example in which functions similar to those of the image processing apparatus 10 according to the first embodiment are realized by software using a computer.

本実施の形態に係る画像処理装置は、コンピュータを用いたものであり、互いにバス30を介して接続されたCPU(中央処理装置)31、ROM32およびRAM(ランダム・アクセス・メモリ)33を備えている。画像処理装置は、更に、インタフェース41〜46を介してバス30に接続されたハードディスクドライブ51、CD(コンパクトディスク)−ROMドライブ52、フロッピィディスクドライブ53、キーボード54、マウス55およびCRT(陰極線管)56を備えている。画像処理装置は、更に、バス30に画像入力装置57を接続するためのインタフェース47と、バス30に画像出力装置58を接続するためのインタフェース48とを備えている。   The image processing apparatus according to the present embodiment uses a computer, and includes a CPU (Central Processing Unit) 31, a ROM 32, and a RAM (Random Access Memory) 33 that are connected to each other via a bus 30. Yes. The image processing apparatus further includes a hard disk drive 51, a CD (compact disk) -ROM drive 52, a floppy disk drive 53, a keyboard 54, a mouse 55, and a CRT (cathode ray tube) connected to the bus 30 via interfaces 41 to 46. 56. The image processing apparatus further includes an interface 47 for connecting the image input device 57 to the bus 30 and an interface 48 for connecting the image output device 58 to the bus 30.

画像入力装置57としては、イメージスキャナ、ディジタルカメラ、ビデオカメラ等がある。画像出力装置58としては、プリンタ、液晶ディスプレイ等がある。   Examples of the image input device 57 include an image scanner, a digital camera, and a video camera. Examples of the image output device 58 include a printer and a liquid crystal display.

本実施の形態に係る画像処理装置では、CPU31が、RAM33を作業領域として、ハードディスクドライブ51内のハードディスク、CD−ROMドライブ52によって駆動されるCD−ROMまたはフロッピィディスクドライブ53によって駆動されるフロピィディスクに格納されたアプリケーションプログラムを実行することによって、図1における画像処理装置10の機能を実現するようになっている。   In the image processing apparatus according to the present embodiment, the CPU 31 uses the RAM 33 as a work area, the hard disk in the hard disk drive 51, the CD-ROM driven by the CD-ROM drive 52, or the floppy disk driven by the floppy disk drive 53. The functions of the image processing apparatus 10 in FIG. 1 are realized by executing an application program stored on the disk.

本実施の形態に係る画像処理装置は、上述のようにして実現される機能により、画像入力装置57によって入力された画像データあるいは画像処理装置(コンピュータ)で作成した画像データに対して、第1の実施の形態と同様の処理を行って、少階調化された出力画像データを画像出力装置58に対して出力する。   The image processing apparatus according to the present embodiment performs the first operation on the image data input by the image input apparatus 57 or the image data created by the image processing apparatus (computer) by the function realized as described above. The same processing as in the embodiment is performed, and the output image data with reduced gradation is output to the image output device 58.

本実施の形態におけるその他の作用および効果は第1の実施の形態と同様である。   Other operations and effects in the present embodiment are the same as those in the first embodiment.

なお、第2の実施の形態に係る画像処理装置60と同様の機能を、第3の実施の形態と同様に、コンピュータを用いてソフトウェア的に実現してもよい。   Note that the same functions as those of the image processing apparatus 60 according to the second embodiment may be realized by software using a computer, as in the third embodiment.

なお、本発明は、上記各実施の形態に限定されず、例えば、実施の形態で挙げた量子化レベル、量子化レベル数や、フィルタの特性等は一例であり、本発明を適用する形態に応じて適宜に設定することができる。   Note that the present invention is not limited to the above-described embodiments. For example, the quantization level, the number of quantization levels, filter characteristics, and the like given in the embodiments are examples, and the present invention is applied to the embodiments. It can be set as appropriate.

また、実施の形態では、注目画素の入力画像データの階調値が、第1の範囲と第2の範囲との間の範囲内に含まれるときに、フィルタ部14によって実現されるフィルタのフィルタ係数を、フィルタAのフィルタ係数とフィルタBのフィルタ係数とに基づいて、各フィルタ係数毎に直線補間して求めるようにしたが、フィルタ部14を、フィルタ係数が入力画像データの階調値の関数となった適応フィルタとすることによって、入力画像データの階調値に応じてフィルタ係数を切り換えるようにしてもよい。   In the embodiment, the filter of the filter realized by the filter unit 14 when the gradation value of the input image data of the target pixel is included in the range between the first range and the second range. The coefficients are obtained by linear interpolation for each filter coefficient based on the filter coefficient of the filter A and the filter coefficient of the filter B. However, the filter unit 14 has the filter coefficient of the gradation value of the input image data. By using an adaptive filter as a function, the filter coefficient may be switched according to the gradation value of the input image data.

また、実施の形態では、入力画像データを、1つの閾値に基づいて量子化して、2階調の出力画像データに変換する例を挙げたが、本発明は、入力画像データを、2つ以上の閾値に基づいて量子化して、3階調以上の階調の出力画像データに変換する場合にも適用することができる。   In the embodiment, the input image data is quantized based on one threshold value and converted into output image data of two gradations. However, the present invention provides two or more input image data. The present invention can also be applied to the case where the output image data is quantized based on the threshold value and converted to output image data having three or more gradations.

また、本発明は、インクジェットプリンタ、溶融熱転写方式やサーモ・オートクローム方式のプリンタ、階調表現の低いディスプレイ装置等に画像データを出力するために画像データを少階調化する場合に有効であるが、それ以外にも、画像処理や画像データの蓄積の負担を軽減するために画像データを少階調化する場合等にも有効である。   In addition, the present invention is effective for reducing the gradation of image data in order to output the image data to an inkjet printer, a fusion thermal transfer method or a thermo-autochrome printer, a display device with low gradation expression, and the like. However, it is also effective when reducing the gradation of image data in order to reduce the burden of image processing and image data storage.

本発明の第1の実施の形態に係る画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment of the present invention. 図1における重み係数選択部で選択するフィルタAの周波数特性を等高線で表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter A selected by the weighting coefficient selection part in FIG. 1 with the contour line. 図1における重み係数選択部で選択するフィルタBの周波数特性を等高線で表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter B selected by the weighting coefficient selection part in FIG. 1 with the contour line. フィルタAとフィルタBに基づいて直線補間して得られるフィルタの周波数特性を等高線で表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter obtained by linear interpolation based on the filter A and the filter B with the contour line. フィルタAとフィルタBに基づいて直線補間して得られるフィルタの周波数特性を等高線で表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter obtained by linear interpolation based on the filter A and the filter B with the contour line. フィルタAとフィルタBに基づいて直線補間して得られるフィルタの周波数特性を等高線で表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter obtained by linear interpolation based on the filter A and the filter B with the contour line. 本発明の第1の実施の形態に係る画像処理装置によって誤差拡散処理を行って得られた画像を示す説明図である。It is explanatory drawing which shows the image obtained by performing an error diffusion process with the image processing apparatus which concerns on the 1st Embodiment of this invention. 本発明の第2の実施の形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施の形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on the 3rd Embodiment of this invention. 一般的な誤差拡散処理を実現するための画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus for implement | achieving a general error diffusion process. 図10に示した画像処理装置で使用するフィルタの周波数特性の一例を示す特性図である。It is a characteristic view which shows an example of the frequency characteristic of the filter used with the image processing apparatus shown in FIG. 図10に示した画像処理装置によって誤差拡散処理を行って得られた画像を示す説明図である。It is explanatory drawing which shows the image obtained by performing an error diffusion process with the image processing apparatus shown in FIG. 図11に示したフィルタの周波数特性を等高線を用いて表現した説明図である。It is explanatory drawing which expressed the frequency characteristic of the filter shown in FIG. 11 using the contour line.

符号の説明Explanation of symbols

10…画像処理装置、11,13…減算器、12…量子化器、14…フィルタ部、15…重み係数選択部。   DESCRIPTION OF SYMBOLS 10 ... Image processing apparatus, 11, 13 ... Subtractor, 12 ... Quantizer, 14 ... Filter part, 15 ... Weight coefficient selection part.

Claims (2)

入力画像データを、画素毎に量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データに変換する量子化手順と、
注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数を選択する重み係数選択手順と、
注目画素について前記量子化手順における量子化によって発生する量子化誤差に、前記重み係数選択手順によって選択された重み係数を乗じて、前記注目画素の近傍における未量子化画素の入力画像データに対して拡散する誤差拡散手順と
を備え
前記重み係数選択手順では、
注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数を選択し、
注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、前記第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、
注目画素の入力画像データの階調値が、前記第1の範囲と前記第2の範囲との間の範囲内に含まれるときには、前記第1の重み係数と前記第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択する
画像処理方法。
A quantization procedure for quantizing the input image data pixel by pixel and converting it to output image data having one of two or more quantization levels;
A weighting factor selection procedure for selecting a weighting factor for error diffusion according to the gradation value of the input image data of the target pixel;
For the pixel of interest, the quantization error generated by the quantization in the quantization procedure is multiplied by the weighting factor selected by the weighting factor selection procedure, and the input image data of the unquantized pixel in the vicinity of the pixel of interest An error diffusion procedure for diffusing , and
In the weighting factor selection procedure,
When the gradation value of the input image data of the target pixel is included in the first range including the minimum value and the maximum value in the gradation value range of the input image data, the plurality of elements And select the first weighting factor
When the gradation value of the input image data of the target pixel is included in a predetermined second range including the minimum value or the maximum value in the gradation value range of the input image data, the first weighting factor Selecting a second weighting factor composed of a plurality of elements including an element different from the element;
When the gradation value of the input image data of the target pixel is included in a range between the first range and the second range, it is based on the first weighting factor and the second weighting factor. An image processing method for selecting a weighting factor having an element obtained by linear interpolation for each element .
入力画像データを、画素毎に量子化して、2つ以上の量子化レベルのいずれかを有する出力画像データに変換する量子化手段と、
注目画素の入力画像データの階調値に応じて、誤差拡散用の重み係数を選択する重み係数選択手段と、
注目画素について前記量子化手段における量子化によって発生する量子化誤差に、前記重み係数選択手段によって選択された重み係数を乗じて、前記注目画素の近傍における未量子化画素の入力画像データに対して拡散する誤差拡散手段と
を備え
前記重み係数選択手段は、
注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値および最大値から最も離れた値を含む第1の範囲内に含まれるときには、複数の要素からなる第1の重み係数を選択し、
注目画素の入力画像データの階調値が、入力画像データの階調値の範囲のうちの最小値または最大値を含む所定の第2の範囲内に含まれるときには、前記第1の重み係数における要素とは異なる要素を含む複数の要素からなる第2の重み係数を選択し、
注目画素の入力画像データの階調値が、前記第1の範囲と前記第2の範囲との間の範囲内に含まれるときには、前記第1の重み係数と前記第2の重み係数とに基づいて、各要素毎に直線補間して得られる要素を持つ重み係数を選択する
画像処理装置。
Quantization means for quantizing input image data for each pixel and converting the output image data into output image data having any one of two or more quantization levels;
A weighting factor selecting means for selecting a weighting factor for error diffusion according to the gradation value of the input image data of the target pixel;
With respect to the input image data of the unquantized pixel in the vicinity of the target pixel by multiplying the quantization error generated by the quantization in the quantization unit with respect to the target pixel by the weighting factor selected by the weighting factor selection unit. An error diffusion means for diffusing , and
The weight coefficient selection means includes
When the gradation value of the input image data of the target pixel is included in the first range including the minimum value and the maximum value in the gradation value range of the input image data, the plurality of elements And select the first weighting factor
When the gradation value of the input image data of the target pixel is included in a predetermined second range including the minimum value or the maximum value in the gradation value range of the input image data, the first weighting factor Selecting a second weighting factor composed of a plurality of elements including an element different from the element;
When the gradation value of the input image data of the target pixel is included in a range between the first range and the second range, it is based on the first weighting factor and the second weighting factor. An image processing apparatus that selects a weighting factor having an element obtained by linear interpolation for each element .
JP2007081837A 2007-03-27 2007-03-27 Image processing method and image processing apparatus Expired - Fee Related JP4293255B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007081837A JP4293255B2 (en) 2007-03-27 2007-03-27 Image processing method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007081837A JP4293255B2 (en) 2007-03-27 2007-03-27 Image processing method and image processing apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP04221598A Division JP3959698B2 (en) 1998-02-24 1998-02-24 Image processing method and apparatus

Publications (2)

Publication Number Publication Date
JP2007181250A JP2007181250A (en) 2007-07-12
JP4293255B2 true JP4293255B2 (en) 2009-07-08

Family

ID=38305840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007081837A Expired - Fee Related JP4293255B2 (en) 2007-03-27 2007-03-27 Image processing method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4293255B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109887023B (en) * 2019-01-11 2020-12-29 杭州电子科技大学 Binocular fusion stereo image quality evaluation method based on weighted gradient amplitude
CN110689500B (en) * 2019-09-29 2022-05-24 北京达佳互联信息技术有限公司 Face image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
JP2007181250A (en) 2007-07-12

Similar Documents

Publication Publication Date Title
JP3959698B2 (en) Image processing method and apparatus
JP3921678B2 (en) Image processing method and apparatus
JPH0696198A (en) Conversion of nonquantized resolution of bit map image utilizing error diffusion
JP3912633B2 (en) Image processing method and apparatus
JP5534787B2 (en) Image processing apparatus and image processing method
JPH0865517A (en) Improving method for correcting tone due to predistortion of picture data in binary printer and device therefor
JP4293255B2 (en) Image processing method and image processing apparatus
JP2009081848A (en) Image processing device, image processing method, and program
US20060215186A1 (en) Method and system for scaling with dot gain control
JPH04286465A (en) Picture processor
US6697169B1 (en) Enhanced error diffusion using a correlated chromatic noise pattern
JP3821327B2 (en) Image processing method and apparatus
JP5312158B2 (en) Image processing apparatus and image processing method
JP3917634B2 (en) How to create a mesh screen
JP2004048194A (en) Image processor and method thereof
JP4238660B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005191959A (en) Apparatus, method, and program for image processing
JP2006303999A (en) Image processing method, image processor, and image processing system
JP4222151B2 (en) Image processing apparatus, image processing method, and image processing program
JP4965378B2 (en) Image forming method and image forming system
JP4158652B2 (en) Image processing apparatus, image processing method, and image processing program
JP2848568B2 (en) Image processing device
JP4222187B2 (en) Image processing apparatus, image processing method, and image processing program
JP4151520B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005064769A (en) Image processing apparatus, image processing method, and image processing program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090203

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090317

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090330

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120417

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees