JP3287717B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP3287717B2
JP3287717B2 JP01249295A JP1249295A JP3287717B2 JP 3287717 B2 JP3287717 B2 JP 3287717B2 JP 01249295 A JP01249295 A JP 01249295A JP 1249295 A JP1249295 A JP 1249295A JP 3287717 B2 JP3287717 B2 JP 3287717B2
Authority
JP
Japan
Prior art keywords
error
data
resolution
input
scanning direction
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 - Lifetime
Application number
JP01249295A
Other languages
Japanese (ja)
Other versions
JPH08204958A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP01249295A priority Critical patent/JP3287717B2/en
Publication of JPH08204958A publication Critical patent/JPH08204958A/en
Application granted granted Critical
Publication of JP3287717B2 publication Critical patent/JP3287717B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は画像処理装置に関し、特
に入力画像濃度と出力画像濃度等の差を誤差拡散法等に
より保存しつつ、入力データを2値又は多値データに量
子化処理する画像処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and, more particularly, to quantize input data into binary or multi-valued data while storing a difference between an input image density and an output image density by an error diffusion method or the like. The present invention relates to an image processing device.

【0002】[0002]

【従来の技術】従来、入力多値データを2値又は入力多
値データのレベルよりも少ないレベルの多値で表現する
疑似中間調処理として誤差拡散法が知られている。この
誤差拡散法については“An Adaptive Al
gorithm for Spatial Gray
Scale”in society for Info
rmation Display 1975 Symp
osium Digest of Technical
Papers,1975,36で発表されている。こ
の方法は、着目画素をP、その画素の濃度をv、P点の
周辺未2値化処理画素P0、P1、P2、P3の濃度を
それぞれv0、v1、v2、v3、2値化のための閾値
をTとすると、着目点Pにおける2値化誤差Eを周辺画
素P0、P1、P2、P3に経験的に求めた重み係数W
0、W1、W2、W3で重み付け処理して振り分けてマ
クロ的に出力画像の平均濃度を入力画像の濃度と等しく
する方法である。このとき、出力2値データをoとする
と、以下の式により周辺画素P0、P1、P2、P3に
対する誤差E0、E1、E2、E3を求めることができ
る。
2. Description of the Related Art Conventionally, an error diffusion method has been known as a pseudo halftone process for representing input multi-valued data by binary or multi-valued levels smaller than the level of input multi-valued data. This error diffusion method is described in "An Adaptive Al.
goritm for Spatial Gray
Scale "in society for Info
rmation Display 1975 Symp
osium Digest of Technical
Papers, 1975, 36. In this method, the pixel of interest is P, the density of the pixel is v, and the densities of the non-binarized pixels P0, P1, P2, and P3 around the point P are v0, v1, v2, v3, and binarization, respectively. Is a threshold value of T, a binarization error E at the point of interest P is weighted by a weighting coefficient W empirically obtained for peripheral pixels P0, P1, P2, and P3.
This is a method in which weighting processing is performed with 0, W1, W2, and W3, and the weighting processing is performed so that the average density of the output image is macroscopically equal to the density of the input image. At this time, assuming that the output binary data is o, errors E0, E1, E2, and E3 with respect to the peripheral pixels P0, P1, P2, and P3 can be obtained by the following equations.

【0003】[0003]

【外1】 (ただし、Vmax:最大濃度、Vmin:最小濃度) E0=E×W0; E1=E×W1; E2=E×W2; E3=E×W3; (重み係数の例:W0=7/16,W1=1/16,W
2=5/16,W3=3/16)
[Outside 1] (However, Vmax: maximum density, Vmin: minimum density) E0 = E × W0; E1 = E × W1; E2 = E × W2; E3 = E × W3; (Example of weight coefficient: W0 = 7/16, W1) = 1/16, W
2 = 5/16, W3 = 3/16)

【0004】[0004]

【発明が解決しようとする課題】この誤差拡散法により
処理されたデータを用いて画像を記録する記録装置が知
られており、又この種の記録装置において、主走査方向
の解像度を切り替えて副走査方向の解像度より高く設定
して記録するものも知られている。
A recording apparatus for recording an image using data processed by the error diffusion method is known. In this type of recording apparatus, the resolution in the main scanning direction is switched to change the sub scanning direction. There is also known a recording method in which the resolution is set higher than the resolution in the scanning direction.

【0005】ここで、主走査方向の解像度を切り替えて
記録する場合でも、主走査方向と副走査方向との解像度
が同じ場合の重み係数を用いて、誤差拡散法による2値
化処理が行なわれていた。
Here, even when the resolution is switched in the main scanning direction, the binarization process by the error diffusion method is performed by using the weighting factor when the resolution in the main scanning direction and the resolution in the sub-scanning direction are the same. I was

【0006】この場合、主/副走査方向の解像度に違い
によるテクスチャーが現れて、画質が劣化するという問
題点があった。
In this case, there is a problem that a texture appears due to a difference in resolution in the main / sub-scanning direction, and image quality is deteriorated.

