JPH07212593A - Method and device for processing picture - Google Patents

Method and device for processing picture

Info

Publication number
JPH07212593A
JPH07212593A JP6004647A JP464794A JPH07212593A JP H07212593 A JPH07212593 A JP H07212593A JP 6004647 A JP6004647 A JP 6004647A JP 464794 A JP464794 A JP 464794A JP H07212593 A JPH07212593 A JP H07212593A
Authority
JP
Japan
Prior art keywords
error
denominator
value
density
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.)
Granted
Application number
JP6004647A
Other languages
Japanese (ja)
Other versions
JP3200274B2 (en
Inventor
Yukihisa Ota
享寿 太田
Kouji Yamada
浩示 山田
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 JP00464794A priority Critical patent/JP3200274B2/en
Priority to US08/373,843 priority patent/US5621542A/en
Priority to EP95300317A priority patent/EP0664643B1/en
Priority to DE69516193T priority patent/DE69516193T2/en
Priority to AT95300317T priority patent/ATE191821T1/en
Publication of JPH07212593A publication Critical patent/JPH07212593A/en
Application granted granted Critical
Publication of JP3200274B2 publication Critical patent/JP3200274B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To obtain a method and a device for processing picture, whereby a circuit scale is made to be smaller, flexibility is held in a weighing coefficient and rounding difference is restricted to be less than one from zero so that picture quality in a high-light part in a difference diffusing method. CONSTITUTION:The value of binary difference which is multiplied by the denominator of the weighing coefficient is previously calculated so as to be stored in a table 8 and the total sum of the density of an input picture element which is obtained by multiplying the denominator of the weighing coefficient and difference distributed from the peripheral picture element is obtained by an adder 2. The difference between the total sum and a binarized result is divided by the denominator of the weighing coefficient so as to obtain a quatient and a remainder. The quotient is distributed to the peripheral picture element based on the value stored in the table and the remainder is also distributed to the peripheral picture element.

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 method and apparatus, and more particularly to quantizing input data into binary or multi-valued data while preserving the difference between input image density and output image density by an error diffusion method or the like. The present invention relates to an image processing method and apparatus for processing.

【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 expressing input multi-valued data with binary or multi-valued levels lower than the level of the input multi-valued data. For this error diffusion method, see "An Adaptive Al".
gorithm 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 unbinarized pixels P0, P1, P2, and P3 around the point P are binarized to v0, v1, v2, v3, respectively. Letting T be the threshold value of T, the binarization error E at the point of interest P is empirically obtained for the peripheral pixels P0, P1, P2, P3.
This is a method in which weighting processing is performed by 0, W1, W2, and W3 and distribution is performed to make the average density of the output image equal to the density of the input image in a macro manner. At this time, assuming that the output binary data is o, the errors E0, E1, E2, E3 with respect to the peripheral pixels P0, P1, P2, P3 can be obtained by the following formula.

【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)
[Outer 1] (However, Vmax: maximum density, Vmin: minimum density) E0 = E × W0; E1 = E × W1; E2 = E × W2; E3 = E × W3; (Example of weighting factor: W0 = 7/16, W1 = 1/16, W
2 = 5/16, W3 = 3/16)

【0004】しかし、この方式を論理回路で実現する
と、上記の例からも解るように重み係数毎の乗算器、除
算器が必要なため回路規模が大きくなってしまい、また
整数演算を行うと丸め誤差(E−(E0+E1+E2+
E3))のために出力画像の平均濃度が入力画像の濃度
と等しくならないという欠点があった。
However, if this method is realized by a logic circuit, as will be understood from the above example, the multiplier and divider for each weighting factor are required, resulting in a large circuit scale and rounding error when performing integer arithmetic. (E- (E0 + E1 + E2 +
Due to E3)), the average density of the output image is not equal to the density of the input image.

