JP2002094785A - Image processing unit, image processing method, and storage medium - Google Patents

Image processing unit, image processing method, and storage medium

Info

Publication number
JP2002094785A
JP2002094785A JP2000285300A JP2000285300A JP2002094785A JP 2002094785 A JP2002094785 A JP 2002094785A JP 2000285300 A JP2000285300 A JP 2000285300A JP 2000285300 A JP2000285300 A JP 2000285300A JP 2002094785 A JP2002094785 A JP 2002094785A
Authority
JP
Japan
Prior art keywords
value
error
data
output
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000285300A
Other languages
Japanese (ja)
Inventor
Yukihisa Ota
享寿 太田
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 JP2000285300A priority Critical patent/JP2002094785A/en
Publication of JP2002094785A publication Critical patent/JP2002094785A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an error diffusion processing unit, whose threshold is variable and attains high-speed processing, using a lookup table. SOLUTION: A calculation section 1 calculates correction input value, on the basis of a density of a target pixel and error data from a pixel, to which n-value processing has already been applied, and an adder 4 sums the calculated correction input value and difference data of the threshold. An output data table 5 receives the sum and outputs corresponding n-value data. A threshold difference calculation section 6 decides the difference data of the threshold value, on the basis of the outputted n-value data. An error calculation table 7 receives the n-value data, outputted from the output data table 5 and outputs a corresponding normalized output value. A sbutractor 8 calculates the difference between the outputted normalized output value and the correction input value, outputted from the calculation section 1 as an n-tuple processing error. An error table 2 receives the calculated n-tuple processing error and outputs a distribution error, that is obtained by multiplying a prescribed weight which corresponds to each peripheral pixel by the n-tuple processing error.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置、画
像処理方法、及び記憶媒体に関し、特に、処理対象の画
素の濃度をn値化し、該対象画素の元の濃度とn値化後
の濃度との差を該対象画素の各周辺画素に重み係数に応
じて配分することを、対象画素を順次変えながら行い、
画像全体での濃度平均値に変化がないようにした誤差拡
散方法を実行する画像処理装置、該画像処理装置に適用
される画像処理方法、及び該画像処理方法を実行するプ
ログラムを記憶した記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, an image processing method, and a storage medium. More particularly, the present invention relates to an image processing apparatus, an image processing method, and a storage medium. Distributing the difference from the density to each peripheral pixel of the target pixel according to the weight coefficient is performed while sequentially changing the target pixel,
Image processing apparatus for executing an error diffusion method in which the density average value does not change in the entire image, image processing method applied to the image processing apparatus, and storage medium storing a program for executing the image processing method About.

【0002】上記画像処理装置は、例えばスキャナなど
の画像入力装置を用いて読み取った多階調画像データ
や、コンピュータを用いて演算された多階調グラフィッ
ク画像データ等を、ディスプレイやプリンタ等を用いて
再生表示させたり、あるいはファクシミリやデジタル複
写機等を用いて再生表示させる際に使用される。
[0002] The above image processing apparatus converts multi-gradation image data read using an image input device such as a scanner or multi-gradation graphic image data calculated using a computer using a display or a printer. This is used when reproducing and displaying by using a facsimile or a digital copying machine.

【0003】[0003]

【従来の技術】従来、多値データを2値で表現する疑似
中間調処理として誤差拡散法が知られている(“An Ada
ptive Algorithm for Spatial Gray Scale” in Societ
y forInformation Display 1975, Symposium Digest of
Technical Papers, 1975, 36)。この方法は、着目画
素をP、その濃度をv、着目画素Pの周辺画素P0,P
1,P2,P3の濃度をそれぞれv0,v1,v2,v
3、2値化のための閾値をTとしたときに、下記に示す
ように、経験的に求めた重み係数W0,W1,W2,W
3を用いて、着目画素Pにおける2値化誤差Eを周辺画
素P0,P1,P2,P3に振り分け、画像全体の平均
濃度を元画像の平均濃度と等しくする方法である。
2. Description of the Related Art Conventionally, an error diffusion method has been known as a pseudo halftone process for expressing multi-value data in binary (“An Ada
ptive Algorithm for Spatial Gray Scale ”in Societ
y forInformation Display 1975, Symposium Digest of
Technical Papers, 1975, 36). In this method, the target pixel is P, the density is v, and the peripheral pixels P0, P
The concentrations of P1, P2, and P3 are v0, v1, v2, and v, respectively.
3, when the threshold value for binarization is T, as shown below, empirically obtained weighting factors W0, W1, W2, W
3, the binarization error E in the target pixel P is distributed to the peripheral pixels P0, P1, P2, and P3, and the average density of the entire image is made equal to the average density of the original image.

【0004】すなわち、着目画素Pにおける2値化後の
データをoとすると v≧Tならば、o=1, E=v−Vmax ....(1a) v<Tならば、o=0, E=v−Vmin ....(1b) ただし、Vmaxは最大濃度、Vminは最小濃度であ
る。そして、2値化誤差Eを振り分けられた後の周辺画
素P0,P1,P2,P3の各データを v0=v0+E×W0 ....(2) v1=v1+E×W1 ....(3) v2=v2+E×W2 ....(4) v3=v3+E×W3 ....(5) とする。なお、重み係数は、例えばW0=7/16、W
=1/16、W2=5/16、W3=3/16である。
That is, if the binarized data at the pixel of interest P is o, if v ≧ T, then o = 1, E = v−Vmax. . . . (1a) If v <T, then o = 0, E = v−Vmin. . . . (1b) where Vmax is the maximum density and Vmin is the minimum density. Then, each data of the peripheral pixels P0, P1, P2, and P3 after the binarization error E is distributed is represented by v0 = v0 + E × W0. . . . (2) v1 = v1 + E × W1. . . . (3) v2 = v2 + E × W2. . . . (4) v3 = v3 + E × W3. . . . (5) The weight coefficient is, for example, W0 = 7/16, W
= 1/16, W2 = 5/16, and W3 = 3/16.

【0005】しかし、こうした数式に基づく誤差拡散法
を論理回路で実現しようとすると、重み係数W0,W
1,W2,W3毎の乗算器及び除算器が必要となるた
め、論理回路の回路規模が大きくなってしまう。また整
数演算を行うと丸め誤差(E−E×W0−E×W1−E
×W2−E×W3)のために平均濃度が元画像の濃度と
等しくならなくなるという欠点があった。
However, if the error diffusion method based on such an equation is to be realized by a logic circuit, the weighting factors W0, W
Since a multiplier and a divider for each of W1, W2, and W3 are required, the circuit scale of the logic circuit increases. When an integer operation is performed, a rounding error (E−E × W0−E × W1−E)
× W2−E × W3), there is a disadvantage that the average density is not equal to the density of the original image.

【0006】これを解決する方法として、特開昭58−
215169号公報、特開昭61−52073号公報、
特開昭61−293068号公報によって、重み係数を
2のべき乗分の1にすることにより乗算器および除算器
の代わりにシフトレジスタを用いて回路規模を小さくす
る方法が提案されている。また、特公平5−13421
号公報によって、濃度情報の値ごとに、あらかじめ重み
付けされた2値化誤差の値を決め、かつその値の合計が
2値化誤差と等しくなるようにすることにより、乗算お
よび除算を簡略化し、かつ丸め誤差をなくす方法が提案
されている。また、特開昭63−155950号公報、
特開昭63−155951号公報、特開昭63−155
953号公報、特開昭63−155954号公報、特開
昭63−212274号公報、特開平1−18369号
公報によって、重み付けされた周辺画素内に丸め誤差を
加えることにより平均濃度が元画像の濃度と等しくなる
ようにする方法が提案されている。
As a method for solving this problem, Japanese Patent Laid-Open No.
JP-A-215169, JP-A-61-52073,
Japanese Patent Application Laid-Open No. 61-293068 proposes a method of reducing the circuit scale by using a shift register instead of a multiplier and a divider by setting the weighting factor to a power of two. In addition, Japanese Patent Publication No. 5-13421
According to the publication, 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, A method for eliminating rounding errors has been proposed. Also, JP-A-63-155950,
JP-A-63-155951 and JP-A-63-155
No. 953, JP-A-63-155954, JP-A-63-212274, and JP-A-1-18369, the average density of the original image is increased by adding a rounding error to the weighted peripheral pixels. A method has been proposed to make the value equal to.

