JP2000050067A - Image processing method and device therefor - Google Patents

Image processing method and device therefor

Info

Publication number
JP2000050067A
JP2000050067A JP10212344A JP21234498A JP2000050067A JP 2000050067 A JP2000050067 A JP 2000050067A JP 10212344 A JP10212344 A JP 10212344A JP 21234498 A JP21234498 A JP 21234498A JP 2000050067 A JP2000050067 A JP 2000050067A
Authority
JP
Japan
Prior art keywords
average value
value
image
pixel
image data
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
JP10212344A
Other languages
Japanese (ja)
Inventor
Teruhiko Matsuoka
輝彦 松岡
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP10212344A priority Critical patent/JP2000050067A/en
Publication of JP2000050067A publication Critical patent/JP2000050067A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an image processing method and an image processor capable of obtaining the output images of high quality for the source images of various conditions. SOLUTION: In this image processing method, by executing an error propagation processing (3) to inputted M gradation image data, they are converted to N (M>N) gradation image data. Then, a first average value which is the average value of the pixel under consideration and the adjacent pixels of the converted image data converted from M gradation to N gradation by the error propagation processing is calculated (4) and a second average value which is the average value of input image data corresponding to the pixel under consideration and the adjacent pixels is calculated (5). The first and second average values are compared (6) and the final value of the pixel under consideration is decided corresponding to the compared result.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、入力されたM階調
画像を処理し、N(N>M)階調画像に変換する画像処
理方法、及び装置に関するものであり、詳しくは、誤差
拡散処理を施して行う画像処理方法、及び装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method and apparatus for processing an input M gradation image and converting it into an N (N> M) gradation image. The present invention relates to an image processing method and apparatus for performing processing.

【0002】[0002]

【従来の技術】一般に、ディジタル複写機、ディジタル
プリンタ、ディジタルファクシミリなどにおいて、濃淡
部分を含む画像、すなわち多階調画像に対してディジタ
ル処理を行う場合、画像劣化を起こさないこと、メモリ
の使用量を極力少なくすることが重要な課題となってい
る。そのため、従来より、多階調画像を量子化すること
によって、階調数を減らすことが有効な方法であると考
えられている。このうち、多階調画像を疑似的な中間調
で出力する疑似中間調表現処理法として、例えば誤差拡
散法がある。
2. Description of the Related Art Generally, in digital copying machines, digital printers, digital facsimile machines, etc., when digital processing is performed on an image including a shaded portion, that is, a multi-tone image, image degradation does not occur and the amount of memory used. Has been an important issue. Therefore, conventionally, it has been considered that an effective method is to reduce the number of gradations by quantizing a multi-gradation image. Among these methods, there is, for example, an error diffusion method as a pseudo halftone expression processing method for outputting a multi-tone image in a pseudo halftone.

【0003】誤差拡散法は、注目画素に、既に多値化
(二値化)した周辺画素の多値化(二値化)誤差に重み
係数を乗じた値を加えてから、固定閾値で多値化(二値
化)し、この時発生した多値化(二値化)誤差を周辺画
素に分配する方法である。すなわち、画素単位に対応す
る出力レベルは、所定の多値(二値)であるが、連続階
調を有する入力原稿画像(多値の画像データ)の局所領
域に対応する出力画像の局所領域に関する誤差の総和を
消去、または最小にし、階調性の補償を行う方法であ
る。このため、入力画素信号の階調数に比べて少ない階
調数で入力された画像の表現が可能となる。
In the error diffusion method, a value obtained by multiplying a multi-level (binarization) error of a multi-level (binarization) of a peripheral pixel, which has already been multi-level (binarization), by a weighting coefficient is added to a target pixel, and then multiplied by a fixed threshold value. This is a method of binarizing (binarizing) and distributing a multi-level (binarizing) error generated at this time to peripheral pixels. That is, the output level corresponding to the pixel unit is a predetermined multi-level (binary), but relates to the local area of the output image corresponding to the local area of the input original image (multi-level image data) having continuous gradation. This is a method of eliminating or minimizing the sum of errors to compensate for gradation. For this reason, it is possible to express an image input with a smaller number of gradations than the number of gradations of the input pixel signal.

【0004】しかし、この誤差拡散法は、出力画像に、
特有のパターンが生じたり、粒状のノイズが目立つとい
う欠点を有する。また、誤差拡散法は、誤差を拡散させ
るための拡散マトリクスのサイズにより以下の欠点を有
する。すなわち、主走査方向が右側、副走査方向が下側
であるとき、拡散マトリクスサイズが大きい場合には、
エッジ部の右側及び下側の白抜けが目立ち、拡散マトリ
クスサイズが小さい場合には、中間調部のパターンが目
立つという不都合が発生する。したがって、誤差拡散処
理では、上記のような不都合に起因する画質の劣化が生
じるという問題が生じる。さらに、固定の閾値による多
値化を行う誤差拡散処理においては、多値化信号の各レ
ベルに対応する実質的な階調特性、階調数の変動に対し
マクロな階調特性は変化が少ないにしても、解像性の低
下やテクスチャの目立ち易さの増加などが生じ画質の劣
化を十分に抑制できない。
However, this error diffusion method uses
It has the drawback that a peculiar pattern is generated and granular noise is conspicuous. The error diffusion method has the following disadvantages depending on the size of a diffusion matrix for diffusing an error. That is, when the main scanning direction is on the right side and the sub-scanning direction is on the lower side, and when the diffusion matrix size is large,
When the white area on the right side and the lower side of the edge part is conspicuous, and the diffusion matrix size is small, there is a problem that the pattern of the halftone part is conspicuous. Therefore, in the error diffusion process, there is a problem that the image quality is deteriorated due to the above-described inconvenience. Further, in the error diffusion processing for performing multi-level conversion using a fixed threshold, substantial gray-scale characteristics corresponding to each level of the multi-level signal and a macro gray-scale characteristic with little change with respect to a change in the number of gray levels are small. In this case, however, a decrease in resolution and an increase in the degree of conspicuousness of the texture occur, so that deterioration in image quality cannot be sufficiently suppressed.