【0005】これを解決する方法として、特開昭58−
215169号公報,特開昭61−52073号公報,
特開昭61−293068号公報においては重み係数の
2のべき乗分の1にすることにより乗算器および除算器
の代わりにシフトレジスタを用いて回路規模を小さくす
る方法が開示されており、また、特開昭63−3507
4号公報においては濃度情報の値ごとに、あらかじめ重
み付けされた2値化誤差の値を決め、かつその値の合計
が2値化誤差と等しくなるようにすることにより、乗算
および除算を簡略化し、かつ丸め誤差をなくす方法が提
案されている。
As a method for solving this, Japanese Patent Laid-Open No. 58-58
No. 215169, JP-A No. 61-52073,
Japanese Patent Application Laid-Open No. 61-293068 discloses a method of reducing the circuit scale by using shift registers instead of multipliers and dividers by reducing the weighting coefficient to a power of two. JP-A-63-3507
In Japanese Patent Laid-Open No. 4 (1994), a weighted binarization error value is determined for each value of density information, and the sum of the binarization errors is made equal to the binarization error, thereby simplifying multiplication and division. , And a method of eliminating rounding error has been proposed.

【0006】また、特開昭63−155950号公報に
は、重み付けされた周辺画素内に丸め誤差を加えること
により出力画像の平均濃度が入力画像の濃度と等しくな
るようにする方法が提案されている。
Further, Japanese Patent Application Laid-Open No. 63-155950 proposes a method for making the average density of an output image equal to the density of an input image by adding a rounding error in weighted peripheral pixels. .

【0007】[0007]

【発明が解決しようとする課題】ところが、前述したシ
フトレジスタを用いる方法では重み係数が2のべき乗分
の1に固定されてしまい、柔軟性に乏しいという欠点が
あった。また、あらかじめ重み付けされた2値化誤差の
値を決め、かつその値の合計が2値化誤差と等しくなる
ように、重み付けされた周辺画素に配分する誤差内に丸
め誤差を加える方法では、出力画像の平均濃度は入力画
像の濃度と等しくなるが、整数演算を行っているので丸
め誤差自身の値は0または少なくとも1以上になってし
まい、誤差の影響を受けやすいハイライト部分では丸め
誤差の配分によって画質が劣化するという欠点があっ
た。
However, the method using the shift register described above has a drawback in that the weighting factor is fixed to a power of 1 and the flexibility is poor. Further, in the method of determining the value of the binarization error weighted in advance and adding the rounding error in the error distributed to the weighted peripheral pixels so that the sum of the values becomes equal to the binarization error, The average density of is equal to the density of the input image, but since the integer calculation is performed, the value of the rounding error itself becomes 0 or at least 1 or more. Therefore, in the highlight part which is easily affected by the error, the image quality is distributed by the rounding error. Has the drawback that it deteriorates.

【0008】本発明は上述した従来技術の欠点を除去す
るものであり、誤差データへの重み付けにより発生する
丸め誤差の値を1未満とすることで、特に画像のハイラ
イト部分を高画質化することができる画像処理方法及び
装置の提供を目的とする。
The present invention eliminates the above-mentioned drawbacks of the prior art, and improves the image quality especially in the highlight portion of an image by setting the value of the rounding error generated by weighting error data to less than 1. An object of the present invention is to provide an image processing method and apparatus capable of performing the above.

【0009】本発明の他の目的は、重み係数毎の乗算器
及び除算器を省略でき回路規模が小さくすなわち高速
で、かつ、重み係数に柔軟性を持たせることができると
ともに丸め誤差自身の値を0から1未満にすることによ
り画質を向上することができる画像処理方法及び装置の
提供を目的とする。
Another object of the present invention is to omit the multiplier and the divider for each weighting coefficient, to reduce the circuit scale, that is, to increase the flexibility of the weighting coefficient and to calculate the value of the rounding error itself. It is an object of the present invention to provide an image processing method and apparatus capable of improving the image quality by setting the value from 0 to less than 1.

【0010】[0010]

【課題を解決するための手段】上述した目的を達成する
ために本発明の第1の発明によれば、画像データを入力
する入力手段と、前記画像データを量子化処理する処理
手段と、前記量子化処理の際発生する誤差データに重み
付けを行ない、複数の画像データに誤差データを分散す
る分散手段とを備え、前記分散手段は重み付けにより発
生する丸め誤差の値を1未満としたものである。
According to a first aspect of the present invention for achieving the above object, an input means for inputting image data, a processing means for quantizing the image data, and An error data generated at the time of the quantization processing is weighted, and a dispersion unit for distributing the error data to a plurality of image data is provided, and the distribution unit sets the value of the rounding error generated by the weighting to less than 1.