【0007】ところが、シフトレジスタを用いる方法で
は重み係数が2のべき乗分の1に固r定されてしまい、
柔軟性が乏しいという欠点があり、また、あらかじめ重
み付けされた2値化誤差の値を決め、かつその値の合計
が2値化誤差と等しくなるようにする方法、および重み
付けされた周辺画素内に丸め誤差を加える方法では、平
均濃度は元画像の濃度と等しくなるが、整数演算を行っ
ているので丸め誤差自身の絶対値は0または1以上にな
ってしまい、誤差の影響を受けやすいハイライト部分で
の画質が劣化するという欠点があった。
However, in the method using the shift register, the weighting factor is fixed at a power of 2 and is fixed.
It has the disadvantage of lacking flexibility, and also has a method of determining a value of a pre-weighted binarization error and making the sum of the values equal to the binarization error. In the method of adding the rounding error, the average density is equal to the density of the original image. However, since the integer operation is performed, the absolute value of the rounding error itself becomes 0 or 1 or more. There is a disadvantage that the image quality is deteriorated.

【0008】これらの欠点を克服するために、特開平7
−212593号公報によって、ルックアップテーブル
(LUT)を用いた高速かつ精度良く処理を行う方法が
提案されている。
In order to overcome these disadvantages, Japanese Patent Laid-Open No.
Japanese Patent Application Laid-Open No. -212593 proposes a method of performing processing at high speed and with high accuracy using a look-up table (LUT).

【0009】一方、低濃度域のドットの生成等を改善す
るために、特開平7−111591号公報によって、入
力データの値に応じて閾値レベルを変動させる手法が提
案されている。
On the other hand, in order to improve the generation of dots in a low-density region and the like, Japanese Unexamined Patent Publication No. Hei 7-111591 proposes a method of changing a threshold level according to the value of input data.

【0010】また、特開平4−213964号公報によ
って、既に出力されたデータを考慮することにより、閾
値近傍入力での画質を改善する手法が提案されている。
Japanese Patent Application Laid-Open No. Hei 4-213964 proposes a method for improving the image quality in the vicinity of the threshold value by considering already output data.

【0011】[0011]

【発明が解決しようとする課題】しかしながら、特開平
7−111591号公報および特開平4−213964
号公報で提案されたような可変閾値を採用する誤差拡散
処理において、特開平7−212593号公報で提案さ
れたようなLUTを用いた処理方法を採用しようとした
場合に、特開平7−111591号公報および特開平4
−213964号公報に示されたいずれの方法において
も、入力データの値に応じて、または既に出力されたデ
ータに応じて閾値を変動させるために、特開平7−21
2593号公報で提案された処理方法を採用することは
できず、処理の高速化が図れないという問題があった。
SUMMARY OF THE INVENTION However, Japanese Patent Application Laid-Open Nos. Hei 7-111591 and Hei 4-213964 are known.
In an error diffusion process using a variable threshold as proposed in Japanese Patent Application Laid-Open No. 7-112593, when an attempt is made to adopt a processing method using an LUT as proposed in Japanese Patent Application Laid-Open No. 7-212593, Patent Publication
In any of the methods disclosed in JP-A-213964, in order to change the threshold according to the value of input data or the data already output, Japanese Patent Laid-Open No.
There is a problem that the processing method proposed in Japanese Patent No. 2593 cannot be adopted, and the processing cannot be sped up.

【0012】すなわち、特開平7−212593号公報
に示される処理方法においては、閾値を固定値とするこ
とによって、あらかじめLUTのデータを算出すること
ができるが、閾値を変動させてしまうと、LUTのデー
タを算出することは不可能であった。したがって、可変
閾値を採用する誤差拡散処理において、特開平7−21
2593号公報で提案されたようなLUTを用いた処理
方法を採用することができなかった。
That is, in the processing method disclosed in Japanese Patent Application Laid-Open No. Hei 7-212593, the LUT data can be calculated in advance by setting the threshold value to a fixed value. Was impossible to calculate. Therefore, in the error diffusion process employing the variable threshold,
The processing method using the LUT as proposed in Japanese Patent No. 2593 cannot be adopted.

【0013】本発明はこのような問題点に鑑みてなされ
たものであって、閾値が可変な誤差拡散処理装置におい
てルックアップテーブルを用いた高速処理を可能とする
画像処理装置、画像処理方法、及び記憶媒体を提供する
ことを目的とする。
The present invention has been made in view of such a problem, and an image processing apparatus, an image processing method, and an image processing method that enable high-speed processing using a look-up table in an error diffusion processing apparatus having a variable threshold value. And a storage medium.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明によれば、処理対象の画素の濃
度をn値化し、該対象画素の元の濃度とn値化後の濃度
との差を該対象画素の各周辺画素に重み係数に応じて配
分することを、対象画素を順次変えながら行い、画像全
体での濃度平均値に変化がないようにした誤差拡散方法
を実行する画像処理装置において、入力画像データに含
まれる処理対象の画素の濃度値と、既にn値化処理が終
了した画素からの誤差データとから補正入力値を算出す
る計算手段と、前記計算手段によって算出された補正入
力値と閾値の差分データとを加算する加算手段と、前記
加算手段から出力された加算値を入力値とし、対応する
n値データを出力する出力データテーブルと、前記出力
データテーブルから出力されたn値データを基に閾値の
差分データを決定し、前記加算手段に出力する閾値差分
計算手段と、前記出力データテーブルから出力されたn
値データを入力値とし、対応する正規化出力値を出力す
る誤差計算テーブルと、前記誤差計算テーブルから出力
された正規化出力値と前記計算手段から出力された補正
入力値との差をn値化誤差として算出する減算手段と、
前記減算手段によって算出されたn値化誤差を入力値と
し、該n値化誤差に各周辺画素に対応の所定の重み係数
を乗算することによって得られる配分誤差を出力する誤
差テーブルとを有することを特徴とする。
To achieve the above object, according to the first aspect of the present invention, the density of a pixel to be processed is converted into an n-value, and the original density of the target pixel and the n-value Is distributed to each peripheral pixel of the target pixel according to the weighting coefficient while sequentially changing the target pixel, so that the average density value of the entire image does not change. Calculating means for calculating a corrected input value from a density value of a pixel to be processed included in the input image data and error data from a pixel for which n-value processing has already been completed; Adding means for adding the correction input value calculated by the above and the difference data of the threshold value; an output data table for receiving the added value output from the adding means as an input value and outputting corresponding n-value data; Table Determining the difference data threshold based on the outputted n value data, and a threshold difference calculation means for outputting to said adding means, output from the output data table n
Value data as an input value, an error calculation table for outputting a corresponding normalized output value, and a difference between a normalized output value output from the error calculation table and a correction input value output from the calculation means is represented by an n-value Subtraction means for calculating as a conversion error,
An error table that outputs an allocation error obtained by multiplying the n-valued error by a predetermined weight coefficient corresponding to each peripheral pixel to the n-valued error as an input value, It is characterized by.

【0015】請求項5記載の発明によれば、入力画像の
各画素において着目画素の濃度と該着目画素のn値化後
の濃度との誤差を、n値化誤差として該着目画素の周辺
画素に配分し、前記入力画像のn値化後の平均濃度を該
入力画像の元の平均濃度と等しくするようにしてn値化
処理を行う画像処理装置において、着目画素の濃度値
と、既にn値化処理が終了した画素からの誤差データと
から補正入力値を算出する計算手段と、前記計算手段に
よって算出された補正入力値と閾値の差分データとを加
算する加算手段と、前記加算手段から出力された加算値
を入力値とし、対応するn値データを出力する出力デー
タテーブルと、前記出力データテーブルから出力された
n値データを基に閾値の差分データを決定し、前記加算
手段に出力する閾値差分計算手段と、前記出力データテ
ーブルから出力されたn値データを入力値とし、対応す
る正規化出力値を出力する誤差計算テーブルと、前記誤
差計算テーブルから出力された正規化出力値と前記計算
手段から出力された補正入力値との差をn値化誤差とし
て算出する減算手段と、前記減算手段によって算出され
たn値化誤差を入力値とし、該n値化誤差に各周辺画素
に対応の所定の重み係数を乗算することによって得られ
る配分誤差を出力する誤差テーブルとを有することを特
徴とする。
According to the fifth aspect of the present invention, an error between the density of the target pixel and the density of the target pixel after being converted to n-value in each pixel of the input image is determined as an n-valued error by the peripheral pixels of the target pixel. In the image processing apparatus that performs the n-value processing by making the average density after the n-value conversion of the input image equal to the original average density of the input image, the density value of the pixel of interest is already Calculating means for calculating a correction input value from the error data from the pixel for which the binarization processing has been completed; addition means for adding the correction input value calculated by the calculation means to the difference data of the threshold value; An output data table that outputs the added value as an input value and outputs corresponding n-value data, and a threshold difference data is determined based on the n-value data output from the output data table, and is output to the adding means. Threshold A minute calculating means, an n-value data output from the output data table as an input value, an error calculation table for outputting a corresponding normalized output value, a normalized output value output from the error calculation table, and the calculation Subtraction means for calculating a difference between the correction input value output from the means as an n-valued error, and an n-valued error calculated by the subtraction means as an input value, the n-valued error corresponding to each peripheral pixel. And an error table for outputting a distribution error obtained by multiplying the predetermined weighting coefficient.