【0005】そこで、特開昭63−164570号公報
には、画像のエッジ成分を検出し、検出されたエッジ成
分の大小に応じて誤差拡散法の拡散マトリクスサイズを
可変とする画像処理方法が開示されている。この画像処
理方法では、エッジ成分が大きいときには拡散マトリク
スを小さくし、エッジ成分が小さいときには拡散マトリ
クスを大きくすることにより、大きい拡散マトリクスサ
イズを用いた場合のエッジ部の白抜けを防止し、小さい
拡散マトリクスサイズを用いた場合の中間調部を良好に
再現することができるようになっている。これにより、
文字、写真、網点等の画像の種類によって異なるエッジ
成分を有する場合、それぞれの画像のエッジ成分の大き
さに適した拡散マトリクスサイズに変更することで、出
力画像の品位を向上させている。
Therefore, Japanese Patent Application Laid-Open No. 63-164570 discloses an image processing method in which an edge component of an image is detected and a diffusion matrix size of an error diffusion method is made variable in accordance with the size of the detected edge component. Have been. According to this image processing method, when the edge component is large, the diffusion matrix is made small, and when the edge component is small, the diffusion matrix is made large. The halftone portion in the case of using the matrix size can be reproduced well. This allows
When an image has different edge components depending on the type of image such as a character, a photograph, and a halftone dot, the quality of the output image is improved by changing the diffusion matrix size suitable for the size of the edge component of each image.

【0006】[0006]

【発明が解決しようとする課題】ところが、濃淡部分を
含む画像を、誤差拡散法にて中間調で再現する場合、多
くの処理パラメータを設定する必要がある。しかも、原
画像から疑似的な中間調を表現して、高品位な出力画像
を得るには、上記の各処理パラメータの設定値を画像の
特徴に応じて変更する必要もある。
However, when an image including a shaded portion is reproduced in a half tone by the error diffusion method, it is necessary to set many processing parameters. In addition, in order to obtain a high-quality output image by expressing a pseudo halftone from the original image, it is necessary to change the set values of the above processing parameters in accordance with the characteristics of the image.

【0007】従って、上記公報のように、画像のエッジ
成分を考慮するだけでは、画像を高品位に出力すること
は困難であり、原画像の種類に応じたその他のパラメー
タの設定も必要となる。例えば、画像全体を同一パラメ
ータによって処理した場合、写真部、文字部などの異な
る特徴の画像領域が混在する原画像では、出力画像の中
で原画像が適正に再現される部分とそうでない部分とが
生じる。また、網点の原画像においては、濃度によって
最適な出力画像が得られるパラメータが異なり、さら
に、変倍処理が施される場合には、出力される画像の種
類に拘わらず、最適な出力画像が得られるパラメータが
変化する。このため、例えば、変倍処理される原画像に
対して誤差拡散法のような疑似中間調表現処理を行った
場合、変倍処理のアルゴリズムによっては、特に線画に
おいてジャギーが目立ち、出力画像の品位を低下させる
という問題が生じる。このように、誤差拡散法にて中間
調を再現する場合には、原画像の特徴や、変倍処理の条
件によって最適な出力画像を得るためのパラメータが異
なるので、種々の条件の原画像に対して同一パラメータ
による単一の処理を行っても、適正な出力画像を得るこ
とは困難であった。
Therefore, as described in the above publication, it is difficult to output an image with high quality only by considering the edge components of the image, and it is necessary to set other parameters according to the type of the original image. . For example, when the entire image is processed with the same parameters, in an original image in which image regions having different characteristics such as a photograph portion and a character portion are mixed, a portion where the original image is appropriately reproduced and a portion where the original image is not properly included in the output image. Occurs. Also, in the original image of the halftone dot, the parameters for obtaining the optimum output image are different depending on the density. Further, when the scaling process is performed, the optimum output image is obtained regardless of the type of the output image. Are obtained. Therefore, for example, when a pseudo halftone expression process such as an error diffusion method is performed on an original image to be scaled, depending on the algorithm of the scaling process, jaggies are conspicuous, particularly in a line drawing, and the quality of an output image is high. The problem of lowering the As described above, when reproducing the halftone by the error diffusion method, the parameters for obtaining the optimum output image differ depending on the characteristics of the original image and the conditions of the scaling process. On the other hand, it has been difficult to obtain an appropriate output image even if a single process is performed using the same parameters.

【0008】本発明は、上記の各問題点を解決するため
になされたもので、その目的は、種々の条件の原画像に
対して、高品位な出力画像が得られるような画像処理方
法、画像処理装置を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and has as its object to provide an image processing method capable of obtaining a high-quality output image with respect to an original image under various conditions. An image processing device is provided.

【0009】[0009]