【0007】これを図示したのが図5であり、(a)に
おいては主走査(左右)方向および副走査(上下)方向
の解像度はともに360dpi(dot per in
ch)であるのに対して、(b)においては同じ誤差拡
散法により主走査方向720dpi、副走査方向360
dpiの画像を処理した場合を示している。図5(b)
は図5(a)で用いた重み係数を用いて2値化処理を行
なっている。この図からわかるように、主/副走査方向
の解像度が同じ場合には、大域的にみて均等に散らばっ
ていたドットが、同じ処理により主走査方向の解像度を
2倍にした場合には横方向にドットが詰まってしまい好
ましくないテクスチャ(この例では横方向にドットがつ
ながったように見える)が現れている。これは、主走査
および副走査方向に解像度が同じ場合に、ドットが均等
に散らばるように定めた重み係数により誤差を周辺画素
に対して配分していたものを、主走査方向の解像度が副
走査方向の解像度の2倍であるような画像に対しても同
じ誤差配分係数で誤差を配分した結果によるものであ
る。
FIG. 5 illustrates this, and in FIG. 5A, the resolution in both the main scanning (left and right) direction and the sub-scanning (up and down) direction is 360 dpi (dot per in).
ch), whereas in (b), the same error diffusion method is used in the main scanning direction 720 dpi and the sub-scanning direction 360
This shows a case where a dpi image is processed. FIG. 5 (b)
Performs a binarization process using the weighting coefficients used in FIG. As can be seen from the figure, when the resolution in the main / sub-scanning direction is the same, the dots that were uniformly scattered globally are changed to the horizontal direction when the resolution in the main scanning direction is doubled by the same processing. In this example, an undesired texture (in this example, dots appear to be connected in the horizontal direction) appears. This is because, when the resolution is the same in the main scanning direction and the sub-scanning direction, the error is distributed to the peripheral pixels by the weight coefficient determined so that the dots are evenly distributed. This is due to the result of allocating errors with the same error distribution coefficient to an image whose resolution is twice as large as the direction.

【0008】本発明は以上のような従来の問題点に鑑み
てなされたものであり、主/副走査方向の解像度が異な
る場合においても高画質な画像を得ることができる画像
処理装置の提供を目的とする。
The present invention has been made in view of the above-mentioned conventional problems, and provides an image processing apparatus capable of obtaining a high-quality image even when resolutions in the main / sub-scanning directions are different. Aim.

【0009】[0009]

【課題を解決するための手段】上述した目的を達成する
ため、本発明によれば、多値画像データを入力する入力
手段と、前記多値の画像データを量子化処理する処理手
段と、前記量子化処理の際発生する誤差データに誤差配
分係数に基づき重み付けを行い、重み付けされた誤差デ
ータを複数画素の画像データに分散する分散手段と、前
記入力手段が入力する多値画像データの主走査及び副走
査方向の解像度が同じ場合と異なる場合で前記誤差配分
係数を切り替える切り替え手段とを有することを特徴と
する。
According to the present invention, there is provided, in accordance with the present invention, input means for inputting multi-valued image data, processing means for quantizing the multi-valued image data, A dispersing unit that weights error data generated at the time of quantization processing based on an error distribution coefficient, and disperses the weighted error data into image data of a plurality of pixels; and a main scan of multi-valued image data input by the input unit. And a switching unit for switching the error distribution coefficient when the resolution in the sub-scanning direction is the same or different.

【0010】又本発明によれば、多値画像データを入力
する入力手段と、前記多値画像データを量子化処理する
処理手段と、前記量子化処理の際発生する誤差データに
誤差配分係数に基づき重み付けを行い、重み付けされた
誤差データを複数画素の画像データに分散する分散手段
とを有し、前記入力手段が入力する多値画像データの主
走査及び副走査方向の解像度が異なる場合、前記分散手
段は解像度の高い走査方向に対して重みの割合が大きい
誤差配分係数を用いることを特徴とする。
Further, according to the present invention, input means for inputting multi-valued image data, processing means for quantizing the multi-valued image data, Performing weighting based on the weighted error data, and dispersing means for dispersing the weighted error data into image data of a plurality of pixels, wherein the resolution in the main scanning and sub-scanning directions of the multilevel image data input by the input means is different. The dispersing means is characterized by using an error distribution coefficient having a large weight ratio in a scanning direction having a high resolution.

【0011】上述した構成により、入力画像データの主
/副走査方向の解像度が異なる場合においても、それに
応じた誤差配分係数を用いることによりテクスチャの発
生を抑え、高画質な中間調処理画像を得ることができ
る。
With the above-described configuration, even when the resolution of the input image data in the main / sub-scanning directions is different, the generation of texture is suppressed by using an error distribution coefficient according to the difference, and a high quality halftone processed image is obtained. be able to.

【0012】[0012]

【実施例】【Example】

〔第1実施例〕以下、図面を参照して本発明の実施例を
詳細に説明する。
[First Embodiment] An embodiment of the present invention will be described below in detail with reference to the drawings.

【0013】図1は本発明の第1の実施例に係わる画像
処理装置の構成を説明するブロック図である。
FIG. 1 is a block diagram illustrating the configuration of an image processing apparatus according to a first embodiment of the present invention.

【0014】図1においては1は乗算器であり、乗算器
1は8bitの入力データに誤差を配分する際の配分係
数の分母の値(図3の配分係数の場合256)を掛け
る。2は加算器であり、乗算器1からの16ビットデー
タに既に2値化処理が終了した画素からの誤差データを
加算する。3は比較器であり、加算器2からの17ビッ
トデータと入力データ8ビットの中間レベルに相当する
「127」に配分係数の分母の値を掛けた値(「127
×256」)を比較する。比較器3からの1ビットの2
値データは不図示のインクジェツトプリンタ、レーザビ
ームプリンタに送られ、ドットのオンオフにより画像が
形成される。
In FIG. 1, reference numeral 1 denotes a multiplier. The multiplier 1 multiplies the value of the denominator of the distribution coefficient (256 in the case of the distribution coefficient of FIG. 3) when allocating the error to the 8-bit input data. Reference numeral 2 denotes an adder, which adds error data from a pixel that has already been binarized to the 16-bit data from the multiplier 1. Reference numeral 3 denotes a comparator, which is a value obtained by multiplying “127” corresponding to an intermediate level between the 17-bit data from the adder 2 and the 8-bit input data by the denominator of the distribution coefficient (“127”).
× 256 ”). 1 bit 2 from comparator 3
The value data is sent to an unillustrated inkjet printer or laser beam printer, and an image is formed by turning on and off the dots.