【0016】また、請求項9記載の発明によれば、入力
画像に対してn値化処理を行う画像処理装置に適用され
る画像処理方法において、着目画素の濃度値と、既にn
値化処理が終了した画素からの誤差データとから補正入
力値を算出する計算ステップと、前記計算ステップによ
って算出された補正入力値と閾値の差分データとを加算
する加算ステップと、前記加算ステップによって得られ
る各加算値に対応したn値データを格納した出力データ
テーブルを参照して、前記加算ステップによって得られ
た加算値に対応するn値データを読み出す第1の読出ス
テップと、前記第1の読出ステップによって読み出され
たn値データを基に閾値の差分データを決定し、前記加
算ステップによる加算処理に供する閾値差分計算ステッ
プと、前記第1の読取ステップによって読み出される各
n値データに対応した正規化出力値を格納した誤差計算
テーブルを参照して、前記第1の読取ステップによって
読み出されたn値データに対応した正規化出力値を読み
出す第2の読出ステップと、前記第2の読出ステップに
よって読み出された正規化出力値と前記計算ステップに
よって算出された補正入力値との差をn値化誤差として
算出する減算ステップと、前記減算ステップによって算
出される各n値化誤差に対応した、n値化誤差の各周辺
画素に対する配分誤差を格納した誤差テーブルを参照し
て、前記減算ステップによって算出されたn値化誤差に
対応した各配分誤差を読み出す第3の読出ステップとを
有することを特徴とする。
According to the ninth aspect of the present invention, in an image processing method applied to an image processing apparatus for performing an n-value conversion process on an input image, the density value of the pixel of interest and n
A calculation step of calculating a correction input value from the error data from the pixel for which the binarization process has been completed, an addition step of adding the correction input value calculated in the calculation step, and a difference data of a threshold value, A first reading step of reading n-value data corresponding to the added value obtained in the adding step with reference to an output data table storing n-value data corresponding to each obtained added value; The threshold value difference data is determined based on the n-value data read in the reading step, and the threshold value difference calculation step for use in the adding process in the adding step is performed. The threshold difference calculation step corresponds to each of the n-value data read in the first reading step. The n value read in the first reading step is referred to an error calculation table storing the normalized output value obtained. A second reading step of reading a normalized output value corresponding to the data, and an n-value representing a difference between the normalized output value read by the second reading step and the correction input value calculated by the calculation step. A subtraction step of calculating as a binarization error, and an error table storing distribution errors of the n-level error to each of the peripheral pixels corresponding to each of the n-level errors calculated in the subtraction step. Reading out each distribution error corresponding to the calculated n-valued error.

【0017】さらに、請求項13記載の発明によれば、
入力画像に対してn値化処理を行う画像処理装置に適用
される画像処理方法をプログラムとして記憶した、コン
ピュータにより読み出し可能な記憶媒体において、前記
画像処理方法が、着目画素の濃度値と、既にn値化処理
が終了した画素からの誤差データとから補正入力値を算
出する計算ステップと、前記計算ステップによって算出
された補正入力値と閾値の差分データとを加算する加算
ステップと、前記加算ステップによって得られる各加算
値に対応したn値データを格納した出力データテーブル
を参照して、前記加算ステップによって得られた加算値
に対応するn値データを読み出す第1の読出ステップ
と、前記第1の読出ステップによって読み出されたn値
データを基に閾値の差分データを決定し、前記加算ステ
ップによる加算処理に供する閾値差分計算ステップと、
前記第1の読取ステップによって読み出される各n値デ
ータに対応した正規化出力値を格納した誤差計算テーブ
ルを参照して、前記第1の読取ステップによって読み出
されたn値データに対応した正規化出力値を読み出す第
2の読出ステップと、前記第2の読出ステップによって
読み出された正規化出力値と前記計算ステップによって
算出された補正入力値との差をn値化誤差として算出す
る減算ステップと、前記減算ステップによって算出され
る各n値化誤差に対応した、n値化誤差の各周辺画素に
対する配分誤差を格納した誤差テーブルを参照して、前
記減算ステップによって算出されたn値化誤差に対応し
た各配分誤差を読み出す第3の読出ステップとを有する
ことを特徴とする。
Further, according to the thirteenth aspect of the present invention,
In a computer-readable storage medium storing, as a program, an image processing method applied to an image processing apparatus that performs an n-value conversion process on an input image, the image processing method determines whether a density value of a target pixel is a calculating step of calculating a correction input value from error data from a pixel for which the n-value processing has been completed; an adding step of adding the correction input value calculated by the calculating step to a threshold difference data; A first reading step of reading n-value data corresponding to the added value obtained in the adding step with reference to an output data table storing n-value data corresponding to each added value obtained in the first step; Determining the difference data of the threshold value based on the n-value data read in the reading step, and performing the adding process in the adding step. And the threshold value difference calculation step to be subjected,
With reference to an error calculation table storing normalized output values corresponding to respective n-value data read in the first reading step, normalization corresponding to the n-value data read in the first reading step A second reading step of reading an output value, and a subtraction step of calculating a difference between the normalized output value read by the second reading step and the correction input value calculated by the calculation step as an n-valued error And an error table storing the distribution error of the n-valued error to each peripheral pixel corresponding to each of the n-valued errors calculated in the subtraction step, and referring to the error table calculated in the subtraction step. And a third reading step of reading out each distribution error corresponding to.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施の形態を、図
面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0019】(第1の実施の形態)図1は、本発明に係
る画像処理装置の第1の実施の形態の構成を示すブロッ
ク図である。第1の実施の形態における画像処理装置で
は、8ビットの多値画像データを受け取り、誤差拡散法
による2値化を行って2値化データを出力する。なお、
第1の実施の形態では2値化を行う一方、後述の第2の
実施の形態では3値化を行い、第2の実施の形態の説明
でも図1を流用する。そのため、図1では出力データを
「n bits」と表記するが、第1の実施の形態で
は、出力データは1ビット2値データとなる。
(First Embodiment) FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to a first embodiment of the present invention. The image processing apparatus according to the first embodiment receives 8-bit multi-valued image data, performs binarization by an error diffusion method, and outputs binary data. In addition,
While binarization is performed in the first embodiment, ternarization is performed in a second embodiment described later, and FIG. 1 is also used in the description of the second embodiment. Therefore, in FIG. 1, the output data is described as “n bits”, but in the first embodiment, the output data is 1-bit binary data.

【0020】図1において、外部から入力される入力画
像ピクセルデータは8ビットの多値画像データであり、
計算部1に入力される。
In FIG. 1, input image pixel data input from the outside is 8-bit multi-valued image data.
It is input to the calculation unit 1.

【0021】図4は計算部1の内部構成を示すブロック
図である。
FIG. 4 is a block diagram showing the internal configuration of the calculation unit 1.

【0022】図4において、まず入力画像ピクセルデー
タは、RAM(ランダムアクセスメモリ)またはROM
(リードオンリーメモリ)によって構成されるルックア
ップテーブル(LUT)1−1に入力される。LUT1
−1は、疑似階調処理される入力データに対する出力の
線形性を補償するためのもので、8ビットの入力に対し
て14ビットの値が加算器1−2に出力される。加算器
1−2は、このLUT1−1からの出力の他、ラッチ1
−4から入力される丸め誤差と、後述のデコーダ14か
ら入力される前ラインからの誤差と、後述の誤差テーブ
ル2から入力される出力値e0であって左または右横ピ
クセルからの誤差とを足し合わせ、入力補正値を出力す
る。
In FIG. 4, first, the input image pixel data is stored in a RAM (random access memory) or a ROM.
(Read-only memory) is input to a look-up table (LUT) 1-1. LUT1
-1 is for compensating the linearity of the output with respect to the input data subjected to the pseudo gradation processing, and a 14-bit value is output to the adder 1-2 with respect to the 8-bit input. The adder 1-2 outputs the latch 1 in addition to the output from the LUT 1-1.
-4, an error from a previous line input from a decoder 14 described later, and an output value e0 input from an error table 2 described later and an error from a left or right horizontal pixel. Output the input correction value.