【0011】又、本発明の第2の発明によれば入力画像
の濃度と2値化後の濃度との誤差を、2値化誤差として
着目画素の周辺画素の配分し、2値化後の平均濃度を入
力画像の濃度と等しくする画像処理方法において、誤差
を配分する際の重み係数の分母倍された値をあらかじめ
計算したテーブルを備え、重み係数の分母倍された入力
画素の濃度と、周辺画素から配分された誤差との総和を
求めその総和と2値化結果との差を重み係数の分母で割
り算し、商及び余りを求め、商は前記テーブルに格納さ
れている値に基づき、周辺画素に配分するとともに、余
りも周辺画素に配分する。
Further, according to the second aspect of the present invention, the error between the density of the input image and the density after binarization is distributed as a binarization error to the peripheral pixels of the pixel of interest, and after binarization. In the image processing method of making the average density equal to the density of the input image, a table in which a value obtained by multiplying the denominator of the weighting coefficient when allocating the error is calculated in advance is provided, and the density of the input pixel multiplied by the denominator of the weighting coefficient, The sum of the error distributed from the peripheral pixels is calculated, and the difference between the sum and the binarization result is divided by the denominator of the weighting coefficient to obtain the quotient and the remainder. The quotient is based on the values stored in the table. In addition to the distribution to the peripheral pixels, the surplus is also distributed to the peripheral pixels.

【0012】[0012]

【作用】本発明の第1の発明によれば誤差データへの重
み付けにより発生する丸め誤差の値を1未満とすること
で、特に画像のハイライト部分を高画質化することがで
きる。
According to the first aspect of the present invention, by setting the value of the rounding error generated by weighting the error data to be less than 1, it is possible to improve the image quality particularly in the highlight portion of the image.

【0013】本発明の第2の発明によれば、重み係数の
分母倍された2値化誤差の値をあらかじめ計算してテー
ブルに格納しているので、重み係数毎の乗算器および除
算器を省略することができ、回路規模を小さくして高速
処理が可能となる。更に、重み係数の分母倍された入力
画素の濃度と周辺画素から配分された誤差との総和を求
め、その総和と2値化結果との差を重み係数の分母で割
り算し、商及び余りを求め、商はテーブルに格納されて
いる値に基づき周辺画素に配分するとともに、余りも周
辺画素に配分することにより、重み係数にも柔軟性を持
たせることができるとともに丸め誤差の値を0から1未
満にすることができハイライト部分を含め画質を向上す
ることが可能となる。
According to the second aspect of the present invention, since the value of the binarization error obtained by multiplying the denominator of the weighting coefficient is calculated in advance and stored in the table, a multiplier and a divider for each weighting coefficient are used. It can be omitted, and the circuit scale can be reduced to enable high-speed processing. Furthermore, the sum of the density of the input pixel multiplied by the denominator of the weighting coefficient and the error distributed from the peripheral pixels is obtained, and the difference between the sum and the binarization result is divided by the denominator of the weighting coefficient to obtain the quotient and the remainder. The quotient and the quotient are distributed to the peripheral pixels based on the values stored in the table, and the remainder is also distributed to the peripheral pixels, so that the weighting coefficient can be made flexible and the value of the rounding error is 0 to 1. It is possible to improve the image quality including the highlight part.

【0014】[0014]

【実施例】【Example】

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

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

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

【0017】4は減算器で、2値化前の加算器2からの
17ビットデータと2値化後の値との差、即ち誤差デー
タを演算する。減算器4で用いられる2値化後の値は2
値化結果が1のときは「255×256」、2値化結果
が0の時は「0」である。
Reference numeral 4 denotes a subtractor, which calculates the difference between the 17-bit data from the adder 2 before binarization and the value after binarization, that is, error data. The binarized value 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”.

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

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

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