【0015】4は減算器で、2値化前の加算器2からの
17ビットデータと2値化後の値との差、即ち誤差デー
タを演算する。減算器4で用いられる2値化後の値は2
値化結果が1のときは「255×256」、2値化結果
が0の時は「0」である。
A subtractor 4 calculates a difference between the 17-bit data from the adder 2 before binarization and the value after binarization, that is, error data. The value after binarization used in the subtractor 4 is 2
When the binarization result is 1, it is “255 × 256”, and when the binarization result is 0, it is “0”.

【0016】5は除算器であり、減算器4からの16ビ
ットデータを配分係数の分母の値で割り算し、商8ビッ
ト(符号付き)と余り8ビットデータを出力する。
Reference numeral 5 denotes a divider, which divides the 16-bit data from the subtracter 4 by the value of the denominator of the distribution coefficient, and outputs a quotient of 8 bits (with a sign) and a remainder of 8 bits.

【0017】6、7はラッチであり、除算器5からの余
りデータを1画素づつ遅延させるものである。つまり、
ラッチ7からの余り8ビットデータは2画素後に入力さ
れる入力データと加算器2で加算される。8は誤差配分
テーブルであり、除算器5からの商データの値ごとに図
2の(a)、(b)で示される画素位置に配分する誤差
データを予め格納してある。例えば、商が1で余りが5
0の時は、e0へ128、e1へ71、e2へ37、e
3へ20の誤差データが配分され、e0の右隣りの画素
へ50の誤差データが配分される。
Reference numerals 6 and 7 denote latches for delaying the remainder data from the divider 5 by one pixel. That is,
The remaining 8-bit data from the latch 7 is added by the adder 2 to the input data input two pixels later. Reference numeral 8 denotes an error distribution table in which error data to be distributed to pixel positions shown in FIGS. 2A and 2B for each value of the quotient data from the divider 5 is stored in advance. For example, the quotient is 1 and the remainder is 5
When 0, 128 to e0, 71 to e1, 37 to e2, e
20 error data is distributed to 3 and 50 error data is distributed to the pixel on the right of e0.

【0018】9、11、13はラッチであり、データを
1画素遅延させるためのものである。10、12は加算
器であり、誤差データの加算のために用いられる。又、
14は1ライン分のデータを格納可能な誤差バッファで
あり、1ライン、誤差データを遅延させるためのもので
ある。
Reference numerals 9, 11, and 13 denote latches for delaying data by one pixel. Reference numerals 10 and 12 denote adders, which are used for adding error data. or,
Reference numeral 14 denotes an error buffer capable of storing data for one line, and is for delaying the error data for one line.

【0019】図1の回路は、入力データの1ライン毎に
左から右への→方向への処理と、右から左への←方向へ
の処理を切り換える。図1に示した如く、加算器12か
らの誤差データの誤差バッファ14への格納位置は→方
向への処理の場合と、←方向への処理の場合とで変化す
る。この制御は不図示の制御回路により実行される。
The circuit of FIG. 1 switches between processing from left to right in the direction of → and processing from right to left in the direction of ← for each line of input data. As shown in FIG. 1, the storage position of the error data from the adder 12 in the error buffer 14 changes between processing in the rightward direction and processing in the rightward direction. This control is executed by a control circuit (not shown).

【0020】この1ライン毎に処理方向を→方向と←方
向と変化させるジグザグ処理を実行することで誤差拡散
法を実行した際問題となっていた独特な縞パターンの発
生をも防止できる。
By executing the zigzag processing for changing the processing direction between the → direction and the ← direction for each line, it is possible to prevent the generation of a unique stripe pattern which has been a problem when the error diffusion method is executed.

【0021】図1において、20は解像度設定手段であ
り、入力画像データの解像度がオペレータにより入力さ
れ、入力された解像度が設定される。解像度としては主
/副走査方向が共に同じ場合と、主走査方向の解像度が
副走査方向の解像度より高い場合とを選択して設定でき
る。
In FIG. 1, reference numeral 20 denotes a resolution setting means. The resolution of input image data is input by an operator, and the input resolution is set. The resolution can be selectively set when the main / sub-scanning direction is the same and when the resolution in the main scanning direction is higher than the sub-scanning direction.

【0022】21は解像度設定手段20で設定された解
像度に応じて図3(a)、(b)に示した重み係数のい
ずれか一方を選択する重み係数選択読出手段である。2
3は選択された重み係数に応じて誤差配分テーブル8の
値を決定する誤差配分テーブル計算手段、24は決定さ
れた値を誤差配分テーブル8へロードするテーブルダウ
ンロード手段である。
Reference numeral 21 denotes a weight coefficient selection reading means for selecting one of the weight coefficients shown in FIGS. 3A and 3B in accordance with the resolution set by the resolution setting means 20. 2
Reference numeral 3 denotes an error distribution table calculating unit that determines a value of the error distribution table 8 according to the selected weight coefficient, and 24 denotes a table download unit that loads the determined value into the error distribution table 8.

【0023】次に、処理の流れを説明する。Next, the flow of processing will be described.