【課題を解決するための手段】本発明は、前記課題を解
決するため次の構成を有する。すなわち、本願請求項1
記載の発明は、入力されたM階調画像データを誤差拡散
処理を施すことによりN(M>N)階調画像データに変
換するようにした画像処理方法であって、誤差拡散処理
によりM階調からN階調へと変換された変換画像データ
の注目画素とその近傍画素との平均値である第1の平均
値を算出すると共に、前記注目画素及び近傍画素に対応
する入力画像データの平均値である第2の平均値を算出
し、前記第1,第2の平均値を比較し、その比較結果に
応じて最終的な注目画素の値を決定するものである。
The present invention has the following arrangement to solve the above-mentioned problems. That is, claim 1 of the present application
The described invention is an image processing method for converting input M gradation image data to N (M> N) gradation image data by performing an error diffusion process, wherein the M diffusion process is performed by the error diffusion process. Calculating a first average value, which is an average value of the pixel of interest and its neighboring pixels of the converted image data converted from the tone to the N gradation, and averaging the input image data corresponding to the pixel of interest and the neighboring pixels. A second average value, which is a value, is calculated, the first and second average values are compared, and a final value of the target pixel is determined according to the comparison result.

【0010】本願請求項2記載の発明は、近傍画素は、
注目画素から斜め方向に位置する画素数よりも縦方向も
しくは横方向に位置する画素数の方が多くなるように選
択することを特徴とするものである。本願請求項3記載
の発明は、近傍画素の平均値を求める際に、注目画素の
値は、特定の階調で変換された画素値と、それ以外の階
調で変換可能な値とを用いてそれぞれの平均値を求める
ものである。本願請求項4記載の発明は、平均値を比較
した結果、一番差の少ない平均値に用いた注目画素値を
出力値として決定するものである。
According to the invention described in claim 2 of the present application, the neighboring pixels are
The selection is made such that the number of pixels located in the vertical direction or the horizontal direction is larger than the number of pixels located in the oblique direction from the target pixel. In the invention according to claim 3 of the present application, when calculating the average value of the neighboring pixels, the value of the target pixel uses a pixel value converted at a specific gradation and a value convertible at other gradations. The average value of each is calculated. The invention described in claim 4 of the present application determines the pixel value of interest used as the average value having the smallest difference as an output value as a result of comparing the average values.

【0011】本願請求項5記載の発明は、入力されたM
階調画像データをN(N<M)階調画像データに変換
し、その階調変換した画像データに誤差拡散処理を施す
ようにした画像処理装置であって、原画像データを入力
する画像入力手段と、入力された入力画像データを記憶
する画像記憶手段と、画像記憶手段から画素値を読み出
して誤差拡散処理を行う誤差拡散処理手段と、誤差拡散
処理された変換画像データの注目画素及びその近傍画素
の平均値を算出する第1の平均値算出手段と、画像記憶
手段から読み出して第1の平均値算出手段により算出さ
れる注目画素及び近傍画素の平均値を算出する第2の平
均値算出手段と、第1の平均値算出手段により算出され
た少なくとも2つ以上の平均値と、第2の平均値算出手
段により算出された平均値とを比較する平均値比較手段
と、この平均値比較手段による比較結果に基づき必要に
応じて適宜注目画素値を変更する画素値変更手段と、最
終的に決定した変換画像を出力する画像出力手段とを備
え、入力されたM階調画像を処理し、N(N<M)階調
画像に変換する際に、誤差処理により変換された変換画
像データの注目画素を含む近傍画素の平均値と、それに
対応する入力画像データの平均値とを比較し、その結
果、一番差の少ない平均値に用いた注目画素値を最終的
な出力値として決定し、注目画素の値を変更するよう構
成したものである。
The invention according to claim 5 of the present application provides a
An image processing apparatus for converting gradation image data into N (N <M) gradation image data and performing an error diffusion process on the gradation-converted image data. Means, image storage means for storing inputted input image data, error diffusion processing means for reading out a pixel value from the image storage means and performing error diffusion processing, a target pixel of the converted image data subjected to error diffusion processing, and First average value calculating means for calculating an average value of neighboring pixels, and second average value for calculating the average value of the pixel of interest and the neighboring pixels read from the image storage means and calculated by the first average value calculating means Calculating means; average value comparing means for comparing at least two or more average values calculated by the first average value calculating means with the average value calculated by the second average value calculating means; Comparison A pixel value changing unit for appropriately changing a pixel value of interest as necessary based on a comparison result by the stage; and an image output unit for outputting a finally determined converted image. , N (N <M), the average value of the neighboring pixels including the target pixel of the converted image data converted by the error processing is compared with the average value of the input image data corresponding thereto. As a result, the target pixel value used for the average value having the smallest difference is determined as the final output value, and the value of the target pixel is changed.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施形態について
図1及び図2に基づいて説明する。図1は本発明に係る
画像処理装置の実施形態を示すブロック図である。ま
た、図2は図1の画像処理装置によって実行される画像
処理方法を示すフローチャートである。各図において、
画像入力手段1により入力された原画像の画像データ
は、図示しないシェーディング補正、入力階調補正など
の補正処理を施されて画像記憶手段に記憶された後(ス
テップ1)、誤差拡散処理手段3によって誤差拡散処理
を施される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention. FIG. 2 is a flowchart showing an image processing method executed by the image processing apparatus of FIG. In each figure,
The image data of the original image input by the image input means 1 is subjected to correction processing such as shading correction and input gradation correction (not shown) and stored in the image storage means (step 1). Performs an error diffusion process.