【0021】図1の回路は、入力データの1ライン毎に
左から右への→方向への処理と、右から左への←方向へ
の処理を切り換える。図1に示した如く、加算器12か
らの誤差データの誤差バッファ14への格納位置は→方
向への処理の場合と、←方向への処理の場合とで変化す
る。この制御は不図示の制御回路により実行される。
The circuit of FIG. 1 switches processing from the left to the right in the → direction and from the right to the left in the ← direction 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 depending on the processing in the → direction and the processing in the ← direction. This control is executed by a control circuit (not shown).

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

【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 multivalued image data. In the multiplier 1, the denominator value of the error distribution coefficient as shown in FIG. 3 is multiplied. In the present embodiment, the value of the denominator of the error distribution coefficient is 256, so the value multiplied by 256 is output from the multiplier 1 and input to the adder 2. The adder 2 is
The input image data multiplied by the denominator of the error distribution coefficient in the multiplier 1 and the rounding error output from the latch 7, the error from the previous line read from the error buffer 14, and the left horizontal (output from the latch 13 → Add the error from the direction processing) or right side (← direction processing) pixel 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, 1 is output when the output of the adder 2 is larger than the threshold value, and 0 is output otherwise, which becomes binary data. Further, the data output from the adder 2 and the data output from the comparator 3 are input to the subtractor 4, and the latter is subtracted from the former. 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 the denominator multiple of the error distribution coefficient is further added. When the binary data is 1, it becomes 255 × 256, and when it is 0, it also becomes 0.
Then, the binarization error represented by (Equation 1) is calculated. The binarization error calculated by the subtractor 4 is input to the divider 5,
It is divided by the value of the denominator of the allocation 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 1 and is input to the latch 6.

【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 in the multiplier 1, the input data is 8 bits (0
~ 255), the remaining 8-bit data 0-255 becomes 0-255 / 256, which is a value less than 1 for 8-bit input data. As a result, the value of the rounding error can be reduced, and the image quality can be improved especially in the highlight portion of the image.

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

【0027】この余り8ビットのデータはラッチ6およ
び7により2画素分のディレーが与えられた後、再び加
算器2に入力される。除算器5から出力される商は参照
値として誤差配分テーブル8に入力される。誤差配分テ
ーブル8はRAM(ランダムアクセスメモリ)またはR
OM(リードオンリーメモリ)によって構成されるルッ
クアップテーブルであり、2値化誤差の値ごとにあらか
じめ定められた重み係数の分母倍された値が格納されて
いる。誤差配分テーブル6は図2(a),(b)に示す
ような誤差配分窓に対応した値が格納されており、個々
の値は2値化誤差の値に応じて誤差配分係数の分母倍さ
れているので、それぞれが16ビットの数で表されてい
る。なお本実施例では図2(a),(b)に示すような
左右対称な2つの誤差配分窓を処理方向に応じて1ライ
ンごとに切り替て使用しているが、誤差配分窓は左右対
称なので誤差配分テーブルは1つで十分である。
The remaining 8-bit data is delayed by two pixels by the latches 6 and 7 and then input to the 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 RAM (random access memory) or R
It is a lookup table configured by an OM (Read Only Memory), and stores a value obtained by multiplying a denominator of a predetermined weighting coefficient for each value of the binarization error. The error distribution table 6 stores values corresponding to error distribution windows as shown in FIGS. 2A and 2B, and each value is a denominator multiple of the error distribution coefficient according to the value of the binarization error. Therefore, each is represented by a 16-bit number. In this embodiment, two symmetrical error distribution windows as shown in FIGS. 2 (a) and 2 (b) are switched for each line depending on the processing direction, and the symmetrical error distribution windows are used. Therefore, one error distribution table is sufficient.

【0028】誤差配分テーブル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, and each of them has an error distribution window e shown in FIG.
It corresponds to the values 0, e1, e2, and e3. Therefore, the output ek0 is input to the latch 13 and delayed by one pixel, and then input to the adder 2 again. The output ek1 is input to the latch 9 and delayed by one pixel, and then input to the adder 10 to be added to the output ek2. Further, the output of the adder 10 is input to the latch 11 to be delayed by one pixel, and then input to the adder 12 to be added to the output ek3. Then, the output of the adder 12 is written in the error buffer 14.
In this embodiment, the place where the error is written is 2
Depending on the direction of the binarization process, it is a position two pixels away from the pixel of interest to the left or right, and the direction of the binarization process is switched line by line.

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