【0024】乗算器1に入力される入力画像ピクセルデ
ータは8ビットの多値画像データである。乗算器1にお
いては、図3で示される様な誤差配分係数の分母の値と
掛け合わせる。本実施例においては誤差配分係数の分母
の値は256であるので、256倍された値が乗算器1
から出力され、加算器2に入力される。加算器2は、乗
算器1で誤差配分係数の分母の値倍された入力画像デー
タおよびラッチ7から出力される丸め誤差、誤差バッフ
ァ14から読み出された前ラインからの誤差、およびラ
ッチ13から出力される左横(→方向処理)または右横
(←方向処理)ピクセルからの誤差を足し合わせ出力す
る。加算器2から出力されたデータは比較器3に入力さ
れる。比較器3は加算器2から出力された値とあらかじ
め定められた閾値(本実施例では127×256)と比
較する。このとき加算器2の出力が閾値よりも大きいと
きは1を、そうでないときは0を出力しこれが2値デー
タとなる。また、加算器2から出力されたデータと比較
器3から出力されたデータは減算器4に入力され、前者
から後者が引き算される。なお加算器2から出力される
データは17ビットであり、比較器3から出力される値
は1ビットであるので、後者は減算器4の内部でビット
拡張され、更に、誤差配分係数の分母倍され2値データ
が1のときは255×256に、0のときは同じく0と
して(式1)で示される2値化誤差を計算する。減算器
4で計算された2値化誤差は、除算器5に入力され、配
分係数の分母の値で割り算される。この結果、商は整数
値となって誤差配分テーブル8を参照するための参照値
となり、一方余りは1未満の丸め誤差となってラッチ6
に入力される。
The input image pixel data input to the multiplier 1 is 8-bit multi-valued image data. The multiplier 1 multiplies the value of the denominator of the error distribution coefficient as shown in FIG. In this embodiment, the value of the denominator of the error distribution coefficient is 256.
And output to the adder 2. The adder 2 outputs the input image data multiplied by the value of the denominator of the error distribution coefficient in the multiplier 1, the rounding error output from the latch 7, the error from the previous line read from the error buffer 14, and the output from the latch 13. The error from the left horizontal (→ direction processing) or right horizontal (← direction processing) pixel is added and output. The data output from the adder 2 is input to the comparator 3. The comparator 3 compares the value output from the adder 2 with a predetermined threshold value (127 × 256 in this embodiment). At this time, if the output of the adder 2 is larger than the threshold value, 1 is output, and if not, 0 is output and this becomes binary data. The data output from the adder 2 and the data output from the comparator 3 are input to a subtractor 4, and the former is subtracted from the latter. Since the data output from the adder 2 is 17 bits and the value output from the comparator 3 is 1 bit, the latter is bit-extended inside the subtractor 4 and further multiplied by the denominator multiple of the error distribution coefficient. When the binary data is 1, the binarization error represented by (Equation 1) is calculated as 255 × 256, and when the binary data is 0, it is similarly set to 0. The binarization error calculated by the subtractor 4 is input to the divider 5 and is divided by the value of the denominator of the distribution coefficient. As a result, the quotient becomes an integer value and becomes a reference value for referring to the error distribution table 8, while the remainder becomes a rounding error of less than one and becomes the latch 6
Is input to

【0025】ここで余りの8ビットデータは0〜255
のいずれかの値となるが、入力データに対し乗算器1で
256が乗算されているため、入力データ8ビット(0
〜255)に対し、余りの8ビットデータ0〜255は
0〜255/256となり、入力データ8ビットに対し
1未満の値となる。これにより丸め誤差の値を小さくす
ることができ、特に画像のハイライト部分での画質を向
上することができる。
Here, the remaining 8-bit data is 0 to 255
However, since the input data is multiplied by 256 by the multiplier 1, the input data has 8 bits (0
To 255), the remaining 8-bit data 0 to 255 is 0 to 255/256, which is less than 1 for 8 bits of input data. As a result, the value of the rounding error can be reduced, and particularly, the image quality in the highlight portion of the image can be improved.

【0026】尚、減算器4からのデータを配分係数の分
母の値で割った値が1.5の場合、除算器5では商とし
て−2の値を出力し、余りとして+128を出力する。
つまり、余りのデータが負の値となることはない。
When the value obtained by dividing the data from the subtracter 4 by the value of the denominator of the distribution coefficient is 1.5, the divider 5 outputs a value of −2 as a quotient and outputs +128 as a remainder.
That is, the remaining data does not become a negative value.

【0027】この余り8ビットのデータはラッチ6およ
び7により2画素分のディレーが与えられた後、再び加
算器2に入力される。除算器5から出力される商は参照
値として誤差配分テーブル8に入力される。誤差配分テ
ーブル8はRAM(ランダムアクセスメモリ)またはR
OM(リードオンリーメモリ)によって構成されるルッ
クアップテーブルであり、2値化誤差の値ごとに、誤差
配分テーブルダウンロード手段24によってあらかじめ
ロードされた重み係数の分母倍された値が格納されてい
る。
The remaining 8 bits of data are delayed by latches 6 and 7 for two pixels and then input to adder 2 again. The quotient output from the divider 5 is input to the error distribution table 8 as a reference value. The error distribution table 8 is a RAM (random access memory) or R
This is a look-up table constituted by an OM (read only memory), and stores a value obtained by multiplying the denominator times of the weight coefficient previously loaded by the error distribution table download unit 24 for each binarization error value.