【0023】第1の実施の形態においては、図3に示す
ような誤差配分係数を使用する。この誤差配分係数の分
母の数は2のべき乗となっており、加算器1−2の演算
結果は、符号ビットを含む上位10ビットが商に、符号
ビットおよび下位6ビットが余りに相当する。この結
果、商は図1に示す加算器4に送られて、出力データテ
ーブル5を参照するための参照値となり、一方余りは1
未満の丸め誤差となってラッチ1−3に入力される。ラ
ッチ1−3およびラッチ1−4は後述の誤差テーブル2
によって丸め誤差を周辺画素に配分するために必要な遅
延を行うもので、ここで2画素分の遅延が行われた後、
再び加算器1−2に入力される。なお、以上の計算部1
の動作については、特開平7−212593号公報に詳
述されている。
In the first embodiment, an error distribution coefficient as shown in FIG. 3 is used. The number of denominators of this error distribution coefficient is a power of 2, and the operation result of the adder 1-2 is such that the upper 10 bits including the sign bit correspond to the quotient, and the sign bit and the lower 6 bits correspond to the remainder. As a result, the quotient is sent to the adder 4 shown in FIG. 1 and becomes a reference value for referring to the output data table 5, while the remainder is 1
Is input to the latches 1-3 as a rounding error less than Latches 1-3 and 1-4 are provided in an error table 2 described later.
Performs a delay necessary for distributing the rounding error to the peripheral pixels, and after a delay of two pixels is performed,
It is again input to the adder 1-2. The above calculation unit 1
Is described in detail in JP-A-7-212593.

【0024】計算部1から出力される入力補正値は10
ビットの値として、加算器4に入力される。
The input correction value output from the calculation unit 1 is 10
The value is input to the adder 4 as a bit value.

【0025】図1に戻って、加算器4は、計算部1から
の入力補正値と後述の閾値差分計算部6からの閾値差分
とを加算し、その加算結果を10ビットの値として出力
データテーブル5に出力する。
Returning to FIG. 1, the adder 4 adds the input correction value from the calculation unit 1 and a threshold difference from a threshold difference calculation unit 6 described later, and outputs the addition result as a 10-bit value as output data. Output to Table 5.

【0026】図6は、出力データテーブル5に格納され
るデータの一例を示す図である。
FIG. 6 is a diagram showing an example of data stored in the output data table 5.

【0027】出力データテーブル5には、加算器4から
送られた入力値に対応して出力される2値化データが格
納されている。すなわち、出力データテーブル5には、
入力値が閾値(第1の実施の形態の場合には128)よ
りも小さい場合には0が、また閾値以上の場合には1が
出力値として格納されており、入力値に応じた2値化デ
ータが出力される。
The output data table 5 stores binary data output corresponding to the input value sent from the adder 4. That is, in the output data table 5,
When the input value is smaller than the threshold value (128 in the first embodiment), 0 is stored as the output value, and when the input value is larger than the threshold value, 1 is stored as the output value. Coded data is output.

【0028】出力データテーブル5からの出力値は、閾
値差分計算部6、誤差計算テーブル7およびエンコーダ
12へ送られる。
The output value from the output data table 5 is sent to the threshold difference calculator 6, error calculation table 7, and encoder 12.

【0029】誤差計算テーブル7は、図5に示すような
ルックアップテーブルにより構成されており、出力デー
タテーブル5から送られる入力値0,1に応じて、0,
255を出力値としてそれぞれ出力する。これは、2値
化された値を0,255のいずれかにそれぞれ正規化し
て出力することを意味している。この正規化出力値は減
算器8に送られ、減算器8は、計算部1から送られる入
力補正値とこの正規化出力値との差を算出して、2値化
誤差として誤差テーブル2に出力する。
The error calculation table 7 is constituted by a look-up table as shown in FIG. 5, wherein 0, 1 is input in accordance with input values 0, 1 sent from the output data table 5.
255 are output as output values. This means that the binarized value is normalized to either 0 or 255 and output. This normalized output value is sent to the subtractor 8, which calculates the difference between the input correction value sent from the calculation unit 1 and this normalized output value, and outputs the difference as a binarization error to the error table 2. Output.

【0030】誤差テーブル2はRAMまたはROMによ
って構成されるルックアップテーブルであり、入力値に
対応した配分誤差があらかじめ計算されて格納されてい
る。
The error table 2 is a look-up table constituted by a RAM or a ROM, in which a distribution error corresponding to an input value is calculated in advance and stored.

【0031】図12は、誤差テーブル2の一例を示す図
である。
FIG. 12 is a diagram showing an example of the error table 2.

【0032】誤差テーブル2は減算器8からの2値化誤
差を入力値として、同誤差を図3に示した誤差配分係数
に従って配分計算して得られた配分誤差値が各周辺画素
毎に出力値e0,e1,e2,e3として格納されてい
る。実際には、出力値e0,e1,e2,e3は、対応
する2値化誤差に、図3に示した誤差配分係数の分子を
乗算して得られる値となっている。
The error table 2 receives the binarization error from the subtractor 8 as an input value, and outputs an allocation error value obtained by calculating the error according to the error allocation coefficient shown in FIG. 3 for each peripheral pixel. The values are stored as values e0, e1, e2, and e3. Actually, the output values e0, e1, e2, and e3 are values obtained by multiplying the corresponding binarization error by the numerator of the error distribution coefficient shown in FIG.

【0033】なお、第1の実施の形態では、図2に示す
ような左右対称な2つの誤差配分窓を、処理方向に応じ
てmラスタ(m≧1)ごとに切り替えて使用している
が、誤差配分窓は左右対称なので誤差テーブル2はそれ
ぞれ1つ備えるだけで十分である。
In the first embodiment, two symmetric error distribution windows as shown in FIG. 2 are used by switching every m rasters (m ≧ 1) according to the processing direction. Since the error distribution windows are symmetrical, it is sufficient to provide only one error table 2 for each.

【0034】誤差テーブル2の出力値e0は計算部1に
送られ、また出力値e1,e2,e3は誤差計算部11
へ送られる。
The output value e0 of the error table 2 is sent to the calculation unit 1, and the output values e1, e2 and e3 are output to the error calculation unit 11
Sent to

【0035】図9は、誤差計算部11の内部構成を示す
ブロック図である。
FIG. 9 is a block diagram showing the internal configuration of the error calculator 11.

【0036】誤差計算部11は、それぞれ1画素分の遅
延を行うラッチ11−1,11−3と、配分誤差の加算
を行う加算器11−2,11−4とにより構成され、2
画素分後の画素における配分誤差が計算される。誤差計
算部11の出力は、出力データテーブル5からの出力デ
ータとともにエンコーダ12に入力される。
The error calculation unit 11 is composed of latches 11-1 and 11-3 for delaying one pixel, and adders 11-2 and 11-4 for adding distribution errors.
The distribution error in the pixel after the pixel is calculated. The output of the error calculator 11 is input to the encoder 12 together with the output data from the output data table 5.

【0037】図10は、エンコーダ12の内部構成を示
すブロック図である。
FIG. 10 is a block diagram showing the internal configuration of the encoder 12.

【0038】エンコーダ12は、ラッチ12−2,12
−3,12−4と、シフトレジスタ12−1と、論理和
回路12−5とにより構成され、出力データテーブル5
からの出力データと誤差計算部11からの誤差データと
が同期してエンコードされ、出力される。
The encoder 12 includes latches 12-2, 12
-3, 12-4, a shift register 12-1, and an OR circuit 12-5.
And the error data from the error calculator 11 are synchronously encoded and output.

【0039】エンコーダ12の出力は誤差/出力データ
バッファ13の所定の位置に書き込まれる。
The output of the encoder 12 is written to a predetermined position of the error / output data buffer 13.