【0030】この様に本発明の第1の実施例によれば重
み係数の分母倍された2値化誤差の値をあらかじめ計算
してテーブルに格納しているので、重み係数毎の乗算器
および除算器を省略することができ、回路規模を小さく
して高速処理が可能となる。更に、入力画素の濃度と周
辺画素から配分された誤差との総和を求め、その総和と
2値化結果との差を重み係数の分母で割り算し、商及び
余りを求め、商はテーブルに格納されている値に基づき
周辺画素に配分するとともに、余りも周辺画素に配分す
ることにより、重み係数にも柔軟性を持たせることがで
きるとともに丸め誤差の値を0から1未満にすることが
できハイライト部分を含め画質を向上することが可能と
なる。
As described above, according to the first embodiment of the present invention, the value of the binarization error obtained by multiplying the denominator of the weighting coefficient is calculated in advance and stored in the table. The divider 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 peripheral pixels is obtained, the difference between the sum and the binarization result is divided by the denominator of the weighting coefficient, the quotient and the remainder are obtained, and the quotient is stored in the table. By allocating to the peripheral pixels based on the value that is set, and allocating the remainder to the peripheral pixels, the weighting coefficient can be made flexible and the value of the rounding error can be reduced from 0 to less than 1. It is possible to improve the image quality including the light portion.

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

【0032】第1の実施例においては、図3に示される
ような誤差配分係数を使用するため誤差配分係数の分母
の数は2のべき乗となっている。従って、第1の実施例
の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 denominator of the error distribution coefficient is a power of two. Therefore, the 1 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, 8-bit input data is input to bits 8 to 15 of the adder 2, and the operation result of the adder 2 corresponds to the upper 9 bits including the sign bit and the remainder to the sign bit and the lower 8 bits. The error distribution table refers to the upper 9 bits output from the adder 2.
As can be seen from the equation (1), the binarization error can be obtained from the value of the high-order 9 bits from the adder 2 without referring to this error data. If there is no problem, there is no problem even if the table is referred to by the value of the upper 9 bits from the adder 2. Further, 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.

【0033】図5に、図4に示した誤差配分テーブルを
更に詳細にしたものを示す。
FIG. 5 shows a more detailed version of the error distribution table shown in FIG.

【0034】以上説明したように第2実施例によれば乗
算器、除算器及び比較器を用いることなく回路規模を小
さくして高速に誤差拡散処理を実行することができ、か
つ重み係数にも柔軟性を持たせることが可能となった。
更に誤差を分配する際の丸め誤差を、0から1未満に抑
えることが可能となりハイライト部分での画質を向上さ
せることが可能となった。
As described above, according to the second embodiment, the circuit scale can be reduced and the error diffusion process can be executed at high speed without using the multiplier, the divider and the comparator, and the weighting coefficient can be used. It became possible to have flexibility.
Furthermore, the rounding error when distributing the error can be suppressed from 0 to less than 1, and the image quality in the highlight part can be improved.

【0035】なお、ここで述べた実施例においては入力
画像ピクセルデータは8ビットの多値画像データであっ
たが、4ビット12ビット、16ビット等の多のビット
数で表されても構わない。また本発明は、8ビット入力
データを2ビット又は3ビットデータに量子化する際に
も適用できる。また、本実施例においては誤差配分窓は
4ピクセルによって構成されていたが、より大きな窓で
あってもあるいは小さな窓であっても同様に構成できる
ことは言うまでもない。
Although the input image pixel data is 8-bit multi-valued image data in the embodiment described here, it 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 when quantizing 8-bit input data into 2-bit or 3-bit data. Further, in the present embodiment, the error distribution window is composed of 4 pixels, but it goes without saying that a larger window or a smaller window can be similarly constructed.

【0036】又、誤差の配分係数も図3に示したものに
限ることなく、他の値を用いることもできる。又、本実
施例の回路を入力カラーの数だけ備えることにより本発
明はカラー画像にも用いることができる。
Further, the error distribution coefficient is not limited to that shown in FIG. 3, and other values can be used. Further, the present invention can be applied to a color image by providing the circuit of this embodiment for the number of input colors.