【0028】誤差配分テーブル6は図2(a)、(b)
に示すような誤差配分窓に対応した値が格納されてお
り、個々の値は2値化誤差の値に応じて誤差配分係数の
分母倍されているので、それぞれが16ビットの数で表
されている。なお本実施例では図2(a)、(b)に示
すような左右対称な2つの誤差配分窓を処理方向に応じ
て1ラインごとに切り替えて使用しているが、誤差配分
窓は左右対称なので誤差配分テーブルは1つで十分であ
る。
The error distribution table 6 is shown in FIGS.
The values corresponding to the error distribution window as shown in (1) are stored. Each value is multiplied by the denominator of the error distribution coefficient according to the value of the binarization error. ing. In this embodiment, two symmetrical error distribution windows as shown in FIGS. 2A and 2B are used by switching every line according to the processing direction. Therefore, one error distribution table is sufficient.

【0029】ここで、誤差配分テーブルに格納される値
は次のような手順により作成される。まず解像度設定手
段20により処理すべき画像の主走査方向および副走査
方向の解像度を設定し、解像度読み出し手段21により
前記主/副解像度を読み出す。読み出された前記主/副
解像度に従って、重み係数選択読み出し手段22は誤差
拡散に使用する誤差の重み係数を選択して読み出す。な
お本実施例において、重み係数は図2に示すような左右
対称な2つの誤差配分窓に対応して定められており、誤
差拡散の処理方法に応じて1ラスタごとに切り替えて使
用している。また重み係数の値は設定された解像度に対
応して好ましくないテクスチャが現れないようにあらか
じめ定めており、図3に示すように主/副走査方向の解
像度が同じ場合には(a)で示される係数の値を、また
主走査方向の解像度が副走査方向の解像度の2倍に設定
された場合には(b)で示される係数の値を使用するよ
うに、重み係数選択読み出し手段22によって選択して
読み出される。重み係数選択読み出し手段22によって
選択されて読み出された重み係数は誤差配分テーブル計
算手段23により2値化誤差の値に応じて掛け合わさ
れ、さらに誤差配分係数の分母倍されて誤差配分テーブ
ルダウンロード手段24により誤差配分テーブル8にあ
らかじめダウンロードされる。
Here, the values stored in the error distribution table are created by the following procedure. First, the resolution in the main scanning direction and the sub-scanning direction of the image to be processed is set by the resolution setting unit 20, and the main / sub resolution is read out by the resolution reading unit 21. In accordance with the read main / sub resolution, the weight coefficient selection / read means 22 selects and reads an error weight coefficient used for error diffusion. In the present embodiment, the weighting factors are determined corresponding to the two symmetrical error distribution windows as shown in FIG. 2, and are switched and used for each raster in accordance with the error diffusion processing method. . The value of the weighting factor is determined in advance so that an undesired texture does not appear in accordance with the set resolution. When the resolution in the main / sub-scanning direction is the same as shown in FIG. If the resolution in the main scanning direction is set to twice the resolution in the sub-scanning direction, the weight coefficient selection and reading means 22 uses the coefficient value shown in FIG. Selected and read. The weighting factor selected and read by the weighting factor selection and reading means 22 is multiplied by the error distribution table calculating means 23 according to the value of the binarization error, and further multiplied by the denominator of the error distribution coefficient to obtain the error distribution table download means. 24, the data is downloaded to the error distribution table 8 in advance.

【0030】ここで、図3(a)、(b)に示した誤差
配分係数の特徴について説明する。図3(a)の誤差配
分係数は、主/副走査方向の解像度が同じ場合に用いら
れる係数で、主走査方向(右方向)への重みの割合が1
28/256で、副走査方向(下方向)への重みの割合
が(20+37+71)/256=128/256とな
り主走査方向と副走査方向に対する重みの割合が同じで
あり、この場合、主/副走査方向の解像度が同じ入力画
像データに対し、テクスチャの発生を抑えることができ
る。そして、図3(b)の誤差配分係数は主走査方向の
解像度が副走査方向の解像度の2倍の場合に用いられる
係数で、主走査方向に対する重みの割合が177/25
6、副走査方向に対する重みの割合が(12+23+4
4)/256=79/256となり、主走査方向におよ
そ2倍の割合で重みが多くなっている。これは主走査方
向への解像度が副走査方向に対し2倍となっていること
で、誤差の配分される画素の距離が1/2となってしま
うためで、その分、主走査方向に対する誤差の重みを副
走査方向に対する重みの2倍としている。これにより、
主走査方向の解像度が副走査方向の解像度の2倍の入力
画像データに対し、誤差拡散法により2値化処理を行な
った場合にも、図5(b)に示した如くのテクスチャの
発生を抑えることができる。従って、副走査方向の解像
度が主走査方向の解像度よりも高い場合は、副走査方向
への重み係数の重みの割合を主走査方向への重みの割合
よりも大きくすればよい。
Here, the characteristics of the error distribution coefficients shown in FIGS. 3A and 3B will be described. The error distribution coefficient in FIG. 3A is a coefficient used when the resolution in the main / sub-scanning direction is the same, and the weight ratio in the main scanning direction (right direction) is 1
28/256, the weight ratio in the sub-scanning direction (downward) is (20 + 37 + 71) / 256 = 128/256, and the weight ratio in the main scanning direction and the sub-scanning direction is the same. The generation of texture can be suppressed for input image data having the same resolution in the scanning direction. The error distribution coefficient in FIG. 3B is a coefficient used when the resolution in the main scanning direction is twice the resolution in the sub-scanning direction, and the weight ratio to the main scanning direction is 177/25.
6. The ratio of the weight to the sub-scanning direction is (12 + 23 + 4)
4) / 256 = 79/256, and the weight is increased about twice in the main scanning direction. This is because the resolution in the main scanning direction is twice that in the sub-scanning direction, and the distance between the pixels to which the error is distributed is halved. Is twice the weight in the sub-scanning direction. This allows
Even when the binarization processing is performed by the error diffusion method on the input image data whose resolution in the main scanning direction is twice the resolution in the sub-scanning direction, the generation of the texture as shown in FIG. Can be suppressed. Therefore, when the resolution in the sub-scanning direction is higher than the resolution in the main scanning direction, the ratio of the weight of the weighting factor in the sub-scanning direction may be made larger than the ratio of the weight in the main scanning direction.