【0040】誤差/出力データバッファ13は、1ライ
ン分のデータを格納可能であり、誤差データを1ライン
分遅延させるためのものである。入力画像データの1ラ
イン毎に左から右への→方向への処理と、右から左への
←方向への処理とが切り替えられる。エンコーダ12か
らの出力データの誤差/出力データバッファ13への格
納位置は、→方向への処理の場合と、←方向への処理の
場合とで変化する。この制御は、不図示の制御回路によ
り実行される。
The error / output data buffer 13 can store one line of data and delays the error data by one line. For each line of the input image data, processing in the left-to-right direction and processing in the right-to-left direction are switched. The error data output from the encoder 12 and the storage position of the output data in the output data buffer 13 change between processing in the direction of → and processing in the direction of ←. This control is executed by a control circuit (not shown).

【0041】誤差/出力データバッファ13からは、所
定の位置からデータが読み出されてデコーダ14,15
に送られる。なお、以上の誤差テーブル2、誤差計算部
11、誤差/出力データバッファ13等の動作について
は、特開平7−212593号公報に詳述されている。
Data is read from the error / output data buffer 13 from a predetermined position and is supplied to the decoders 14 and 15.
Sent to The operations of the error table 2, the error calculator 11, the error / output data buffer 13, and the like are described in detail in JP-A-7-212593.

【0042】図11は、デコーダ14,15での動作を
示す図である。
FIG. 11 is a diagram showing the operation of the decoders 14 and 15.

【0043】デコーダ14,15では、前ラインの出力
データと誤差データとに分離され、出力データは閾値差
分計算部6へ、誤差データは計算部1の加算器1−2へ
出力される。
In the decoders 14 and 15, the output data of the previous line and the error data are separated, and the output data is output to the threshold difference calculator 6 and the error data is output to the adder 1-2 of the calculator 1.

【0044】図7は、閾値差分計算部6の内部構成を示
すブロック図である。
FIG. 7 is a block diagram showing the internal configuration of the threshold difference calculator 6.

【0045】閾値差分計算部6では、ドットカウント部
6−15が、着目ラインの既に2値化された8ピクセル
分のデータと、前ラインの8ピクセル分の2値化データ
との中のドット数をカウントし、閾値差分決定部6−1
6が、そのカウント数に基づいて閾値との差分を決定す
る。
In the threshold difference calculating section 6, the dot counting section 6-15 converts the dots in the binarized data of eight pixels of the line of interest and the binarized data of eight pixels of the previous line. The number is counted, and a threshold difference determining unit 6-1 is performed.
6 determines the difference from the threshold based on the count number.

【0046】ここで閾値差分決定部6−16はLUTに
よって構成されており、あらかじめ入力値(第1の実施
の形態では0〜16)に対応した値が格納されている。
図8に処理の両方向に対する閾値差分計算窓を示す。
Here, the threshold difference determining section 6-16 is constituted by an LUT, and stores values corresponding to input values (0 to 16 in the first embodiment) in advance.
FIG. 8 shows threshold difference calculation windows for both directions of the process.

【0047】以上の構成により、1入力データに対する
2値化処理が行われ、以上の処理を処理方向に1ピクセ
ルずつずらして繰り返し実行することにより画像全体に
対する疑似階調処理が可能となる。
With the above configuration, the binarization processing is performed on one input data, and the above processing is repeatedly executed while shifting one pixel at a time in the processing direction, thereby enabling pseudo gradation processing on the entire image.

【0048】(第2の実施の形態)次に第2の実施の形
態を説明する。
(Second Embodiment) Next, a second embodiment will be described.

【0049】第2の実施の形態の構成は、基本的に第1
の実施の形態の構成と同じであるので、第2の実施の形
態の説明においては、第1の実施の形態の構成を流用す
る。
The configuration of the second embodiment is basically similar to that of the first embodiment.
Since the configuration is the same as that of the first embodiment, the configuration of the first embodiment will be used in the description of the second embodiment.

【0050】第2の実施の形態では、誤差計算テーブル
および出力データテーブルが、第1の実施の形態と異な
っている。
In the second embodiment, an error calculation table and an output data table are different from those in the first embodiment.

【0051】図13は、第2の実施の形態における誤差
計算テーブルの一例を示す図であり、図14は、第2の
実施の形態における出力データテーブルの一例を示す図
である。
FIG. 13 is a diagram showing an example of an error calculation table according to the second embodiment, and FIG. 14 is a diagram showing an example of an output data table according to the second embodiment.

【0052】第1の実施の形態においては2値化処理を
行っているが、第2の実施の形態においては3値化処理
を行う。3値化処理を行うには、図13及び図14に示
す誤差計算テーブルおよび出力データテーブルを用い
る。すなわち、第2の実施の形態では、基本的構成は第
1の実施の形態と同じであり、誤差計算テーブルおよび
出力データテーブルだけを図13及び図14に示すよう
に変更することにより、3値化処理を簡単に実現するこ
とができる。
In the first embodiment, the binarization processing is performed, but in the second embodiment, the ternarization processing is performed. To perform the ternarization processing, an error calculation table and an output data table shown in FIGS. 13 and 14 are used. That is, in the second embodiment, the basic configuration is the same as that of the first embodiment, and only the error calculation table and the output data table are changed as shown in FIGS. Conversion processing can be easily realized.

【0053】かくして、閾値が可変な誤差拡散処理装置
においてもLUTを用いることができ、そのため、重み
係数毎の乗算器及び除算器を省略することができ、回路
規模を小さくして高速処理が可能となる。
Thus, the LUT can be used even in an error diffusion processing device having a variable threshold, so that a multiplier and a divider for each weight coefficient can be omitted, and the circuit scale can be reduced and high-speed processing can be performed. Becomes

【0054】なお、以上に説明した各実施の形態におい
ては、出力されるn値化データは、2値(第1の実施の
形態)または3値(第2の実施の形態)の2種類であっ
たが、さらに多くの階調数であってもよい。ただし、出
力データは入力画像データのビット数よりも少ないビッ
ト数である。
In each of the embodiments described above, the n-valued data to be output is either binary (first embodiment) or ternary (second embodiment). However, the number of gradations may be larger. However, the output data has a smaller number of bits than the number of bits of the input image data.

【0055】また、上記各実施の形態においては、入力
画像ピクセルデータは8ビットの多値画像データであっ
たが、4ビット、12ビット、16ビット等の多値画像
データであってもよい。
In each of the above embodiments, the input image pixel data is 8-bit multi-valued image data, but may be 4-bit, 12-bit, 16-bit, or other multi-valued image data.

【0056】また、上記各実施の形態においては、誤差
配分窓は4ピクセルによって構成されていたが、より大
きなピクセル数の誤差配分窓であっても、あるいはより
小さなピクセル数の誤差配分窓であっても同様に構成で
きることは言うまでもない。
In each of the above embodiments, the error distribution window is composed of four pixels. However, an error distribution window having a larger number of pixels or an error distribution window having a smaller number of pixels may be used. Needless to say, the same configuration can be made.

【0057】また、上記各実施の形態においては、入力
データは単に8ビットの多値画像データであったが、例
えばR,G,Bそれぞれ所定ビットのカラー多値画像デ
ータを入力データとするカラー画像処理装置に本発明を
適用するようにしてもよい。
In each of the above embodiments, the input data is merely 8-bit multi-valued image data. However, for example, color multi-valued image data having predetermined bits of R, G, and B, respectively, is used as input data. The present invention may be applied to an image processing device.

【0058】また、上記各実施の形態においては、閾値
差分計算部6が既に処理済みの出力データに基づいて閾
値差分を決定する構成であるが、入力データに応じて閾
値差分を決定する構成にしてもよい。
In each of the above embodiments, the threshold difference calculator 6 determines the threshold difference based on the already processed output data. However, the threshold difference calculator 6 determines the threshold difference according to the input data. You may.

【0059】さらにまた、前述した各実施の形態の機能
を実現するソフトウェアのプログラムコードを記憶した
記憶媒体を、システムあるいは装置に供給し、そのシス
テムあるいは装置のコンピュータ(またはCPUやMP
U)が記憶媒体に格納されたプログラムコードを読み出
して実行することによっても、本発明が達成されること
は言うまでもない。
Further, a storage medium storing program codes of software for realizing the functions of the above-described embodiments is supplied to a system or an apparatus, and a computer (or CPU or MP) of the system or the apparatus is supplied.
It goes without saying that the present invention is also achieved when U) reads out and executes the program code stored in the storage medium.