【0037】[0037]

【発明の効果】以上説明した如く、本発明によれば誤差
データへの重み付けにより発生する丸め誤差の値を1未
満とすることで、特に画像のハイライト部分を高画質化
することができる。
As described above, according to the present invention, by setting the value of the rounding error generated by weighting the error data to be less than 1, it is possible to improve the image quality particularly in the highlight portion of the image.

【0038】又、本発明によれば乗算器及び除算器を省
略でき回路規模が小さくすなわち高速で、かつ、重み係
数に柔軟性を持たせることができるとともに丸め誤差自
身の値を0から1未満にすることにより画質を向上する
ことができる。
Further, according to the present invention, the multiplier and the divider can be omitted, the circuit scale can be small, that is, the weighting coefficient can be made flexible, and the value of the rounding error itself can be reduced from 0 to less than 1. By doing so, the image quality can be improved.

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

【図1】第1の実施例の画像処理装置の構成を示すブロ
ック図
FIG. 1 is a block diagram showing the 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 showing a configuration of an image processing apparatus according to a second embodiment.

【図5】第2の実施例の誤差配分テーブルの詳細を示し
た図
FIG. 5 is a diagram showing details of an error distribution table according to the second embodiment.

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

1 乗算器 2 加算器 3 比較器 4 減算器 5 除算器 6,7,9,11,13 ラッチ 8 誤差配分テーブル 10,12 加算器 14 誤差バッファ 1 Multiplier 2 Adder 3 Comparator 4 Subtractor 5 Divider 6 7,7,9,11,13 Latch 8 Error distribution table 10,12 Adder 14 Error buffer

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 画像データを入力する入力手段と、 前記画像データを量子化処理する処理手段と、 前記量子化処理の際発生する誤差データに重み付けを行
ない、複数の画像データに誤差データを分散する分散手
段とを有し、 前記分散手段は重み付けにより発生する丸め誤差の値を
1未満とすることを特徴とする画像処理装置。
1. An input unit for inputting image data, a processing unit for quantizing the image data, weighting error data generated in the quantizing process, and distributing the error data to a plurality of image data. The image processing apparatus is characterized in that the value of the rounding error generated by weighting is less than 1.
【請求項2】 入力画像の濃度と2値化後の濃度との誤
差を、2値化誤差として着目画素の周辺画素の配分し、
2値化後の平均濃度を入力画像の濃度と等しくする画像
処理方法において、誤差を配分する際の重み係数の分母
倍された値をあらかじめ計算したテーブルを備え、重み
係数の分母倍された入力画素の濃度と、周辺画素から配
分された誤差との総和を求めその総和と2値化結果との
差を重み係数の分母で割り算し、商及び余りを求め、商
は前記テーブルに格納されている値に基づき、周辺画素
に配分するとともに、余りも周辺画素に配分することを
特徴とする画像処理方法。
2. An error between a density of an input image and a density after binarization is distributed as a binarization error to peripheral pixels of a pixel of interest,
An image processing method for making the average density after binarization equal to the density of an input image is provided with a table in which a value obtained by multiplying a denominator of a weighting coefficient when an error is distributed is calculated in advance, and an input obtained by multiplying a denominator of the weighting coefficient is provided. The sum of the pixel density and the error distributed from the peripheral pixels is calculated, and the difference between the sum and the binarization result is divided by the denominator of the weighting coefficient to calculate the quotient and the remainder. The quotient is stored in the table. An image processing method characterized by allocating to the peripheral pixels based on the existing value and allocating the remainder to the peripheral pixels.
【請求項3】 前記重み係数の分母の値を2をべき乗と
することを特徴とする請求項2記載の画像処理方法。
3. The image processing method according to claim 2, wherein the denominator value of the weighting coefficient is a power of 2.
【請求項4】 入力画像の中間レベルの値を重み係数の
分母倍した値を閾値とし、前記総和を前記閾値と比較
し、入力画像濃度の2値化を実行することを特徴とする
請求項2記載の画像処理方法。
4. The binarization of the input image density is performed by using a value obtained by multiplying a value of an intermediate level of the input image by a denominator of a weighting coefficient as a threshold value, comparing the total sum with the threshold value, and binarizing the input image density. 2. The image processing method described in 2.
【請求項5】 2値化結果が1の場合、前記総和と最大
濃度に重み係数の分母倍した値との差を重み係数の分母
で割り算し、2値化結果が0の場合、前記総和と重み係
数の分母で割り算することを特徴とする請求項4記載の
画像処理方法。
5. When the binarization result is 1, the difference between the total sum and the value obtained by multiplying the maximum density by the denominator of the weighting coefficient is divided by the denominator of the weighting coefficient, and when the binarization result is 0, the total sum is obtained. 5. The image processing method according to claim 4, wherein the denominator of the weighting coefficient is used.
【請求項6】 前記商及び余りを求める割り算をビット
シフトにより行なうことを特徴とする請求項2記載の画
像処理方法。
6. The image processing method according to claim 2, wherein the division for obtaining the quotient and the remainder is performed by bit shift.
JP00464794A 1994-01-20 1994-01-20 Image processing method and apparatus Expired - Lifetime JP3200274B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP00464794A JP3200274B2 (en) 1994-01-20 1994-01-20 Image processing method and apparatus
US08/373,843 US5621542A (en) 1994-01-20 1995-01-18 Image processing apparatus and method with weighting of error data generated in quantization
EP95300317A EP0664643B1 (en) 1994-01-20 1995-01-19 Image processing method and apparatus
DE69516193T DE69516193T2 (en) 1994-01-20 1995-01-19 Image processing method and device
AT95300317T ATE191821T1 (en) 1994-01-20 1995-01-19 IMAGE PROCESSING METHOD AND DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00464794A JP3200274B2 (en) 1994-01-20 1994-01-20 Image processing method and apparatus