【0031】誤差配分テーブル8からは2値化誤差kの
値に応じてek0、ek1、ek2、ek3の4つの値
が出力され、それぞれが図2に示される誤差配分窓e
0、e1、e2、e3への値に対応している。従って出
力ek0はラッチ13に入力され1ピクセル分のディレ
ーが加えられた後再び加算器2に入力される。また、出
力ek1はラッチ9に入力され1ピクセル分のディレー
が加えられた後、加算器10に入入力され出力ek2と
足し合わされる。さらに加算器10の出力はラツチ11
に入力され1ピクセル分のディレーが加えられた後、加
算器12に入力され出力ek3と足し合わされる。そし
て加算器12の出力は誤差バッファ14に書き込まれ
る。なお本実施例においては誤差が書き込まれる場所
は、2値化処理の方向により着目画素の左または右に2
ピクセル離れた場所であり、2値化処理の方向は1ライ
ンごとに切り替わるようになっている。
The error distribution table 8 outputs four values ek0, ek1, ek2, and ek3 in accordance with the value of the binarization error k.
It corresponds to the values 0, e1, e2, and e3. Therefore, the output ek0 is input to the latch 13 and is input to the adder 2 again after a delay of one pixel is added. The output ek1 is input to the latch 9, and after a delay of one pixel is added, the output ek1 is input to the adder 10 and added to the output ek2. The output of the adder 10 is a latch 11
, And a delay of one pixel is added, and then input to the adder 12 and added to the output ek3. Then, the output of the adder 12 is written to the error buffer 14. In this embodiment, the location where the error is written is two places to the left or right of the pixel of interest depending on the direction of the binarization process.
It is a place separated by pixels, and the direction of the binarization processing is switched every line.

【0032】以上の処理により1入力データに対する2
値化処理が終了するので、以上の処理を処理方向1ピク
セルづつずらして繰り返すことにより画像全体に対する
2値化処理が可能となる。
By the above processing, 2 for one input data
Since the binarization processing is completed, the above processing is repeated while being shifted by one pixel in the processing direction, thereby enabling binarization processing for the entire image.

【0033】この様に本発明の第1実施例によれば重み
係数の分母倍された2値化誤差の値をあらかじめ計算し
てテーブルに格納しているので、重み係数毎の乗算器お
よび除算器を省略することができ、回路規模を小さくし
て高速処理が可能となる。更に、入力画素の濃度と周辺
画素から配分された誤差との総和を求め、その総和と2
値化結果との差を重み係数の分母で割り算し、商及び余
りを求め、商はテーブルに格納されている値に基づき周
辺画素に配分するとともに、余りも周辺画素に配分する
ことにより、重み係数にも柔軟性を持たせることができ
るとともに丸め誤差の値を0から1未満にすることがで
きハイライト部分を含め画質を向上することが可能とな
る。
As described above, according to the first embodiment of the present invention, the value of the binarization error multiplied by the denominator of the weight coefficient is calculated in advance and stored in the table. The device can be omitted, the circuit scale can be reduced, and high-speed processing can be performed. Further, the sum of the density of the input pixel and the error distributed from the surrounding pixels is obtained, and the sum of the error and 2
Dividing the difference from the valuation result by the denominator of the weighting factor to determine the quotient and the remainder, the quotient is distributed to the peripheral pixels based on the values stored in the table, and the remainder is distributed to the peripheral pixels to obtain the weight. The coefficient can be given flexibility, and the value of the rounding error can be reduced from 0 to less than 1, so that the image quality including the highlighted portion can be improved.

【0034】そして、本実施例によれば、主走査方向と
副走査方向の解像度が異なる場合においても、誤差を配
分する際の重み係数の重みの割合を工夫することでテク
スチャの発生を抑え、高画質な画像を得ることができ
る。
According to this embodiment, even when the resolution in the main scanning direction and the resolution in the sub-scanning direction are different, the generation of texture is suppressed by devising the ratio of the weights of the weighting factors when allocating errors. High quality images can be obtained.

【0035】〔第2実施例〕図4は本発明の第2の実施
例に係わる画像処理装置の構成を説明するブロック図で
ある。
[Second Embodiment] FIG. 4 is a block diagram illustrating the configuration of an image processing apparatus according to a second embodiment of the present invention.