【0013】この誤差拡散処理は、濃淡部分を有する画
像(多階調画像)を、画像特徴を保ちつつ、疑似的な中
間調で再現する疑似中間調処理法の一種である。すなわ
ち、原画像をその階調数より少ない階調数の画像に変換
して出力するものである。従って、画素濃度をある閾値
と比較した後、その結果に応じてある値に量子化し、こ
の時に生じる差分値、すなわち量子化誤差を近傍画素に
分配(拡散)して、疑似的な中間調で再現するものであ
る。
The error diffusion process is a pseudo halftone processing method for reproducing an image having a shaded portion (multi-tone image) in a pseudo halftone while maintaining image characteristics. That is, the original image is converted into an image having a smaller number of tones than the number of tones and output. Therefore, after comparing the pixel density with a certain threshold value, the pixel density is quantized to a certain value according to the result, and the difference value generated at this time, that is, the quantization error is distributed (diffused) to the neighboring pixels, and the pseudo halftone is used. That is to reproduce.

【0014】これを図を用いてより詳しく説明すれば次
のようになる。図3に示すように、原稿の主走査方向が
x方向、副走査方向がy方向のラスタスキャンが行われ
ている場合において、注目画素Zの濃度値をg(x,
y)とし、この画素を量子化し、その際に生じる誤差
を、近傍画素であるg(x+1,y)、g(x−1,y
+1)、g(x,y+1)、g(x+1,y+1)の4
つの画素に拡散させる(ステップ2)。
This will be described in more detail with reference to the drawings as follows. As shown in FIG. 3, when a raster scan in which the main scanning direction of the document is in the x direction and the sub scanning direction is in the y direction is performed, the density value of the pixel of interest Z is represented by g (x,
y), this pixel is quantized, and the error generated at that time is represented by g (x + 1, y) and g (x−1, y), which are neighboring pixels.
+1), g (x, y + 1), g (x + 1, y + 1)
(Step 2).

【0015】例えば、上記注目画素Zの量子化値をPと
すると、誤差Eは、以下の(1)式で示される。 E=g(x,y)−P・・・・・・・・・・・(1) (1)式より、図3に示す4つの画素の濃度は、この誤
差が設定された割合(拡散係数)で分配され、以下のよ
うになる。すなわち、g(x+1,y)は、g(x+
1,y)+E×7/16に、g(x−1,y+1)は、
g(x−1,y+1)+E×3/16に、g(x,y+
1)は、g(x,y+1)+E×5/16に、g(x+
1,y+1)は、g(x+1,y+1)+E×1/16
になる。このようにして注目画素Zを走査方向に進め、
g(x+1,y)以降の画素についても同様の処理を行
う。なお、上記の拡散係数は、注目画素Zの近傍画素に
対する誤差の配分の重み付けをするための係数であり、
ここでは、Floyd&Steinbergのフィルタによる拡散係数
を用いる。
For example, assuming that the quantization value of the target pixel Z is P, the error E is expressed by the following equation (1). E = g (x, y) -P (1) From equation (1), the density of the four pixels shown in FIG. And distributed as follows: That is, g (x + 1, y) is g (x +
1, (y) + E × 7/16, g (x−1, y + 1) is
g (x−1, y + 1) + E × 3/16, g (x, y +
1) becomes g (x, y + 1) + E × 5/16 and g (x +
1, y + 1) is g (x + 1, y + 1) + E × 1/16
become. In this way, the target pixel Z is advanced in the scanning direction,
The same processing is performed for pixels after g (x + 1, y). Note that the above diffusion coefficient is a coefficient for weighting the distribution of the error to the neighboring pixels of the target pixel Z,
Here, a diffusion coefficient by a Floyd & Steinberg filter is used.

【0016】上記のように誤差拡散処理が施された後
は、第1の平均値算出手段4において量子化された注目
画素を含む近傍画素の平均値を計算する。図4に近傍画
素の選択範囲の一例を示す。図中、Zが注目画素であ
り、その周辺の斜線で塗りつぶした12個の画素が近傍
画素であり、ここでは、注目画素から斜め方向に位置す
る画素数よりも縦方向もしくは横方向に位置する画素数
の方が多くなるように選択している。すなわち、注目画
素Zから斜め方向に向かう画素が1個、縦及び横方向に
位置する画素がそれぞれ2個となっている。そして、注
目画素Zの変換後の濃度値をg’(x,y)とし、上記
近傍画素をそれぞれg’(x,y−2)、g’(x−
1,y−1)、g’(x,y−1)、g’(x+1,y
−1)、g’(x−2,y)、g’(x−1,y)、
g’(x+1,y)、g’(x+2,y)、g’(x−
1,y+1)、g’(x,y+1)、g’(x+1,y
+1)、g’(x+1,y+1)、g’(x,y+2)
とするとき、これら近傍画素の平均値P’は、以下の
(2)式で示される。
After the error diffusion process is performed as described above, the first average value calculating means 4 calculates the average value of the quantized neighboring pixels including the target pixel. FIG. 4 shows an example of the selection range of the neighboring pixels. In the figure, Z is the pixel of interest, and its surrounding 12 pixels filled with oblique lines are neighboring pixels. Here, the pixels are located more vertically or horizontally than the number of pixels located diagonally from the pixel of interest. The number of pixels is selected so as to be larger. That is, one pixel goes obliquely from the target pixel Z, and two pixels are located in the vertical and horizontal directions. Then, the converted density value of the target pixel Z is defined as g ′ (x, y), and the above neighboring pixels are defined as g ′ (x, y−2) and g ′ (x−y), respectively.
1, y-1), g '(x, y-1), g' (x + 1, y
-1), g '(x-2, y), g' (x-1, y),
g ′ (x + 1, y), g ′ (x + 2, y), g ′ (x−
1, y + 1), g '(x, y + 1), g' (x + 1, y
+1), g '(x + 1, y + 1), g' (x, y + 2)
In this case, the average value P ′ of these neighboring pixels is expressed by the following equation (2).

