JP3200274B2 - Image processing method and apparatus - Google Patents

Image processing method and apparatus

Info

Publication number
JP3200274B2
JP3200274B2 JP00464794A JP464794A JP3200274B2 JP 3200274 B2 JP3200274 B2 JP 3200274B2 JP 00464794 A JP00464794 A JP 00464794A JP 464794 A JP464794 A JP 464794A JP 3200274 B2 JP3200274 B2 JP 3200274B2
Authority
JP
Japan
Prior art keywords
error
density
denominator
value
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.)
Expired - Lifetime
Application number
JP00464794A
Other languages
Japanese (ja)
Other versions
JPH07212593A (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 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 Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Input (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 method and apparatus, and more particularly to a method for quantizing 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 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 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】しかし、この方式を論理回路で実現する
と、上記の例からも解るように重み係数毎の乗算器、除
算器が必要なため回路規模が大きくなってしまい、また
整数演算を行うと丸め誤差(E−(E0+E1+E2+
E3))のために出力画像の平均濃度が入力画像の濃度
と等しくならないという欠点があった。
However, if this method is realized by a logic circuit, as will be understood from the above example, a multiplier and a divider are required for each weight coefficient, so that the circuit scale becomes large. (E- (E0 + E1 + E2 +
E3)) has a disadvantage that 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 problem, Japanese Patent Application Laid-Open No.
JP-A-215169, JP-A-61-52073,
Japanese Patent Application Laid-Open No. 61-293068 discloses a method of reducing the circuit scale by using a shift register in place of a multiplier and a divider by reducing the weighting factor to a power of two. JP-A-63-3507
In Japanese Patent Application Publication No. 4 (1999) -1994, the value of the binarization error weighted in advance is determined for each value of the density information, and the sum of the values is made equal to the binarization error, thereby simplifying the multiplication and division. And a method for eliminating rounding errors has been proposed.

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

【0007】[0007]

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

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

【0009】本発明の他の目的は、重み係数毎の乗算器
及び除算器を省略でき回路規模が小さくすなわち高速
で、かつ、重み係数に柔軟性を持たせることができると
ともに丸め誤差自身の値を0から1未満にすることによ
り画質を向上することができる画像処理方法及び装置の
提供を目的とする。
Another object of the present invention is to omit the multiplier and divider for each weighting factor, to reduce the circuit scale, that is, to increase the speed, to make the weighting factor flexible, and to reduce 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 reducing the value from 0 to less than 1.

【0010】[0010]

【課題を解決するための手段】上述した目的を達成する
ため本発明の画像処理装置によれば、 入力画像の濃度
と量子化後の濃度との誤差を、量子化誤差として着目画
素の周辺画素に配分し、量子化後の平均濃度を入力画像
の濃度と等しくする画像処理装置において、誤差を配分
する際の重み係数の分母倍された値を周辺画素データに
配分する誤差の値として予め計算して記憶している記憶
手段と、重み係数の分母倍された入力画素の濃度と、周
辺画素から配分された誤差との総和を求める演算手段
と、前記演算手段により演算された総和の上位複数ビッ
トデータに基づき前記記憶手段に格納されている誤差を
選択して周辺画素に配分するとともに、前記総和の下位
複数ビットデータを余りデータとして周辺画素に配分す
る配分手段とを有する。
According to the image processing apparatus of the present invention, the error between the density of the input image and the density after the quantization is determined as a quantization error by the peripheral pixels of the target pixel. In the image processing apparatus that distributes the average density after quantization to the density of the input image, the value obtained by multiplying the denominator by the weighting factor when distributing the error is calculated in advance as the value of the error that is distributed to the peripheral pixel data. Memory means for calculating the sum of the density of the input pixel multiplied by the denominator of the weighting coefficient and the error distributed from the surrounding pixels; and a plurality of higher-order sums of the sum calculated by the calculating means. Distribution means for selecting an error stored in the storage means based on the bit data and distributing the selected error to peripheral pixels, and distributing the lower-order multiple bit data of the sum to the peripheral pixels as surplus data. .

【0011】又本発明の画像処理方法によれば、入力画
像の濃度と2値化後の濃度との誤差を、2値化誤差とし
て着目画素の周辺画素の配分し、2値化後の平均濃度を
入力画像の濃度と等しくする画像処理方法において、誤
差を配分する際の重み係数の分母倍された値をあらかじ
め計算したテーブルを備え、重み係数の分母倍された入
力画素の濃度と、周辺画素から配分された誤差との総和
を求めその総和と2値化結果との差を重み係数の分母で
割り算し、商及び余りを求め、商は前記テーブルに格納
されている値に基づき、周辺画素に配分するとともに、
余りも周辺画素に配分する。
According to the image processing method 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 target pixel, and the average after binarization is obtained. In an image processing method for making the density equal to the density of the input image, a table is provided in which the value of the denominator multiplied by the weighting factor at the time of distributing the error is calculated in advance, and the density of the input pixel multiplied by the denominator of the weighting factor and the peripheral The sum of the error distributed from the pixel is obtained, the difference between the sum and the binarization result is divided by the denominator of the weight coefficient, and the quotient and remainder are obtained. The quotient is calculated based on the values stored in the table. While distributing to pixels,
The remainder is allocated to peripheral pixels.

【0012】又本発明の画像処理方法によれば、入力画
像の濃度と量子化後の濃度との誤差を、量子化誤差とし
て着目画素の周辺画素に配分し、量子化後の平均濃度を
入力画像の濃度と等しくする画像処理方法において、誤
差を配分する際の重み係数の分母倍された値を周辺画素
データに配分する誤差の値として予め計算して記憶して
いるテーブルを備え、重み係数の分母倍された入力画素
の濃度と、周辺画素から配分された誤差との総和を求め
その総和の上位複数ビットデータに基づき前記記憶手段
に格納されている誤差を選択して周辺画素に配分すると
ともに、前記総和の下位複数ビットデータを余りデータ
として周辺画素に配分する。
Further, according to the image processing method of the present invention, an error between the density of the input image and the density after quantization is distributed to pixels surrounding the pixel of interest as a quantization error, and the average density after quantization is input. In the image processing method for equalizing the density of an image, a table is provided in which a denominator-multiplied value of a weighting factor when distributing an error is calculated and stored in advance as an error value for distributing to peripheral pixel data, The sum of the density of the input pixel multiplied by the denominator and the error distributed from the surrounding pixels is obtained, and the error stored in the storage means is selected and distributed to the surrounding pixels based on the higher-order plural bit data of the sum. At the same time, the lower-order multi-bit data of the sum is distributed to peripheral pixels as surplus data.

【0013】本発明によれば、重み係数の分母倍された
2値化誤差の値を予め計算してテーブル格納しているの
で、重み係数毎の乗算器及び除算器を省略することがで
き、回路規模を小さくして高速処理が可能となる。更
に、重み係数の分母倍された入力画素の濃度と周辺画素
から配分された誤差との総和を求め、それに基づきテー
ブルに格納されている値の選択と余りを求め周辺画素に
配分するので、重み係数に柔軟性を持たせることができ
るとともに丸め誤差の値を0から1未満にすることがで
き、ハイライト部分を含め画質を向上することが可能と
なる。
According to the present invention, since the value of the binarization error multiplied by the denominator of the weight coefficient is calculated in advance and stored in a table, the multiplier and the divider for each weight coefficient can be omitted. High-speed processing becomes possible by reducing the circuit scale. Further, 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 selection and remainder of the values stored in the table are calculated based on the sum and distributed to the peripheral pixels. The coefficient can be made flexible 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.

【0014】[0014]

【実施例】【Example】

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

【0015】図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.

【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, reference numeral 1 denotes a multiplier.
Is multiplied by the value of the denominator of the distribution coefficient when allocating the error to the 8-bit input data (256 in the case of the distribution coefficient in FIG. 3).
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 "1" corresponding to an intermediate level between 17-bit data from the adder 2 and 8-bit input data.
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 unillustrated inkjet printer or laser beam printer, and an image is formed by turning on and off dots.

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

【0018】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.

【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 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 FIG. 2A is stored in advance for each value of the quotient data from the divider 5. For example, when the quotient is 1 and the remainder is 50, 128 to e0, 71 to e1, 37 to e2, 2 to e3.
0 is distributed to the pixel on the right of e0.
Are distributed.

【0020】9,11,13はラッチであり、データを
1画素遅延させるためのものである。10,12は加算
器であり、誤差データの加算のために用いられる。又、
14は1ライン分のデータを格納可能な誤差バッファで
あり、1ライン、誤差データを遅延させるためのもので
ある。
Latches 9, 11, and 13 are used to delay data by one pixel. The adders 10 and 12 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.

【0021】図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).

【0022】この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 fringe pattern which has been a problem when the error diffusion method is executed.

【0023】次に、処理の流れを説明する。Next, the processing flow 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. In the multiplier 1, the value is multiplied by the value of the denominator of the error distribution coefficient as shown in FIG. In the present embodiment, the value of the denominator of the error distribution coefficient is 256, and the value multiplied by 256 is output from the multiplier 1 and input to the adder 2. The adder 2
The input image data multiplied by the value of 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 side output from the latch 13 ( (Direction processing) or the error from the right side (← 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, when the output of the adder 2 is larger than the threshold value, 1 is output, and when 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, where 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-expanded inside the subtractor 4 and further multiplied by the denominator multiple of the error distribution coefficient. When the binary data is 1, the result is 255 × 256, and when the binary data is 0, the result is 0.
, The binarization error represented by (Equation 1) is calculated. The binarization error calculated by the subtractor 4 is input to a divider 5,
It 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 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 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値化誤差の値ごとにあらか
じめ定められた重み係数の分母倍された値が格納されて
いる。誤差配分テーブル6は図2(a),(b)に示す
ような誤差配分窓に対応した値が格納されており、個々
の値は2値化誤差の値に応じて誤差配分係数の分母倍さ
れているので、それぞれが16ビットの数で表されてい
る。なお本実施例では図2(a),(b)に示すような
左右対称な2つの誤差配分窓を処理方向に応じて1ライ
ンごとに切り替て使用しているが、誤差配分窓は左右対
称なので誤差配分テーブルは1つで十分である。
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 a predetermined denominator by a predetermined weighting factor for each binarization error value. 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. 2A and 2B are used by switching one line at a time in accordance with the processing direction. 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 outputs an error distribution window e shown in FIG.
It corresponds to values to 0, e1, e2, and e3. Therefore, the output ek0 is input to the latch 13, and after being delayed by one pixel, is input again to the adder 2. The output ek1 is input to the latch 9 and a delay of one pixel is added. Then, the output ek1 is input to the adder 10 and added to the output ek2. Further, the output of the adder 10 is input to the latch 11 and a delay corresponding to one pixel is added thereto. 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 2
Depending on the direction of the binarization process, the position is two pixels to the left or right of the target pixel, and the direction of the binarization process is switched every line.

【0029】以上の処理により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.

【0030】この様に本発明の第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 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 surrounding pixels is obtained, and the difference between the sum and the binarization result is divided by the denominator of the weight coefficient to obtain a quotient and a remainder, and the quotient is stored in a table. By allocating the remainder to the peripheral pixels based on the set value, the weight coefficient can be given flexibility and the value of the rounding error can be reduced from 0 to less than 1 by allocating the remainder to the peripheral pixels. It is possible to improve the image quality including the light portion.

【0031】〔第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.

【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 number of denominators 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, the input data of 8 bits is input to bits 8 to 15 of the adder 2, and in the operation result of the adder 2, the upper 9 bits including the sign bit correspond to the quotient, and the sign bit and the lower 8 bits correspond to the remainder. 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.

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

【0034】以上説明したように第2実施例によれば乗
算器、除算器及び比較器を用いることなく回路規模を小
さくして高速に誤差拡散処理を実行することができ、か
つ重み係数にも柔軟性を持たせることが可能となった。
更に誤差を分配する際の丸め誤差を、0から1未満に抑
えることが可能となりハイライト部分での画質を向上さ
せることが可能となった。
As described above, according to the second embodiment, it is possible to execute the error diffusion process 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.

【0035】なお、ここで述べた実施例においては入力
画像ピクセルデータは8ビットの多値画像データであっ
たが、4ビット12ビット、16ビット等の多のビット
数で表されても構わない。また本発明は、8ビット入力
データを2ビット又は3ビットデータに量子化する際に
も適用できる。また、本実施例においては誤差配分窓は
4ピクセルによって構成されていたが、より大きな窓で
あってもあるいは小さな窓であっても同様に構成できる
ことは言うまでもない。
In this embodiment, 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.

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

【0037】[0037]

【0038】[0038]

【発明の効果】以上説明した如く本発明によれば、乗算
器及び除算器を省略でき回路規模を小さくすなわち、高
速で誤差拡散法による処理を行なうことができる。しか
も、重み係数に柔軟性を持たせることができるとともに
丸め誤差自身の値を0から1未満にすることができ、画
質を向上することができる。
As described above, according to the present invention, the multiplier and the divider can be omitted and the circuit scale can be reduced, that is, the processing by the error diffusion method can be performed at high speed. In addition, the weighting coefficient can be given flexibility, and the value of the rounding error itself can be reduced from 0 to less than 1, thereby improving the image quality.

【図面の簡単な説明】[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】第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 誤差バッファ 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

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭64−32765(JP,A) 特開 昭61−293068(JP,A) 特開 昭61−52073(JP,A) 特開 平8−32805(JP,A) 特開 昭63−155951(JP,A) 特開 平2−57365(JP,A) 特開 平3−201677(JP,A) 特公 平5−13421(JP,B2) (58)調査した分野(Int.Cl.7,DB名) H04N 1/405 G06T 5/00 200 H04N 1/40 H04N 1/403 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-64-32765 (JP, A) JP-A-61-293068 (JP, A) JP-A-61-52073 (JP, A) JP-A 8- 32805 (JP, A) JP-A-63-155951 (JP, A) JP-A-2-57365 (JP, A) JP-A-3-201677 (JP, A) JP-B-5-13421 (JP, B2) (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/405 G06T 5/00 200 H04N 1/40 H04N 1/403

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 入力画像の濃度と量子化後の濃度との誤
差を、量子化誤差として着目画素の周辺画素に配分し、
量子化後の平均濃度を入力画像の濃度と等しくする画像
処理装置において、 誤差を配分する際の重み係数の分母倍された値を周辺画
素データに配分する誤差の値として予め計算して記憶し
ている記憶手段と、 重み係数の分母倍された入力画素の濃度と、周辺画素か
ら配分された誤差との総和を求める演算手段と、 前記演算手段により演算された総和の上位複数ビットデ
ータに基づき前記記憶手段に格納されている誤差を選択
して周辺画素に配分するとともに、前記総和の下位複数
ビットデータを余りデータとして周辺画素に配分する配
分手段とを有することを特徴とする画像処理装置。
1. An error between a density of an input image and a density after quantization is distributed as a quantization error to pixels around a pixel of interest.
In an image processing apparatus for equalizing the average density after quantization to the density of an input image, a value multiplied by the denominator of the weighting factor when allocating the error is calculated and stored in advance as an error value to be allocated to peripheral pixel data. Storage means, calculating means for calculating 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, based on the higher-order multi-bit data of the sum calculated by the calculating means An image processing apparatus, comprising: a distribution unit that selects an error stored in the storage unit and distributes it to peripheral pixels, and distributes the lower-order multiple bits data of the total as peripheral data to peripheral pixels.
【請求項2】 入力画像の濃度と2値化後の濃度との誤
差を、2値化誤差として着目画素の周辺画素に配分し、
2値化後の平均濃度を入力画像の濃度と等しくする画像
処理方法において、誤差を配分する際の重み係数の分母
倍された値をあらかじめ計算したテーブルを備え、重み
係数の分母倍された入力画素の濃度と、周辺画素から配
分された誤差との総和を求めその総和と2値化結果との
差を重み係数の分母で割り算し、商及び余りを求め、商
は前記テーブルに格納されている値に基づき、周辺画素
に配分するとともに、余りも周辺画素に配分することを
特徴とする画像処理方法。
2. An error between the density of the input image and the density after binarization is distributed as a binarization error to pixels surrounding the pixel of interest.
In an image processing method for equalizing the average density after binarization with the density of an input image, a table is provided in which a denominator multiplied value of a weighting factor at the time of allocating an error is calculated in advance. The sum of the density of the pixel and the error distributed from the surrounding pixels is obtained, the difference between the sum and the binarization result is divided by the denominator of the weight coefficient to obtain a quotient and a remainder, and the quotient is stored in the table. An image processing method comprising: allocating the remainder to peripheral pixels based on the value of the image data.
【請求項3】 前記重み係数の分母の値を2のべき乗と
することを特徴とする請求項2記載の画像処理方法。
3. The image processing method according to claim 2, wherein the value of the denominator of the weight coefficient is a power of two.
【請求項4】 入力画像の中間レベルの値を重み係数の
分母倍した値を閾値とし、前記総和を前記閾値と比較
し、入力画像濃度の2値化を実行することを特徴とする
請求項2記載の画像処理方法。
4. A binarization of the input image density, wherein a value obtained by multiplying a value of an intermediate level of the input image by a denominator of a weighting coefficient is set as a threshold, and the sum is compared with the threshold. 2. The image processing method according to 2.
【請求項5】 2値化結果が1の場合、前記総和と最大
濃度に重み係数の分母倍した値との差を重み係数の分母
で割り算し、2値化結果が0の場合、前記総和を重み係
数の分母で割り算することを特徴とする請求項4記載の
画像処理方法。
5. When the binarization result is 1, the difference between the sum and the maximum density multiplied by the denominator of the weighting coefficient is divided by the denominator of the weighting coefficient. When the binarization result is 0, the summation is performed. 5. The image processing method according to claim 4, wherein is divided by a denominator of the weight coefficient.
【請求項6】 入力画像の濃度と量子化後の濃度との誤
差を、量子化誤差として着目画素の周辺画素に配分し、
量子化後の平均濃度を入力画像の濃度と等しくする画像
処理方法において、 誤差を配分する際の重み係数の分母倍された値を周辺画
素データに配分する誤差の値として予め計算して記憶し
ているテーブルを備え、 重み係数の分母倍された入力画素の濃度と、周辺画素か
ら配分された誤差との総和を求めその総和の上位複数ビ
ットデータに基づき前記記憶手段に格納されている誤差
を選択して周辺画素に配分するとともに、前記総和の下
位複数ビットデータを余りデータとして周辺画素に配分
することを特徴とする画像処理方法。
6. An error between the density of the input image and the density after quantization is distributed as a quantization error to pixels surrounding the pixel of interest.
In an image processing method for equalizing the average density after quantization to the density of an input image, a value obtained by multiplying a denominator multiplied by a weighting factor when allocating an error is calculated and stored in advance as an error value to be allocated to peripheral pixel data. A sum of the density of the input pixel multiplied by the denominator of the weighting coefficient and the error distributed from the surrounding pixels is obtained, and the error stored in the storage means is determined based on the higher-order multiple-bit data of the sum. An image processing method comprising: selecting and allocating data to peripheral pixels; and allocating lower-order plural-bit data of the sum as residual data to peripheral pixels.
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 JPH07212593A (en) 1995-08-11
JP3200274B2 true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8248660B2 (en) * 2007-12-14 2012-08-21 Qualcomm Incorporated Efficient diffusion dithering using dyadic rationals

Also Published As

Publication number Publication date
JPH07212593A (en) 1995-08-11

Similar Documents

Publication Publication Date Title
EP0356225B1 (en) Image processing apparatus
EP0576786B1 (en) Error diffusion processor and method for converting a grey scale pixel image to a binary value pixel image
US5394250A (en) Image processing capable of handling multi-level image data without deterioration of image quality in highlight areas
US5172247A (en) High speed digital error diffusion process for continuous tone image-to-binary image conversion
EP0664643B1 (en) Image processing method and apparatus
JP3200274B2 (en) Image processing method and apparatus
JP4068181B2 (en) Multilevel gradation pixel value level reduction method and system
US6693727B1 (en) Image processing apparatus for performing high-speed error diffusion
JP3287717B2 (en) Image processing device
JP2000022951A (en) Image processing method and image processor
JPH1093821A (en) Picture data processing method/system
JP3200287B2 (en) Image processing method and apparatus
JP2004096709A (en) Image processing apparatus and image processing method
JP2002094785A (en) Image processing unit, image processing method, and storage medium
JP3225099B2 (en) Image processing device
JP2859445B2 (en) Image processing apparatus and image processing method
JPH0350960A (en) Picture signal processing unit
JP3679522B2 (en) Image processing method and apparatus
JP2000333000A (en) Device and method for image processing
JP2851661B2 (en) Image processing device
JP3943747B2 (en) Image processing apparatus and multi-value processing method
JP4208583B2 (en) Image processing apparatus and method and program thereof
JPH09214758A (en) Picture processor
JPH04156064A (en) Binarizing device
JP2870934B2 (en) Image signal processing device

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