【0036】第1の実施例においては、図3に示される
ような誤差配分係数を使用するため誤差配分係数の分母
の数は2のべき乗となっている。従って、第1の実施例
の乗算器1、及び除算器5はビットシフト演算によって
置き換えることができるので、省略可能である。図4は
乗算器1、除算器5を図1から削除したものである。す
なわち、8ビットの入力データは加算器2のビット8か
らビット15に入力され加算器2の演算結果は符号ビッ
トを含む上位9ビットが商に、符号ビットおよび下位8
ビットが余りに相当する。また誤差配分テーブルは、加
算器2から出力される上位9ビットを参照する。式
(1)から解るように2値化誤差はこの誤差データを参
照しなくても、加算器2からの上位9ビットの値から得
ることができるので、あらかじめ対応する誤差配分テー
ブルを作成しておけば加算器2からの上位9ビットの値
でテーブルを参照しても問題はない。さらに誤差配分テ
ーブル8には2値データoも登録してありこの値を参照
することにより、第1の実施例にあった比較器3を省略
することが可能である。
In the first embodiment, since the error distribution coefficient as shown in FIG. 3 is used, the number of denominators of the error distribution coefficient is a power of two. Therefore, the multiplier 1 and the divider 5 of the first embodiment can be omitted because they can be replaced by a bit shift operation. FIG. 4 is obtained by removing the multiplier 1 and the divider 5 from FIG. That is, the input data of 8 bits is input to bits 8 to 15 of the adder 2, and the operation result of the adder 2 is such that the upper 9 bits including the sign bit become a quotient, the sign bit and the lower 8
Bits correspond too much. The error distribution table refers to the upper 9 bits output from the adder 2. As can be understood from the equation (1), the binarization error can be obtained from the value of the upper 9 bits from the adder 2 without referring to this error data. If it does, there is no problem even if the table is referred to by the value of the upper 9 bits from the adder 2. Further, the binary data o is also registered in the error distribution table 8, and by referring to this value, the comparator 3 in the first embodiment can be omitted.

【0037】以上説明したように第2実施例によれば乗
算器、除算器及び比較器を用いることなく回路規模を小
さくして高速に誤差拡散処理を実行することができ、か
つ重み係数にも柔軟性を持たせることが可能となった。
更に誤差を分配する際の丸め誤差を、0から1未満に抑
えることが可能となりハイライト部分での画質を向上さ
せることが可能となった。更に第2実施例においても第
1実施例と同様に解像度に応じた重み係数を用いるので
テクスチャの発生を防止することができる。
As described above, according to the second embodiment, it is possible to execute the error diffusion processing at a high speed by reducing the circuit scale without using a multiplier, a divider and a comparator, and to reduce the weight coefficient. It became possible to have flexibility.
Further, the rounding error in distributing the error can be suppressed from 0 to less than 1, and the image quality in the highlighted portion can be improved. Further, in the second embodiment as well, similar to the first embodiment, a weight coefficient corresponding to the resolution is used, so that generation of texture can be prevented.

【0038】なお、ここで述べた実施例においては入力
画像ピクセルデータは8ビットの多値画像データであっ
たが、4ビット12ビット、16ビット等の多のビット
数で表されても構わない。また本発明は、8ビット入力
データを2ビット又は3ビットデータに量子化する際に
も適用できる。また、本実施例においては誤差配分窓は
4ピクセルによって構成されていたが、より大きな窓で
あってもあるいは小さな窓であっても同様に構成できる
ことは言うまでもない。
In the embodiment described above, the input image pixel data is 8-bit multi-valued image data. However, the input image pixel data may be represented by a large number of bits such as 4 bits, 12 bits, and 16 bits. . The present invention can also be applied to quantizing 8-bit input data into 2-bit or 3-bit data. Further, in this embodiment, the error distribution window is constituted by four pixels. However, it goes without saying that the error distribution window can be constituted in the same manner even if the window is larger or smaller.

【0039】さらに、ここで述べた実施例において、選
択できる重み係数は、主/副走査方向の解像度が同じ場
合と、主走査方向の解像度が副走査方向の2倍である場
合の2種類だけであったが、さらに多くの種類の重み係
数を設定された解像度によって選択する構成にできるこ
とは言うまでもない。
Furthermore, in the embodiment described here, there are only two types of weighting factors that can be selected: the case where the resolution in the main / sub-scanning direction is the same, and the case where the resolution in the main scanning direction is twice that in the sub-scanning direction. However, it goes without saying that a configuration in which more types of weighting coefficients are selected according to the set resolution can be adopted.

【0040】又、本実施例の回路を入力カラーの数だけ
備えることにより本発明はカラー画像にも用いることが
できる。
Further, by providing the circuits of this embodiment as many as the number of input colors, the present invention can be used for a color image.

【0041】[0041]

【発明の効果】以上説明した如く本発明によれば、入力
画像データの主/副走査方向の解像度が異なる場合にお
いても、それに応じた誤差配分係数を用いることにより
テクスチャの発生を抑え、高画質な中間調処理画像を得
ることができる。
As described above, according to the present invention, even when the resolutions of the input image data in the main / sub-scanning directions are different, the generation of texture is suppressed by using an error distribution coefficient corresponding to the resolution, thereby achieving high image quality. A halftone processed image can be obtained.

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

【図1】第1の実施例の画像処理装置の構成を示すブロ
ック図。
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment.

【図2】誤差配分窓を示す模式図。FIG. 2 is a schematic diagram showing an error distribution window.

【図3】誤差配分係数を示す模式図。FIG. 3 is a schematic diagram showing an error distribution coefficient.

【図4】第2の実施例の画像処理装置の構成を示すブロ
ック図。
FIG. 4 is a block diagram illustrating a configuration of an image processing apparatus according to a second embodiment.

【図5】主/副走査方向の解像度の違いによってあらわ
れるテクスチャを説明するための模式図。
FIG. 5 is a schematic diagram for explaining a texture that appears due to a difference in resolution between a main scanning direction and a sub-scanning direction.

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