【0060】この場合、記憶媒体から読み出されたプロ
グラムコード自体が、前述の各実施の形態の機能を実現
することになり、そのプログラムコードを記憶した記憶
媒体が本発明を構成することになる。
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. .

【0061】プログラムコードを供給するための記憶媒
体として、例えば、フロッピィディスク、ハードディス
ク、光ディスク、光磁気ディスク、CD−ROM、CD
−R、磁気テープ、不揮発性のメモリカード、ROMな
どを用いることができる。
As a storage medium for supplying the program code, for example, a floppy disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD
-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

【0062】また、コンピュータが読み出したプログラ
ムコードを実行することにより、前述した各実施の形態
の機能が実現されるだけでなく、そのプログラムコード
の指示に基づき、コンピュータ上で稼働しているOSな
どが実際の処理の一部または全部を行い、その処理によ
って前述した各実施の形態の機能が実現される場合も、
本発明に含まれることは言うまでもない。
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS or the like running on the computer based on the instructions of the program code. Performs some or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
Needless to say, this is included in the present invention.

【0063】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張ボー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書き込まれた後、そのプログラムコードの指
示に基づき、その機能拡張ボードや機能拡張ユニットに
備わるCPUなどが実際の処理の一部または全部を行
い、その処理によって前述した各実施の形態の機能が実
現される場合も、本発明に含まれることは言うまでもな
い。
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, based on the instructions of the program code, It is needless to say that the present invention includes a case where the CPU or the like provided in the function expansion board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments. No.

【0064】[0064]

【発明の効果】以上詳述したように本発明によれば、入
力画像データに含まれる処理対象の画素の濃度値と、既
にn値化処理が終了した画素からの誤差データとから補
正入力値を算出する計算手段と、前記計算手段によって
算出された補正入力値と閾値の差分データとを加算する
加算手段と、前記加算手段から出力された加算値を入力
値とし、対応するn値データを出力する出力データテー
ブルと、前記出力データテーブルから出力されたn値デ
ータを基に閾値の差分データを決定し、前記加算手段に
出力する閾値差分計算手段と、前記出力データテーブル
から出力されたn値データを入力値とし、対応する正規
化出力値を出力する誤差計算テーブルと、前記誤差計算
テーブルから出力された正規化出力値と前記計算手段か
ら出力された補正入力値との差をn値化誤差として算出
する減算手段と、前記減算手段によって算出されたn値
化誤差を入力値とし、該n値化誤差に各周辺画素に対応
の所定の重み係数を乗算することによって得られる配分
誤差を出力する誤差テーブルとを備える。
As described above in detail, according to the present invention, a correction input value is obtained from a density value of a pixel to be processed included in input image data and error data from a pixel which has already been n-valued. Calculating means, calculating means, calculating means for adding the correction input value calculated by the calculating means and the difference data of the threshold value, the added value output from the adding means as an input value, the corresponding n-value data An output data table to be output, threshold difference data based on the n-value data output from the output data table, and threshold difference calculating means for outputting to the adding means; and n output from the output data table. An error calculation table that takes value data as an input value and outputs a corresponding normalized output value, a normalized output value output from the error calculation table, and a correction output from the calculation means. Subtraction means for calculating a difference from the force value as an n-valued error; an n-valued error calculated by the subtraction means as an input value; and a predetermined weighting factor corresponding to each of the peripheral pixels in the n-valued error. And an error table that outputs a distribution error obtained by the multiplication.

【0065】これにより、閾値が可変な誤差拡散処理装
置においてもルックアップテーブルを用いることがで
き、そのため、重み係数毎の乗算器及び除算器を省略す
ることができ、回路規模を小さくして高速処理が可能と
なる。
As a result, the look-up table can be used even in an error diffusion processing device having a variable threshold value, so that a multiplier and a divider for each weight coefficient can be omitted, and the circuit scale can be reduced and the speed can be increased. Processing becomes possible.