【0017】 P'=(g'(x ,y-2)+g'(x-1,y-1)+g'(x ,y-1) + g'(x+1,y-1)+g'(x-2,y )+g'(x-1,y ) + g'(x+1,y )+g'(x+2,y )+g'(x-1,y+1) + g'(x ,y+1)+g'(x+1,y+1)+g'(x ,y+2) + g'(x ,y )/13・・・・・・・・・・・・・・(2)P ′ = (g ′ (x, y−2) + g ′ (x−1, y−1) + g ′ (x, y−1) + g ′ (x + 1, y−1) + g ′ (x−2, y) + g ′ (x−1, y) + g ′ (x + 1, y) + g ′ (x + 2, y) + g ′ (x−1, y + 1) + g '(x, y + 1) + g' (x + 1, y + 1) + g '(x, y + 2) + g' (x, y) / 13 ...・ ・ ・ ・ ・ ・ ・ ・ (2)

【0018】(2)式により、変換画像データの平均値
が求まる。同様に、注目画素Zが疑似中間調表現処理を
施された場合に取り得る値、すなわち、N値化する誤差
拡散処理の場合には、0〜Nまでの値をそれぞれg’
(x,y)に代入し、(2)式を計算してそれぞれの値
(0〜Nの値)における平均値を求める。また、誤差拡
散処理手段3と第1の平均値算出手段4での処理が行わ
れている間に、第2の平均値算出手段5において入力画
像も平均値を計算しておく。その場合、近傍画素は第1
の平均値算出手段4で用いた原画像画素の選択範囲と同
じ選択範囲の画素を用い、(2)式と同様の計算を行
う。
The average value of the converted image data is obtained from the equation (2). Similarly, a value that can be taken when the pixel of interest Z has been subjected to the pseudo halftone expression processing, that is, in the case of error diffusion processing for converting into N-values, values from 0 to N are g ′.
Substituting into (x, y), the formula (2) is calculated, and the average value at each value (0 to N) is obtained. Further, while the processing by the error diffusion processing means 3 and the first average value calculation means 4 is being performed, the average value of the input image is also calculated by the second average value calculation means 5. In that case, the neighboring pixels are the first
Using the pixels in the same selection range as the selection range of the original image pixels used in the average value calculation means 4, the same calculation as the expression (2) is performed.

【0019】このようにして、第1の平均値算出手段4
の複数の平均値出力とそれに対応する第2の平均値算出
手段5の平均値出力が得られた時点で、平均値比較手段
6に各平均値が入力される。平均値比較手段6では、第
1の平均値算出手段4の複数の平均値出力の各々とそれ
に対応する第2の平均値算出手段5の平均値出力とを各
々比較する(ステップ3)。そして、第1の平均値算出
手段4により、0〜Nの値を用いて算出したN個の平均
値出力の中で、第2の平均値算出手段5の平均値出力に
最も近い値、すなわち、第1の平均値算出手段4の各平
均値出力値と第2の平均値算出手段の平均値出力値との
差の最も小さい値が最終的な注目画素Zの値として選択
される。このとき、誤差拡散処理手段8で変換された注
目画素の値が選択された場合には、その値を画像出力手
段8に受け渡し(ステップ5)、違う値が選択された場
合には、その値を画素値変更手段8により変更した後
(ステップ4)、画像出力手段8に受け渡し(ステップ
5)、画像出力手段8からは最終的な出力画像が出力さ
れる。なお、上記実施形態では、上記近傍画素を、注目
画素から斜め方向に位置する画素数より縦及び横方向に
位置する画素数の方が多くなるように設定しているた
め、線画に多く見られる縦横のエッジ部分が認識し易く
なり、線画におけるエッジ部の右側及び下側の白抜けが
改善可能となる。
As described above, the first average value calculating means 4
When a plurality of average value outputs and the corresponding average value output of the second average value calculation means 5 are obtained, each average value is input to the average value comparison means 6. The average value comparison means 6 compares each of the plurality of average value outputs of the first average value calculation means 4 with the corresponding average value output of the second average value calculation means 5 (step 3). Then, among the N average value outputs calculated by the first average value calculation means 4 using the values of 0 to N, the value closest to the average value output of the second average value calculation means 5, that is, The value of the smallest difference between the average value output value of the first average value calculation means 4 and the average value output value of the second average value calculation means is selected as the final value of the target pixel Z. At this time, if the value of the pixel of interest converted by the error diffusion processing means 8 is selected, the value is transferred to the image output means 8 (step 5), and if a different value is selected, the value is Is changed by the pixel value changing means 8 (step 4), and is passed to the image output means 8 (step 5), and the image output means 8 outputs a final output image. In the above embodiment, since the number of pixels located in the vertical and horizontal directions is set to be larger than the number of pixels located in the oblique direction from the pixel of interest, the neighboring pixels are often seen in line drawings. The vertical and horizontal edge portions can be easily recognized, and the white spots on the right and lower sides of the edge portion in the line drawing can be improved.

【0020】以上が、本発明の一実施例による画像処理
装置、及びこれによって実行される画像処理方法の説明
であるが、次に、上記の画像処理装置によって実行され
る画像処理方法を、より具体的な動作例を用いて説明す
る。なお、ここでは、256階調の画像に対して4値
化、すなわち、N=4となる疑似階調画像に変換する場
合について説明するが、Nの値はM>N>1の整数であ
れば、どのような値でも同様の処理が可能である。ま
た、4値はそれぞれ(0,85,170,255)とす
る。図5に、本実施例において疑似中間調処理を施す入
力画像データの一部を示す。この入力画像に対して誤差
拡散処理を施す。ここでの誤差拡散処理は、閾値を12
8の固定閾値とし、また、先程のFloyd&Steinbergのフ
ィルタによる拡散係数を用いて誤差を配分するものとす
る。この誤差拡散処理により変換画像を求めると、図6
に示すようになる。
The above is the description of the image processing apparatus according to one embodiment of the present invention and the image processing method executed by the image processing apparatus. Next, the image processing method executed by the image processing apparatus will be described in more detail. This will be described using a specific operation example. Here, a case will be described in which a 256-gradation image is quaternized, that is, converted into a pseudo-gradation image in which N = 4. However, the value of N is an integer of M>N> 1. The same processing is possible with any value. The four values are (0, 85, 170, 255). FIG. 5 shows a part of input image data to be subjected to pseudo halftone processing in the present embodiment. An error diffusion process is performed on this input image. In the error diffusion processing here, the threshold is set to 12
It is assumed that the error is distributed using a fixed threshold value of 8 and the diffusion coefficient obtained by the Floyd & Steinberg filter described above. When a converted image is obtained by this error diffusion processing, FIG.
It becomes as shown in.

【0021】ここで、平均値を求める例として、図6の
中心部分を注目画素としたときの例を説明する。誤差拡
散処理により変換された注目画素の値は、170であ
る。そして、注目画素が170のときの近傍画素の平均
値を求めると92となる。同様に、注目画素が0のとき
の近傍画素の平均値は78、注目画素が85のときの近
傍画素の平均値は85、注目画素が255のときの近傍
画素の平均値は98となる。また、入力画像の対応する
近傍画素の平均値は97となる。この結果から、97に
最も近い値は98であり、その平均値を求める際の注目
画素の値を見ると255であることから、出力画像デー
タの注目画素値は255となる。以上のことを順次全画
素に対して行うことにより、図6の変換画像データが図
7に示すような出力画像データへと補正され、単に量子
化誤差を近傍画素へと分配する通常の誤差拡散方法に比
べ原画像に近いより高品位な出力画像が得られる。
Here, as an example of obtaining the average value, an example in which the central portion in FIG. 6 is set as a target pixel will be described. The value of the pixel of interest converted by the error diffusion process is 170. The average value of the neighboring pixels when the target pixel is 170 is 92. Similarly, the average value of the neighboring pixels when the pixel of interest is 0 is 78, the average value of the neighboring pixels when the pixel of interest is 85 is 85, and the average value of the neighboring pixels when the pixel of interest is 255 is 98. The average value of the corresponding neighboring pixels of the input image is 97. From this result, the value closest to 97 is 98, and the value of the pixel of interest when calculating the average value is 255. Therefore, the pixel value of interest of the output image data is 255. By sequentially performing the above-described operations on all the pixels, the converted image data in FIG. 6 is corrected into output image data as shown in FIG. 7, and ordinary error diffusion for simply distributing the quantization error to neighboring pixels is performed. A higher quality output image closer to the original image can be obtained as compared with the method.

【0022】なお、上記実施の形態においては、近傍画
素として、図4に示すように、注目画素に対する縦、
横、及び斜め方向に合計12個の画素を選択した場合を
例にとり説明したが、近傍画素を12個以上、あるいは
未満に設定することも可能であり、この発明は特に上記
実施の形態に限定されるものではない。
Note that, in the above embodiment, as shown in FIG.
The case where a total of 12 pixels are selected in the horizontal and diagonal directions has been described as an example, but it is also possible to set the number of neighboring pixels to 12 or more or less, and the present invention is particularly limited to the above embodiment. It is not something to be done.

【0023】[0023]

【発明の効果】以上詳述したように、この発明によれば
以下のような効果がある。すなわち、請求項1記載の発
明では、入力されたM階調画像を処理市、N(N<M)
階調画像に変換する画像処理方法であって、誤差拡散処
理により変換された変化画像データの注目画素を含む近
傍画素の平均値と、それに対応する入力画像データの平
均値とを比較し、その結果に応じて最終的な注目画素の
値を決定することにより、更に入力画像との誤差の少な
い変換画像が得られ、種々の条件の原画像に対して同一
パラメータにより単一の処理を行っても適正な出力画像
を得ることが可能になる。
As described in detail above, the present invention has the following effects. That is, according to the first aspect of the invention, the input M gradation image is processed by the processing city, N (N <M).
An image processing method for converting into a gradation image, comprising comparing an average value of neighboring pixels including a pixel of interest of the changed image data converted by the error diffusion process with an average value of the input image data corresponding thereto. By determining the final value of the pixel of interest in accordance with the result, a converted image with a smaller error from the input image is obtained, and a single process is performed on the original image under various conditions using the same parameters. It is also possible to obtain an appropriate output image.

【0024】請求項2の発明では、上記近傍画素を、注
目画素から斜め方向に位置する画素数より縦及び横方向
に位置する画素数の方が多くなるように選択することに
より、線画に多く見られる縦横のエッジ部分が認識しや
すくなり、線画におけるエッジ部の右側及び下側の白抜
けが改善可能となる。請求項3の発明では、上記近傍画
素の平均値を求める際に、注目画素の値は、変換された
値と、それ以外で変換可能な値とを用いてそれぞれの平
均値を求めることにより、誤差の拡散がうまく出来なか
った部分が明らかになり、更に入力画像データとの誤差
の少ない変換画像データを得ることが可能となる。請求
項4の発明では、上記平均値の比較した結果、一番差の
少ない平均値に用いた注目画素値を最終的な出力値とし
て決定することにより、更に入力画像データとの誤差の
少ない変換画像データを得ることが可能となる。
According to the second aspect of the present invention, by selecting the neighboring pixels so that the number of pixels located in the vertical and horizontal directions is larger than the number of pixels located in the oblique direction from the pixel of interest, the number of pixels in the line drawing is increased. The visible vertical and horizontal edge portions can be easily recognized, and the white spots on the right and lower sides of the edge portion in the line drawing can be improved. According to the third aspect of the present invention, when the average value of the neighboring pixels is obtained, the value of the target pixel is obtained by using the converted value and the other convertible values to obtain the average value. The part where the error was not successfully diffused becomes clear, and it becomes possible to obtain converted image data with a small error from the input image data. According to the fourth aspect of the present invention, as a result of the comparison of the average values, the pixel value of interest used for the average value having the smallest difference is determined as the final output value. Image data can be obtained.

【0025】請求項5の発明では、入力されたM階調画
像を処理し、N(N<M)階調画像に変換する際に、誤
差拡散処理により変換された変換画像データの注目画素
を含む近傍画素の平均値と、それに対応する入力画像デ
ータの平均値とを比較し、その結果、一番差の少ない平
均値に用いた注目画素値を最終的な出力値として決定
市、注目画素値を最終的な出力値として決定し、注目画
素の値を変更するような構成からなることにより、線画
におけるエッジ部の右側及び下側の白抜けが改善され、
さらに入力画像データとの誤差の少ない変換画像データ
を得られ、種々の条件の原画像に対して同一パラメータ
による単一の処理を行っても、適正な出力画像を得るこ
とが可能となる。
According to the fifth aspect of the present invention, when the input M gradation image is processed and converted into an N (N <M) gradation image, the pixel of interest of the converted image data converted by the error diffusion processing is determined. The average value of the neighboring pixels including the target pixel is compared with the average value of the corresponding input image data. As a result, the target pixel value used for the average value having the smallest difference is determined as the final output value. By determining the value as the final output value and changing the value of the pixel of interest, white spots on the right and lower sides of the edge portion in the line drawing are improved,
Furthermore, converted image data with little error from the input image data can be obtained, and an appropriate output image can be obtained even if a single process is performed on the original image under various conditions using the same parameters.

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

【図1】本発明の実施形態における画像処理装置の構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention.

【図2】図1に示したものによる画像処理の流れを示す
フローチャートである。
FIG. 2 is a flowchart showing a flow of image processing by the one shown in FIG.

【図3】図2に示したものに誤差拡散処理の説明図であ
る。
FIG. 3 is an explanatory diagram of an error diffusion process shown in FIG.

【図4】図2に示したものによる平均値の求め方の説明
図である。
FIG. 4 is an explanatory diagram of how to calculate an average value using the one shown in FIG.

【図5】図2に示したものに用いた入力画像データの一
例である。
FIG. 5 is an example of input image data used for the one shown in FIG. 2;

【図6】図2に示したものに用いた変換画像データの一
例である。
FIG. 6 is an example of converted image data used for the one shown in FIG. 2;

【図7】図2に示したものに用いた出力画像データの一
例である。
FIG. 7 is an example of output image data used for the one shown in FIG. 2;

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

1 画像入力手段 3 誤差拡散処理手段 4 第1の平均値算出手段 5 第2の平均値算出手段 6 平均値比較手段 7 画素変更手段 8 画像出力手段 Z 注目画素 Reference Signs List 1 image input means 3 error diffusion processing means 4 first average value calculation means 5 second average value calculation means 6 average value comparison means 7 pixel changing means 8 image output means Z target pixel

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 入力されたM階調画像データを誤差拡散
処理を施すことによりN(M>N)階調画像データに変
換するようにした画像処理方法であって、 誤差拡散処理によりM階調からN階調へと変換された変
換画像データの注目画素とその近傍画素との平均値であ
る第1の平均値を算出すると共に、 前記注目画素及び近傍画素に対応する入力画像データの
平均値である第2の平均値を算出し、 前記第1,第2の平均値を比較し、その比較結果に応じ
て最終的な注目画素の値を決定することを特徴とする画
像処理方法。
1. An image processing method for converting input M gradation image data into N (M> N) gradation image data by performing an error diffusion process, wherein the M-th gradation image data is subjected to an error diffusion process. Calculating a first average value, which is an average value of the pixel of interest and its neighboring pixels of the converted image data converted from the tone to the N gradation, and averaging the input image data corresponding to the pixel of interest and the neighboring pixels An image processing method comprising: calculating a second average value as a value; comparing the first and second average values; and determining a final value of the target pixel according to the comparison result.
【請求項2】 近傍画素は、注目画素から斜め方向に位
置する画素数よりも縦方向もしくは横方向に位置する画
素数の方が多くなるように選択することを特徴とする請
求項1記載の画像処理方法。
2. The method according to claim 1, wherein the neighboring pixels are selected such that the number of pixels located in the vertical or horizontal direction is larger than the number of pixels located in the oblique direction from the target pixel. Image processing method.
【請求項3】 近傍画素の平均値を求める際に、注目画
素の値は、特定の階調で変換された画素値と、それ以外
の階調で変換可能な値とを用いてそれぞれの平均値を求
めることを特徴とする請求項1記載の画像処理方法。
3. When calculating an average value of neighboring pixels, a value of a target pixel is calculated using a pixel value converted at a specific gradation and a value convertible at other gradations. 2. The image processing method according to claim 1, wherein a value is obtained.
【請求項4】 平均値を比較した結果、最も差の少ない
平均値に用いた注目画素値を出力値として決定すること
を特徴とする請求項1記載の画像処理方法。
4. The image processing method according to claim 1, wherein as a result of comparing the average values, a pixel value of interest used as the average value having the smallest difference is determined as an output value.
【請求項5】 入力されたM階調画像データをN(N<
M)階調画像データに変換し、その階調変換した画像デ
ータに誤差拡散処理を施すようにした画像処理装置であ
って、 原画像データを入力する画像入力手段と、 入力された入力画像データを記憶する画像記憶手段と、 画像記憶手段から画素値を読み出して誤差拡散処理を行
う誤差拡散処理手段と、 誤差拡散処理された変換画像データの注目画素及びその
近傍画素の平均値を算出する第1の平均値算出手段と、 画像記憶手段から読み出して第1の平均値算出手段によ
り算出される注目画素及び近傍画素の平均値を算出する
第2の平均値算出手段と、 第1の平均値算出手段により算出された少なくとも2つ
以上の平均値と、 第2の平均値算出手段により算出された平均値とを比較
する平均値比較手段と、 この平均値比較手段による比較結果に基づき必要に応じ
て適宜注目画素値を変更する画素値変更手段と、 最終的に決定した変換画像を出力する画像出力手段とを
備え、 入力されたM階調画像を処理し、N(N<M)階調画像
に変換する際に、誤差処理により変換された変換画像デ
ータの注目画素を含む近傍画素の平均値と、 それに対応する入力画像データの平均値とを比較し、そ
の結果、最も差の少ない平均値に用いた注目画素値を最
終的な出力値として決定し、注目画素の値を変更するよ
う構成したことを特徴とする画像処理装置。
5. The method according to claim 5, wherein the input M gradation image data is N (N <N
M) An image processing apparatus that converts the image data into gradation image data and performs an error diffusion process on the gradation-converted image data, wherein: an image input unit for inputting original image data; Image diffusion means for reading a pixel value from the image storage means and performing an error diffusion process; and calculating an average value of a target pixel of the converted image data subjected to the error diffusion process and a neighboring pixel thereof. An average value calculating means, an average value calculating means for calculating an average value of a pixel of interest and a neighboring pixel which is read from the image storage means and calculated by the first average value calculating means, and a first average value. Average value comparing means for comparing at least two or more average values calculated by the calculating means with the average value calculated by the second average value calculating means, and a comparison result by the average value comparing means Pixel value changing means for appropriately changing the pixel value of interest as needed, and image output means for outputting the finally determined converted image. The input M gradation image is processed, and N (N <N M) When converting to a gradation image, the average value of neighboring pixels including the pixel of interest of the converted image data converted by the error processing is compared with the average value of the corresponding input image data. An image processing apparatus characterized in that a pixel value of interest used for an average value having a small difference is determined as a final output value, and the value of the pixel of interest is changed.
JP10212344A 1998-07-28 1998-07-28 Image processing method and device therefor Pending JP2000050067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10212344A JP2000050067A (en) 1998-07-28 1998-07-28 Image processing method and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10212344A JP2000050067A (en) 1998-07-28 1998-07-28 Image processing method and device therefor

Publications (1)

Publication Number Publication Date
JP2000050067A true JP2000050067A (en) 2000-02-18

Family

ID=16620992

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10212344A Pending JP2000050067A (en) 1998-07-28 1998-07-28 Image processing method and device therefor

Country Status (1)

Country Link
JP (1) JP2000050067A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7542173B2 (en) 2003-08-26 2009-06-02 Seiko Epson Corporation Image processing device and image processing program causing computer to execute image processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7542173B2 (en) 2003-08-26 2009-06-02 Seiko Epson Corporation Image processing device and image processing program causing computer to execute image processing

Similar Documents

Publication Publication Date Title
US5353127A (en) Method for quantization gray level pixel data with extended distribution set
US5870503A (en) Image processing apparatus using error diffusion technique
US6449061B2 (en) System and method for providing dynamic noise profile selection for hybrid and error diffusion image processing
JPH10271331A (en) Image processing method and device therefor
US5289294A (en) Image processing apparatus
US6233360B1 (en) Method and system for hybrid error diffusion processing of image information using adaptive white and black reference values
JP3700357B2 (en) Image processing device
JPH1093820A (en) Error spread system and error spread method
JPH1070659A (en) Error spread method and system
JP4068181B2 (en) Multilevel gradation pixel value level reduction method and system
US6628427B1 (en) Method and apparatus for image processing which improves performance of gray scale image transformation
JP4107108B2 (en) Image processing method and apparatus
JP2003069819A (en) Image processor and image processing method
JP2000050067A (en) Image processing method and device therefor
JP4537211B2 (en) Image processing apparatus, image processing method, program causing computer to execute the method, image forming apparatus, and computer-readable recording medium recording the program
JPH11346311A (en) Gradation reproduction method
JP2007006271A (en) Image processing apparatus for binarization process, and image processing program
JP2000270210A (en) Picture processor
JP3679522B2 (en) Image processing method and apparatus
JP2900907B2 (en) Image processing device
JPH02210960A (en) Picture processor
JP3302420B2 (en) Image processing device
JP2644491B2 (en) Image processing device
JPH09247450A (en) Image processing unit
JP3950871B2 (en) Image processing method and apparatus