1 乗算器 2 加算器 3 比較器 4 減算器 5 除算器 6、7、9、11、13 ラッチ 8 誤差配分テーブル 10、12 加算器 14 誤差バッファ 20 解像度設定手段 21 解像度読出手段 22 重み係数選択読出手段 23 誤差配分テーブル計算手段 24 テーブルダウンロード手段 DESCRIPTION OF SYMBOLS 1 Multiplier 2 Adder 3 Comparator 4 Subtractor 5 Divider 6, 7, 9, 11, 13 Latch 8 Error distribution table 10, 12 Adder 14 Error buffer 20 Resolution setting means 21 Resolution reading means 22 Weight coefficient selection reading Means 23 Error distribution table calculation means 24 Table download means

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/40 - 1/409 H04N 1/46 H04N 1/60 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int. Cl. 7 , DB name) H04N 1/40-1/409 H04N 1/46 H04N 1/60

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 多値画像データを入力する入力手段と、 前記多値の画像データを量子化処理する処理手段と、 前記量子化処理の際発生する誤差データに誤差配分係数
に基づき重み付けを行い、重み付けされた誤差データを
複数画素の画像データに分散する分散手段と、 前記入力手段が入力する多値画像データの主走査及び副
走査方向の解像度が同じ場合と異なる場合で前記誤差配
分係数を切り替える切り替え手段とを有することを特徴
とする画像処理装置。
An input unit for inputting multi-valued image data; a processing unit for quantizing the multi-valued image data; and performing weighting on error data generated in the quantization process based on an error distribution coefficient. A dispersing unit that disperses the weighted error data into image data of a plurality of pixels, and the error distribution coefficient when the resolution in the main scanning and sub-scanning directions of the multi-valued image data input by the input unit is different from the same. An image processing apparatus, comprising: switching means for switching.
【請求項2】 多値画像データを入力する入力手段と、 前記多値画像データを量子化処理する処理手段と、 前記量子化処理の際発生する誤差データに誤差配分係数
に基づき重み付けを行い、重み付けされた誤差データを
複数画素の画像データに分散する分散手段とを有し、 前記入力手段が入力する多値画像データの主走査及び副
走査方向の解像度が異なる場合、前記分散手段は解像度
の高い走査方向に対して重みの割合が大きい誤差配分係
数を用いることを特徴とする画像処理装置。
2. Input means for inputting multi-valued image data; processing means for quantizing the multi-valued image data; weighting error data generated at the time of the quantization processing based on an error distribution coefficient; Dispersing means for distributing the weighted error data into image data of a plurality of pixels, wherein when the resolution in the main scanning and sub-scanning directions of the multivalued image data input by the input means is different, the dispersing means An image processing apparatus using an error distribution coefficient having a large weight ratio for a high scanning direction.
JP01249295A 1995-01-30 1995-01-30 Image processing device Expired - Lifetime JP3287717B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01249295A JP3287717B2 (en) 1995-01-30 1995-01-30 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01249295A JP3287717B2 (en) 1995-01-30 1995-01-30 Image processing device

Publications (2)

Publication Number Publication Date
JPH08204958A JPH08204958A (en) 1996-08-09
JP3287717B2 true JP3287717B2 (en) 2002-06-04

Family

ID=11806895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01249295A Expired - Lifetime JP3287717B2 (en) 1995-01-30 1995-01-30 Image processing device

Country Status (1)

Country Link
JP (1) JP3287717B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4784353B2 (en) * 2006-03-16 2011-10-05 コニカミノルタホールディングス株式会社 Image forming apparatus, image forming method, and image forming program
JP4549418B2 (en) 2008-03-04 2010-09-22 シャープ株式会社 Image processing apparatus, image processing method, image forming apparatus, program, and recording medium
JP4978649B2 (en) * 2009-03-26 2012-07-18 ブラザー工業株式会社 Image processing apparatus and image processing program
JP5093382B2 (en) * 2011-05-24 2012-12-12 コニカミノルタホールディングス株式会社 Image forming apparatus, image forming method, and image forming program

Also Published As

Publication number Publication date
JPH08204958A (en) 1996-08-09

Similar Documents

Publication Publication Date Title
EP0356225B1 (en) Image processing apparatus
US5353127A (en) Method for quantization gray level pixel data with extended distribution set
US5521989A (en) Balanced error diffusion system
JP3247737B2 (en) Pixel value quantization method in image
JPH0777418B2 (en) Image processing device
JPH10271331A (en) Image processing method and device therefor
EP0174721A2 (en) Apparatus for processing image signal
JPH0738766A (en) Image processor
US20070081738A1 (en) Countdown stamp error diffusion
JP3287717B2 (en) Image processing device
JP2003069819A (en) Image processor and image processing method
JPH0738767A (en) Image binarizing processor
JP3399341B2 (en) Image processing method and image processing apparatus
JP2851662B2 (en) Image processing device
JP3200287B2 (en) Image processing method and apparatus
JPH0435105B2 (en)
JPH06101788B2 (en) Image signal processor
JP3200274B2 (en) Image processing method and apparatus
JP3501533B2 (en) Color image forming equipment
JP3431779B2 (en) Threshold value matrix error diffusion binarization method and computer system
JP2003198843A (en) Reduced-buffer error diffusion
JP3679522B2 (en) Image processing method and apparatus
JP2870934B2 (en) Image signal processing device
JP4208583B2 (en) Image processing apparatus and method and program thereof
JPH04229767A (en) Picture processing unit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020205

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

Free format text: PAYMENT UNTIL: 20080315

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090315

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100315

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100315

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110315

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120315

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130315

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20140315

Year of fee payment: 12

EXPY Cancellation because of completion of term