【図面の簡単な説明】[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 of the present invention.

【図2】左右対称な2つの誤差配分窓を示す図である。FIG. 2 is a diagram showing two symmetric error distribution windows.

【図3】誤差配分係数の一例を示す図である。FIG. 3 is a diagram illustrating an example of an error distribution coefficient.

【図4】計算部の内部構成を示すブロック図である。FIG. 4 is a block diagram illustrating an internal configuration of a calculation unit.

【図5】誤差計算テーブルを構成するルックアップテー
ブルを示す図である。
FIG. 5 is a diagram showing a lookup table constituting an error calculation table.

【図6】出力データテーブルに格納されるデータの一例
を示す図である。
FIG. 6 is a diagram illustrating an example of data stored in an output data table.

【図7】閾値差分計算部の内部構成を示すブロック図で
ある。
FIG. 7 is a block diagram illustrating an internal configuration of a threshold difference calculator.

【図8】処理の両方向に対する閾値差分計算窓を示す図
である。
FIG. 8 is a diagram showing threshold difference calculation windows for both directions of processing.

【図9】誤差計算部の内部構成を示すブロック図であ
る。
FIG. 9 is a block diagram illustrating an internal configuration of an error calculator.

【図10】エンコーダの内部構成を示すブロック図であ
る。
FIG. 10 is a block diagram showing an internal configuration of an encoder.

【図11】デコーダでの動作を示す図である。FIG. 11 is a diagram illustrating the operation of the decoder.

【図12】誤差テーブルの一例を示す図である。FIG. 12 is a diagram illustrating an example of an error table.

【図13】第2の実施の形態における誤差計算テーブル
の一例を示す図である。
FIG. 13 is a diagram illustrating an example of an error calculation table according to the second embodiment.

【図14】第2の実施の形態における出力データテーブ
ルの一例を示す図である。
FIG. 14 is a diagram illustrating an example of an output data table according to the second embodiment.

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

1 計算部(計算手段) 2 誤差テーブル 4 加算器(加算手段) 5 出力データテーブル 6 閾値差分計算部(閾値差分計算手段) 7 誤差計算テーブル 8 減算器(減算手段) 13 誤差/出力データバッファ DESCRIPTION OF SYMBOLS 1 Calculation part (calculation means) 2 Error table 4 Adder (addition means) 5 Output data table 6 Threshold difference calculation part (threshold difference calculation means) 7 Error calculation table 8 Subtractor (subtraction means) 13 Error / output data buffer

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】 処理対象の画素の濃度をn値化し、該対
象画素の元の濃度とn値化後の濃度との差を該対象画素
の各周辺画素に重み係数に応じて配分することを、対象
画素を順次変えながら行い、画像全体での濃度平均値に
変化がないようにした誤差拡散方法を実行する画像処理
装置において、 入力画像データに含まれる処理対象の画素の濃度値と、
既にn値化処理が終了した画素からの誤差データとから
補正入力値を算出する計算手段と、 前記計算手段によって算出された補正入力値と閾値の差
分データとを加算する加算手段と、 前記加算手段から出力された加算値を入力値とし、対応
するn値データを出力する出力データテーブルと、 前記出力データテーブルから出力されたn値データを基
に閾値の差分データを決定し、前記加算手段に出力する
閾値差分計算手段と、 前記出力データテーブルから出力されたn値データを入
力値とし、対応する正規化出力値を出力する誤差計算テ
ーブルと、 前記誤差計算テーブルから出力された正規化出力値と前
記計算手段から出力された補正入力値との差をn値化誤
差として算出する減算手段と、 前記減算手段によって算出されたn値化誤差を入力値と
し、該n値化誤差に各周辺画素に対応の所定の重み係数
を乗算することによって得られる配分誤差を出力する誤
差テーブルとを有することを特徴とする画像処理装置。
1. A method for converting a density of a pixel to be processed into an n-value, and distributing a difference between the original density of the target pixel and the density after the n-value to peripheral pixels of the target pixel according to a weight coefficient. Is performed while sequentially changing the target pixel, and an image processing apparatus that executes an error diffusion method in which the density average value of the entire image does not change, the density value of the processing target pixel included in the input image data,
Calculating means for calculating a correction input value from error data from a pixel for which n-value processing has already been completed; adding means for adding the correction input value calculated by the calculating means to difference data of a threshold value; An output data table for outputting the corresponding n-value data with the added value output from the means as an input value, and determining threshold difference data based on the n-value data output from the output data table; A threshold difference calculating unit that outputs the n-value data output from the output data table as an input value, and an error calculation table that outputs a corresponding normalized output value; and a normalized output output from the error calculation table. Subtraction means for calculating the difference between the value and the correction input value output from the calculation means as an n-value error; and inputting the n-value error calculated by the subtraction means. Values and then, an image processing apparatus characterized by having an error table for outputting the allocation error obtained by multiplying a predetermined weight coefficient corresponding to each peripheral pixel in the n-valued error.
【請求項2】 前記既にn値化処理が終了した画素から
の誤差データは、丸め誤差と、前ラインからの誤差と、
左または右横画素からの誤差とのうちの少なくとも1つ
であることを特徴とする請求項1記載の画像処理装置。
2. The error data from a pixel for which n-value processing has already been completed includes a rounding error, an error from a previous line,
2. The image processing apparatus according to claim 1, wherein the error is at least one of an error from a left or right horizontal pixel.
【請求項3】 前記閾値差分計算手段は、着目ラインに
おける前記出力データテーブルから出力されたn値デー
タと、前ラインにおける前記出力データテーブルから出
力されたn値データとの中のドット数をカウントし、得
られたカウント値に基づいて閾値の差分データを決定す
ることを特徴とする請求項1または請求項2記載の画像
処理装置。
3. The threshold difference calculating means counts the number of dots in n-value data output from the output data table on a line of interest and n-value data output from the output data table on a previous line. 3. The image processing apparatus according to claim 1, wherein difference data of a threshold value is determined based on the obtained count value.
【請求項4】 前記nは、2以上の整数であるととも
に、前記入力画像データのビット数よりも少ないビット
数であることを特徴とする請求項1乃至請求項3のいず
れかに記載の画像処理装置。
4. The image according to claim 1, wherein said n is an integer of 2 or more and a bit number smaller than a bit number of said input image data. Processing equipment.
【請求項5】 入力画像の各画素において着目画素の濃
度と該着目画素のn値化後の濃度との誤差を、n値化誤
差として該着目画素の周辺画素に配分し、前記入力画像
のn値化後の平均濃度を該入力画像の元の平均濃度と等
しくするようにしてn値化処理を行う画像処理装置にお
いて、 着目画素の濃度値と、既にn値化処理が終了した画素か
らの誤差データとから補正入力値を算出する計算手段
と、 前記計算手段によって算出された補正入力値と閾値の差
分データとを加算する加算手段と、 前記加算手段から出力された加算値を入力値とし、対応
するn値データを出力する出力データテーブルと、 前記出力データテーブルから出力されたn値データを基
に閾値の差分データを決定し、前記加算手段に出力する
閾値差分計算手段と、 前記出力データテーブルから出力されたn値データを入
力値とし、対応する正規化出力値を出力する誤差計算テ
ーブルと、 前記誤差計算テーブルから出力された正規化出力値と前
記計算手段から出力された補正入力値との差をn値化誤
差として算出する減算手段と、 前記減算手段によって算出されたn値化誤差を入力値と
し、該n値化誤差に各周辺画素に対応の所定の重み係数
を乗算することによって得られる配分誤差を出力する誤
差テーブルとを有することを特徴とする画像処理装置。
5. An error between the density of the pixel of interest and the density of the pixel of interest after n-value conversion in each pixel of the input image is distributed to pixels surrounding the pixel of interest as an n-value error, and In an image processing apparatus for performing an n-value processing by making the average density after the n-value conversion equal to the original average density of the input image, the image processing apparatus calculates the density value of the pixel of interest and the pixel which has already been n-value processing completed. Calculation means for calculating a correction input value from the error data of the above, addition means for adding the correction input value calculated by the calculation means and threshold difference data, and an input value output from the addition means. An output data table that outputs corresponding n-value data; a threshold difference calculating unit that determines threshold difference data based on the n-value data output from the output data table; and outputs the threshold difference data to the adding unit. output An error calculation table that outputs n-valued data output from the data table as an input value and outputs a corresponding normalized output value; a normalized output value output from the error calculation table; and a corrected input value output from the calculation means. Subtracting means for calculating a difference between the two values as an n-valued error, and using the n-valued error calculated by the subtraction means as an input value and multiplying the n-valued error by a predetermined weighting factor corresponding to each peripheral pixel. And an error table for outputting a distribution error obtained by the processing.
【請求項6】 前記既にn値化処理が終了した画素から
の誤差データは、丸め誤差と、前ラインからの誤差と、
左または右横画素からの誤差とのうちの少なくとも1つ
であることを特徴とする請求項5記載の画像処理装置。
6. The error data from a pixel for which the n-value processing has already been completed includes a rounding error, an error from a previous line,
6. The image processing apparatus according to claim 5, wherein the error is at least one of an error from a left or right horizontal pixel.
【請求項7】 前記閾値差分計算手段は、着目ラインに
おける前記出力データテーブルから出力されたn値デー
タと、前ラインにおける前記出力データテーブルから出
力されたn値データとの中のドット数をカウントし、得
られたカウント値に基づいて閾値の差分データを決定す
ることを特徴とする請求項5または請求項6記載の画像
処理装置。
7. The threshold difference calculating means counts the number of dots in n-value data output from the output data table on a line of interest and n-value data output from the output data table on a previous line. 7. The image processing apparatus according to claim 5, wherein difference data of a threshold value is determined based on the obtained count value.
【請求項8】 前記nは、2以上の整数であるととも
に、前記入力画像データのビット数よりも少ないビット
数であることを特徴とする請求項5乃至請求項7のいず
れかに記載の画像処理装置。
8. The image according to claim 5, wherein n is an integer of 2 or more and a bit number smaller than the bit number of the input image data. Processing equipment.
【請求項9】 入力画像に対してn値化処理を行う画像
処理装置に適用される画像処理方法において、 着目画素の濃度値と、既にn値化処理が終了した画素か
らの誤差データとから補正入力値を算出する計算ステッ
プと、 前記計算ステップによって算出された補正入力値と閾値
の差分データとを加算する加算ステップと、 前記加算ステップによって得られる各加算値に対応した
n値データを格納した出力データテーブルを参照して、
前記加算ステップによって得られた加算値に対応するn
値データを読み出す第1の読出ステップと、 前記第1の読出ステップによって読み出されたn値デー
タを基に閾値の差分データを決定し、前記加算ステップ
による加算処理に供する閾値差分計算ステップと、 前記第1の読取ステップによって読み出される各n値デ
ータに対応した正規化出力値を格納した誤差計算テーブ
ルを参照して、前記第1の読取ステップによって読み出
されたn値データに対応した正規化出力値を読み出す第
2の読出ステップと、 前記第2の読出ステップによって読み出された正規化出
力値と前記計算ステップによって算出された補正入力値
との差をn値化誤差として算出する減算ステップと、 前記減算ステップによって算出される各n値化誤差に対
応した、n値化誤差の各周辺画素に対する配分誤差を格
納した誤差テーブルを参照して、前記減算ステップによ
って算出されたn値化誤差に対応した各配分誤差を読み
出す第3の読出ステップとを有することを特徴とする画
像処理方法。
9. An image processing method applied to an image processing apparatus for performing an n-value processing on an input image, wherein the density value of a target pixel and error data from a pixel for which the n-value processing has already been completed are determined. A calculation step of calculating a correction input value; an addition step of adding the correction input value calculated in the calculation step to difference data of a threshold value; and storing n-value data corresponding to each addition value obtained in the addition step. Refer to the output data table
N corresponding to the added value obtained in the adding step
A first reading step of reading the value data, a threshold difference calculating step of determining threshold difference data based on the n-value data read in the first reading step, and subjecting the difference data to an adding process in the adding step; With reference to an error calculation table storing normalized output values corresponding to respective n-value data read in the first reading step, normalization corresponding to the n-value data read in the first reading step A second reading step of reading an output value, and a subtraction step of calculating a difference between the normalized output value read by the second reading step and the correction input value calculated by the calculation step as an n-valued error And an error that stores the distribution error of the n-valued error to each peripheral pixel corresponding to each n-valued error calculated in the subtraction step. Reading a distribution error corresponding to the n-valued error calculated in the subtraction step with reference to a table.
【請求項10】 前記既にn値化処理が終了した画素か
らの誤差データは、丸め誤差と、前ラインからの誤差
と、左または右横画素からの誤差とのうちの少なくとも
1つであることを特徴とする請求項9記載の画像処理方
法。
10. The error data from a pixel for which n-value processing has already been completed is at least one of a rounding error, an error from a previous line, and an error from a left or right horizontal pixel. The image processing method according to claim 9, wherein:
【請求項11】 前記閾値差分計算ステップは、着目ラ
インにおける前記第1の読出ステップによって読み出さ
れたn値データと、前ラインにおける前記第1の読出ス
テップによって読み出されたn値データとの中のドット
数をカウントし、得られたカウント値に基づいて閾値の
差分データを決定することを特徴とする請求項9または
請求項10記載の画像処理方法。
11. The step of calculating a threshold difference between the n-value data of the line of interest read by the first reading step and the n-value data of the previous line read by the first reading step. 11. The image processing method according to claim 9, wherein the number of dots in the medium is counted, and difference data of a threshold value is determined based on the obtained count value.
【請求項12】 前記nは、2以上の整数であるととも
に、前記入力画像データのビット数よりも少ないビット
数であることを特徴とする請求項9乃至請求項11のい
ずれかに記載の画像処理方法。
12. The image according to claim 9, wherein n is an integer of 2 or more and a bit number smaller than the bit number of the input image data. Processing method.
【請求項13】 入力画像に対してn値化処理を行う画
像処理装置に適用される画像処理方法をプログラムとし
て記憶した、コンピュータにより読み出し可能な記憶媒
体において、 前記画像処理方法が、 着目画素の濃度値と、既にn値化処理が終了した画素か
らの誤差データとから補正入力値を算出する計算ステッ
プと、 前記計算ステップによって算出された補正入力値と閾値
の差分データとを加算する加算ステップと、 前記加算ステップによって得られる各加算値に対応した
n値データを格納した出力データテーブルを参照して、
前記加算ステップによって得られた加算値に対応するn
値データを読み出す第1の読出ステップと、 前記第1の読出ステップによって読み出されたn値デー
タを基に閾値の差分データを決定し、前記加算ステップ
による加算処理に供する閾値差分計算ステップと、 前記第1の読取ステップによって読み出される各n値デ
ータに対応した正規化出力値を格納した誤差計算テーブ
ルを参照して、前記第1の読取ステップによって読み出
されたn値データに対応した正規化出力値を読み出す第
2の読出ステップと、 前記第2の読出ステップによって読み出された正規化出
力値と前記計算ステップによって算出された補正入力値
との差をn値化誤差として算出する減算ステップと、 前記減算ステップによって算出される各n値化誤差に対
応した、n値化誤差の各周辺画素に対する配分誤差を格
納した誤差テーブルを参照して、前記減算ステップによ
って算出されたn値化誤差に対応した各配分誤差を読み
出す第3の読出ステップとを有することを特徴とする記
憶媒体。
13. A computer-readable storage medium storing, as a program, an image processing method applied to an image processing apparatus that performs an n-value processing on an input image, wherein the image processing method comprises: A calculation step of calculating a correction input value from the density value and error data from a pixel for which the n-value processing has already been completed; and an addition step of adding the correction input value calculated in the calculation step and threshold difference data. And an output data table storing n-value data corresponding to each addition value obtained in the addition step,
N corresponding to the added value obtained in the adding step
A first reading step of reading the value data, a threshold difference calculating step of determining threshold difference data based on the n-value data read in the first reading step, and subjecting the difference data to an adding process in the adding step; With reference to an error calculation table storing normalized output values corresponding to respective n-value data read in the first reading step, normalization corresponding to the n-value data read in the first reading step A second reading step of reading an output value, and a subtraction step of calculating a difference between the normalized output value read by the second reading step and the correction input value calculated by the calculation step as an n-valued error And an error that stores the distribution error of the n-valued error to each peripheral pixel corresponding to each n-valued error calculated in the subtraction step. A third reading step of reading each distribution error corresponding to the n-valued error calculated in the subtraction step with reference to a table.
【請求項14】 前記既にn値化処理が終了した画素か
らの誤差データは、丸め誤差と、前ラインからの誤差
と、左または右横画素からの誤差とのうちの少なくとも
1つであることを特徴とする請求項13記載の記憶媒
体。
14. The error data from a pixel for which n-value processing has already been completed is at least one of a rounding error, an error from a previous line, and an error from a left or right horizontal pixel. 14. The storage medium according to claim 13, wherein:
【請求項15】 前記閾値差分計算ステップは、着目ラ
インにおける前記第1の読出ステップによって読み出さ
れたn値データと、前ラインにおける前記第1の読出ス
テップによって読み出されたn値データとの中のドット
数をカウントし、得られたカウント値に基づいて閾値の
差分データを決定することを特徴とする請求項13また
は請求項14記載の記憶媒体。
15. The threshold difference calculating step includes the step of calculating the n-value data of the line of interest read by the first reading step and the n-value data of the preceding line read by the first reading step. 15. The storage medium according to claim 13, wherein the number of dots in the medium is counted, and threshold difference data is determined based on the obtained count value.
【請求項16】 前記nは、2以上の整数であるととも
に、前記入力画像データのビット数よりも少ないビット
数であることを特徴とする請求項13乃至請求項15の
いずれかに記載の記憶媒体。
16. The storage according to claim 13, wherein said n is an integer of 2 or more and a bit number smaller than the bit number of said input image data. Medium.
JP2000285300A 2000-09-20 2000-09-20 Image processing unit, image processing method, and storage medium Pending JP2002094785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000285300A JP2002094785A (en) 2000-09-20 2000-09-20 Image processing unit, image processing method, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000285300A JP2002094785A (en) 2000-09-20 2000-09-20 Image processing unit, image processing method, and storage medium

Publications (1)

Publication Number Publication Date
JP2002094785A true JP2002094785A (en) 2002-03-29

Family

ID=18769393

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000285300A Pending JP2002094785A (en) 2000-09-20 2000-09-20 Image processing unit, image processing method, and storage medium

Country Status (1)

Country Link
JP (1) JP2002094785A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7948659B2 (en) 2005-08-23 2011-05-24 Ricoh Company, Ltd. Halftoning device and halftoning method and laser printer including the same
JP2014132799A (en) * 2014-04-17 2014-07-17 Canon Inc Image processing apparatus and image processing method
US9384431B2 (en) 2010-05-20 2016-07-05 Canon Kabushiki Kaisha Image processing apparatus, method, and storage medium that perform quantizing processing of image data for at least N colors

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7948659B2 (en) 2005-08-23 2011-05-24 Ricoh Company, Ltd. Halftoning device and halftoning method and laser printer including the same
US9384431B2 (en) 2010-05-20 2016-07-05 Canon Kabushiki Kaisha Image processing apparatus, method, and storage medium that perform quantizing processing of image data for at least N colors
JP2014132799A (en) * 2014-04-17 2014-07-17 Canon Inc Image processing apparatus and image processing method

Similar Documents

Publication Publication Date Title
EP0220568B1 (en) Method of and apparatus for generating high-resolution bilevel image data
JP3830561B2 (en) Error diffusion method, error diffusion system, and error generation method
US5790704A (en) Image processing apparatus for performing random mask process
JP4217657B2 (en) Image processing method, program, storage medium, and apparatus
JP3749282B2 (en) Image processing device
US5621542A (en) Image processing apparatus and method with weighting of error data generated in quantization
JP2002094785A (en) Image processing unit, image processing method, and storage medium
JP2000022951A (en) Image processing method and image processor
JP3787389B2 (en) Image processing apparatus and method, and storage medium storing the method
JP3209763B2 (en) Image signal processing method
JP3200287B2 (en) Image processing method and apparatus
JP3200274B2 (en) Image processing method and apparatus
JPH0698157A (en) Halftone image forming device
JP2000333000A (en) Device and method for image processing
JP3809274B2 (en) Image processing apparatus and method
JP3225099B2 (en) Image processing device
JPH11339032A (en) Image processing method and device therefor
JP3679522B2 (en) Image processing method and apparatus
JP3697027B2 (en) Image processing apparatus and method
JP2000003439A (en) Method and device for processing image
JP3943747B2 (en) Image processing apparatus and multi-value processing method
JP4208583B2 (en) Image processing apparatus and method and program thereof
JP3432064B2 (en) Image processing apparatus and method
JP4152337B2 (en) Image processing device
JPH08125861A (en) Picture processor

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060324

RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20070626