Publications (2)

Publication Number Publication Date
JPH07212593A true JPH07212593A (en) 1995-08-11
JP3200274B2 JP3200274B2 (en) 2001-08-20

Family

ID=11589762

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00464794A Expired - Lifetime JP3200274B2 (en) 1994-01-20 1994-01-20 Image processing method and apparatus

Country Status (1)

Country Link
JP (1) JP3200274B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011507409A (en) * 2007-12-14 2011-03-03 クゥアルコム・インコーポレイテッド Efficient diffusion dithering using binary fractions

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011507409A (en) * 2007-12-14 2011-03-03 クゥアルコム・インコーポレイテッド Efficient diffusion dithering using binary fractions

Also Published As

Publication number Publication date
JP3200274B2 (en) 2001-08-20

Similar Documents

Publication Publication Date Title
JP4217657B2 (en) Image processing method, program, storage medium, and apparatus
US5172247A (en) High speed digital error diffusion process for continuous tone image-to-binary image conversion
JPH10271331A (en) Image processing method and device therefor
JP4243854B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2006065834A (en) Image processing device and image processing method
EP0664643B1 (en) Image processing method and apparatus
JPH1070660A (en) Error spread method and error spread system
JPH1070661A (en) Error spread method and error spread system
JP4068181B2 (en) Multilevel gradation pixel value level reduction method and system
JP2000022951A (en) Image processing method and image processor
JPH07212593A (en) Method and device for processing picture
JP2000152005A (en) Picture processor
JP3287717B2 (en) Image processing device
JPH0738767A (en) Image binarizing processor
JP3200287B2 (en) Image processing method and apparatus
JP2002094785A (en) Image processing unit, image processing method, and storage medium
JP2859445B2 (en) Image processing apparatus and image processing method
JPH0260770A (en) Image processing system
JP3679522B2 (en) Image processing method and apparatus
JPH11339032A (en) Image processing method and device therefor
JP2000333000A (en) Device and method for image processing
JP3697027B2 (en) Image processing apparatus and method
JP2946217B2 (en) Image processing device
JP4208583B2 (en) Image processing apparatus and method and program thereof
JP3950871B2 (en) Image processing method and apparatus

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: 20010522

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

Free format text: PAYMENT UNTIL: 20080615

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090615

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090615

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100615

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110615

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20130615

Year of fee payment: 12

EXPY Cancellation because of completion of term