JP3124589B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP3124589B2
JP3124589B2 JP03256187A JP25618791A JP3124589B2 JP 3124589 B2 JP3124589 B2 JP 3124589B2 JP 03256187 A JP03256187 A JP 03256187A JP 25618791 A JP25618791 A JP 25618791A JP 3124589 B2 JP3124589 B2 JP 3124589B2
Authority
JP
Japan
Prior art keywords
data
pixel
binarizing
interest
random number
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 - Fee Related
Application number
JP03256187A
Other languages
Japanese (ja)
Other versions
JPH0595474A (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 JP03256187A priority Critical patent/JP3124589B2/en
Priority to US07/955,265 priority patent/US5394250A/en
Publication of JPH0595474A publication Critical patent/JPH0595474A/en
Application granted granted Critical
Publication of JP3124589B2 publication Critical patent/JP3124589B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は多値の画像データを2値
データに量子化処理する画像処理装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for quantizing multivalued image data into binary data.

【0002】[0002]

【従来の技術】デジタル複写機やフアクシミリ装置等に
用いられる疑似中間処理方式として、例えば「特開平2
−210959」のような画像処理装置が提案されてい
る。この画像処理装置においては、注目画素近傍の既に
2値化が行われた画素の2値データを用いて注目画素を
黒又は白に2値化し、2値化の際に発生する誤差を注目
画素近傍の未2値化画素の多値データに加算するという
操作を、画素ごとに順次行なつている。
2. Description of the Related Art As a pseudo intermediate processing system used in a digital copying machine, a facsimile machine, etc., for example, Japanese Patent Laid-Open No.
-210959 "has been proposed. In this image processing apparatus, the target pixel is binarized to black or white using binary data of a pixel which has already been binarized in the vicinity of the target pixel, and an error generated at the time of binarization is determined by the target pixel. The operation of adding to the multi-value data of neighboring non-binarized pixels is sequentially performed for each pixel.

【0003】即ち、2値化処理の終了した2値データの
みを用いて平均濃度を演算し、該平均濃度を閾値として
入力多値データを2値化処理していた。このため、比較
的少ない処理量で2値化でき、しかも、入力多値データ
を2値化した際に発生する入力多値データと平均濃度と
の誤差を補正するので階調性のよい画像が得られるとい
う利点がある2値化方法であつた。
That is, the average density is calculated using only the binary data after the binarization processing, and the input multi-value data is binarized using the average density as a threshold value. Therefore, binarization can be performed with a relatively small amount of processing, and an error between the input multi-valued data and the average density generated when the input multi-valued data is binarized is corrected. This is a binarization method that has the advantage of being obtained.

【0004】[0004]

【発明が解決しようとしている課題】しかしながら、上
述の2値化方法では、近傍画素の条件により注目画素を
2値化するので、どうしてもハイライト部でドットのつ
ながり等が起こることが避けられず、ハイライト部の画
質を低下させてしまうという問題があった。また、低濃
度部での画質低下の問題もあつた。
However, in the above-described binarization method, the pixel of interest is binarized according to the conditions of the neighboring pixels, so that it is inevitable that dot connection or the like occurs in the highlight portion. There is a problem that the image quality of the highlight portion is reduced. In addition, there is a problem that image quality is deteriorated in a low density portion.

【0005】[0005]

【課題を解決するための手段】本発明は上述した従来技
術の欠点を除去するとともに、注目画素の下位ビットデ
ータを乱数に基づき2値化しそれを上位ビットデータに
加算し上位ビットデータを2値化するとともに、上位ビ
ットデータを2値化する際に用いる平均値を複数の平均
値から選択する構成としたことにより、画像のハイライ
ト部分でのドットの打たれ方を適度に分散することがで
き、高品質な2値画像を得ることが出来る画像処理装置
の提供を目的とする。係る目的を達成する一手段として
例えば以下の構成を備える。即ち、多値画像データを2
値データに2値化処理する画像処理装置において、注目
画素に対応した多値画像データを入力する入力手段と、
前記注目画素以前に既に2値化された画素の2値データ
を参照して前記注目画素近傍における複数画素の重み付
けされた平均値を求める平均値演算手段と、前記多値画
像データを上位ビットデータと下位ビットデータに分割
する分割手段と、乱数を発生させる乱数発生手段と、
前記乱数発生手段で発生された乱数値に基づき前記分割
手段により分割された下位ビットデータを2値化する下
位2値化手段と、前記下位2値化手段で2値化された
データを前記分割手段で分割された上位ビットデータ
に加算する加算手段と、前記加算手段により下位ビット
データの2値化データが加算された上位ビットデータを
前記平均値演算手段で求めた平均値に基づき2値化する
上位2値化手段とを有し、前記平均値演算手段は、参照
する画素を異ならせて複数の重み付け平均値を演算し、
前記上位2値化手段は複数の平均値の中から1つの平均
値を選択し、選択した平均値を閾値として上位ビットデ
ータを2値化することを特徴とする
SUMMARY OF THE INVENTION The present invention relates to the above-mentioned prior art.
Technique, and remove the lower bit data of the pixel of interest.
Data is binarized based on random numbers and converted to upper bit data.
In addition to binarizing the upper bit data by addition,
The average value used when binarizing the set data
By selecting from the values, the highlight of the image
The way dots are struck at the point
Image processing device that can obtain high-quality binary images
The purpose is to provide. For example, the following configuration is provided as one means for achieving such an object . That is, the multi-valued image data is 2
An image processing apparatus for processing binary to a value data of interest
Input means for inputting multi-valued image data corresponding to pixels,
Binary data of the pixels that have already been binarized to the pixel of interest before
An average value calculating means for obtaining a weighted average of a plurality of pixels in the pixel of interest near by referring to the multi-value image
Divide image data into upper bit data and lower bit data
Dividing means, and random number generating means for generating a random value ,
The division based on a random number value generated by the random number generating means;
And lower binarizing means for binarizing the lower bit data divided by means binarized with the lower binarizing means 2
Adding means for adding value data to the upper bit data divided by the dividing means, the lower bits by the adder means
Upper- level binarizing means for binarizing the higher-order bit data to which the binarized data of the data has been added based on the average value obtained by the average value calculating means; ,reference
Calculate multiple weighted averages with different pixels
The high-order binarization means calculates one average value from a plurality of average values.
Value, and use the selected average value as a threshold to
Data is binarized .

【0006】そして例えば、更に、前記上位2値化手段
が注目画素の上位ビットデータを2値化する際に発生す
る濃度誤差を注目画素周辺の未2値化画素に配分するこ
とにより濃度を保存する補正手段を備えることを特徴と
する。また例えば、前記上位2値化手段は、2値化前の
注目画素の多値データに基づいて複数の平均値の中から
1つの平均値を選択することを特徴とする。あるいは、
前記平均値演算手段は、複数個の異なる大きさの重みマ
スクに基づいて複数の重み付け平均値を求めることを特
徴とする。あるいは、前記下位2値化手段は前記乱数発
生手段の発生乱数値を閾値として2値化することを特徴
とする。
Further, for example, the higher-order binarizing means distributes a density error generated when the higher-order bit data of the target pixel is binarized to non-binarized pixels around the target pixel, thereby preserving the density. It is characterized by comprising a correcting means for performing the correction. In addition, for example, the upper binarizing means, before binarization
From the plurality of average values on the basis of the multivalued data of the pixel of interest
It is characterized in that one average value is selected. Or,
The average value calculating means calculates a plurality of weighted average values based on a plurality of weight masks having different sizes. Alternatively, the lower binarizing means is characterized by binarizing the generation random number of the random number generation means as a threshold value.

【0007】[0007]

【実施例】以下、図面を参照して本発明に係る一実施例
を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment according to the present invention will be described below in detail with reference to the drawings.

【0008】[0008]

【第1実施例】図1は本発明に係る一実施例である画像
処理装置のブロツク図である。図1において、入力セン
サ部101はCCD等の光電変換素子及びこれを操作す
る駆動装置より構成され、原稿の読み取り操作を行う。
入力センサ部101で読み取られた原稿画像データは多
値アナログ画像データである。この多値アナログ画像デ
ータは逐次A/D変換器102に送られ、各画素のアナ
ログデータを対応する多値デジタルデータに変換され
る。次に補正回路103において、CCDセンサの感度
ムラや照明光源による照度ムラを補正するためにシュー
ティング補正等の補正処理が行なわれる。
FIG. 1 is a block diagram of an image processing apparatus according to an embodiment of the present invention. In FIG. 1, an input sensor unit 101 includes a photoelectric conversion element such as a CCD and a driving device for operating the photoelectric conversion element, and performs an operation of reading a document.
The document image data read by the input sensor unit 101 is multi-value analog image data. The multi-level analog image data is sequentially sent to the A / D converter 102, and the analog data of each pixel is converted into the corresponding multi-level digital data. Next, in the correction circuit 103, correction processing such as shooting correction is performed in order to correct the sensitivity unevenness of the CCD sensor and the illuminance unevenness due to the illumination light source.

【0009】続く2値化回路104に入力された多値画
像データは、後述する2値化方法により2値のデータに
量子化処理される。プリンタ105はレーザビーム又は
インクジェット方式により構成されるプリンタであり、
2値化回路104から送られてくる2値データに基づき
ドットをON/OFF制御し、画像を記録紙上に再現す
る。
The multivalued image data input to the subsequent binarization circuit 104 is quantized into binary data by a binarization method described later. The printer 105 is a printer configured by a laser beam or an inkjet method,
On / off control of the dots is performed based on the binary data sent from the binarization circuit 104, and the image is reproduced on the recording paper.

【0010】図2及び図3に図1における2値化回路1
04の詳細ブロツク構成を示す。図2及び図3において
1,2はそれぞれ2値化処理された2値画像データを1
ライン分記憶するラインメモリ、3〜12,21は画像
データを1画素分遅延させるためのDタイプのフリツプ
フロツプDF/F 、13,14は注目画素周辺の2値画像
データから所定の領域の重み付け平均値を求める演算器
である。
FIGS. 2 and 3 show the binarizing circuit 1 in FIG.
04 shows the detailed block configuration. 2 and 3, reference numerals 1 and 2 denote binary image data subjected to the binarization processing, respectively.
Line memories for storing lines, 3 to 12, 21 are D-type flip-flops DF / F for delaying image data by one pixel, and 13, 14 are weighted averages of predetermined areas from binary image data around the target pixel. This is an arithmetic unit for obtaining a value.

【0011】15は加算器22よりの量子化データと所
定の値βとを比較する比較器、16は比較器15からの
信号に基づき演算器13,14よりの複数の重み付け平
均値のうちのいずれかを閾値として選択するセレクタ、
17はセレクタ16から出力された閾値と注目画素の量
子化データとの差を演算する減算器、18はセレクタ1
6から出力された閾値と加算器22よりの注目画素の量
子化データとを比較して注目画素の2値化を行う比較
器、19は減算器17から出力される注目画素の量子化
データと閾値との差に基づき誤差データを演算する誤差
ROM、20は誤差ROM19よりの誤差データを1ラ
イン分記憶するラインメモリ、22は量子化データに濃
度補正を行うために、加算器23よりの量子化データに
ラインメモリ20及びDF/F 21よりの誤差データを加
算する加算器、23は画素の上位ビツトデータに2値化
された下位ビツトデータを加算して量子化データを出力
する加算器である。
Reference numeral 15 denotes a comparator for comparing the quantized data from the adder 22 with a predetermined value β. Reference numeral 16 denotes a plurality of weighted average values of a plurality of weighted average values from the computing units 13 and 14 based on a signal from the comparator 15. A selector for selecting one as a threshold,
A subtractor 17 calculates a difference between the threshold value output from the selector 16 and the quantized data of the pixel of interest.
A comparator 19 compares the threshold value output from 6 with the quantized data of the target pixel from the adder 22 to binarize the target pixel. Reference numeral 19 denotes the quantized data of the target pixel output from the subtractor 17 and An error ROM for calculating error data based on the difference with the threshold value, a line memory 20 for storing one line of error data from the error ROM 19, and a quantum memory 22 for adding density to the quantized data. An adder 23 adds error data from the line memory 20 and the DF / F 21 to the digitized data, and an adder 23 adds the binarized lower bit data to the upper bit data of the pixel and outputs quantized data. is there.

【0012】また、24は補正回路103より入力され
た多値の画素データを上位ビツトデータと下位ビツトデ
ータとに分ける演算器、25は乱数発生器26から出力
される閾値と演算器24よりの下位ビツトデータとを比
較して、下位ビツトデータの2値化を行う比較器、26
は一様乱数を発生させる乱数発生器である。以上の構成
を備える本実施例における2値化方法の原理について以
下に説明する。
Numeral 24 denotes an arithmetic unit for dividing the multi-valued pixel data input from the correction circuit 103 into upper bit data and lower bit data, and 25 denotes a threshold value output from the random number generator 26 and a threshold value from the arithmetic unit 24. A comparator for comparing the lower bit data with the lower bit data and binarizing the lower bit data;
Is a random number generator that generates uniform random numbers. The principle of the binarization method in the present embodiment having the above configuration will be described below.

【0013】図4に示す(1)は入力画像の画素毎の多
値濃度を示す。図4の(1)において、f(i,j)は2値化
しようとする注目画素位置の入力画像の多値画像データ
を示し、8ビツト構成で「0〜255」の値をとる。ま
た、破線より上の画素位置の画像データはすでに2値化
処理が終了しており、注目画素の2値化画行われると、
以後、f(i+1,j),f(i+2,j) ,…と順次同様の2値化処理
が行われる。
FIG. 4A shows the multi-value density of each pixel of the input image. In (1) of FIG. 4, f (i, j) indicates multi-valued image data of an input image at a target pixel position to be binarized, and takes a value of "0 to 255" in an 8-bit configuration. Further, the image data at the pixel position above the broken line has already been subjected to the binarization processing, and when the binarization of the pixel of interest is performed,
Thereafter, the same binarization processing is sequentially performed on f (i + 1, j), f (i + 2, j),.

【0014】図4の(2)は2値化画像データを表す図
である。図4の(2)において、B(i,j)は注目画素の2
値化後のデータ(0又は1)を示す。破線により囲まれ
た部分は注目画素の処理時にはすでに2値化処理が行わ
れている画素データであり、これらを注目画素の2値化
処理の際に用いる。図4の(3)は重み付けを表す図で
ある。R12 は平均濃度を求める重み付けマスクの一
例で5×3及び3×2サイズのマトリクスで表してい
る。
FIG. 4B is a diagram showing the binarized image data. In (2) of FIG. 4, B (i, j) is the pixel of interest 2
The data (0 or 1) after quantification is shown. The portion surrounded by the broken line is pixel data that has already been subjected to the binarization processing at the time of processing the target pixel, and these are used in the binarization processing of the target pixel. FIG. 4C is a diagram illustrating weighting. R 1 R 2 is an example of a weighting mask for obtaining an average density and is represented by a matrix of 5 × 3 and 3 × 2 sizes.

【0015】ここで未2値化画素に対する重みとして
は、 R1(0,0)=R1(1,0)=R2(2,0)=0 、R2(0,0)=R2(1,0)=0 とし
て用いる。そして、まず8ビットの入力画像データf(i,
j)を、上位6ビツトデータfH(i,j) と下位2ビツトデー
タfL(i,j) とに分ける。下位データは、0〜3までの値
が同確率で起こる一様乱数を閾値として0又は1に2値
化する。2値化された下位データBL(i,j) は上位データ
fH(i,j) に加算され、量子化データh(i,j)を得る。
Here, the weights for the non-binarized pixels are as follows: R 1 (0,0) = R 1 (1,0) = R 2 (2,0) = 0, R 2 (0,0) = R 2 Used as (1,0) = 0. Then, first, 8-bit input image data f (i,
j) is divided into upper 6-bit data f H (i, j) and lower 2-bit data f L (i, j). The lower data is binarized to 0 or 1 using a uniform random number in which values from 0 to 3 occur at the same probability as a threshold. Binarized lower data B L (i, j) is upper data
It is added to f H (i, j) to obtain quantized data h (i, j).

【0016】次に既に2値化の終了した画素データよ
り、注目画素近傍における重み付き平均濃度m1(i,j) 及
びm2(i,j) を次式より求める。 注目画素の量子化データh(i,j)とその画素に割り付けら
れた2値化補正値E(i,j)によりm1(i,j) とm2(i,j)のど
ちらかを選択する。 ここで、βは低濃度部であるか否かを判断する所定の値
であり、最大濃度値の10%程度に設定する。本実施例
では上位6ビットを用いるので、最大濃度値は64であ
る。従って、その10%に相当する値を使う。即ちβ=
6となる。
Next, the weighted average densities m 1 (i, j) and m 2 (i, j) in the vicinity of the pixel of interest are obtained from the following equation from the pixel data that has already been binarized. One of m 1 (i, j) and m 2 (i, j) is determined by the quantized data h (i, j) of the target pixel and the binarization correction value E (i, j) assigned to the pixel. select. Here, β is a predetermined value for judging whether or not it is a low density portion, and is set to about 10% of the maximum density value. In this embodiment, since the upper 6 bits are used, the maximum density value is 64. Therefore, a value corresponding to 10% is used. That is, β =
It becomes 6.

【0017】注目画素の量子化データh(i,j)は前記選択
されたm(i,j)と注目画素に割り付けられた2値化補正値
E(i,j)を用いて次式に従い2値化される。 またこのとき発生する2値化誤差の補正値も同様に計算
される。
The quantized data h (i, j) of the pixel of interest is the selected m (i, j) and the binary correction value assigned to the pixel of interest.
It is binarized using E (i, j) according to the following equation. The correction value of the binarization error generated at this time is calculated in the same manner.

【0018】 E1(i+1,j)=E2(i,j+1)={h(i,j)+E(i,j)-m(i,j)}/2 …(4) E1(i+1,j) は注目画素の次の画素(i+1,j) に割り付けら
れる補正値であり、E2(i,j+1) は注目画素の1ライン後
の画素(i,j+1) に割り付けられる補正値である。注目画
素に割り付けられた2値化補正値E(i,j)は次式により求
められ、前記手法により注目画素の1画素前である画素
(i-1,j) を2値化した際に発生した誤差E1(i,j) と、注
目画素の1ライン前の画素(i,j-1) を2値化した際に発
生した誤差E2(i,j) との和である。
E 1 (i + 1, j) = E 2 (i, j + 1) = {h (i, j) + E (i, j) -m (i, j)} / 2 (4 E 1 (i + 1, j) is a correction value assigned to the pixel (i + 1, j) next to the target pixel, and E 2 (i, j + 1) is a pixel one line after the target pixel. This is a correction value assigned to (i, j + 1). The binarization correction value E (i, j) assigned to the target pixel is obtained by the following equation, and the pixel which is one pixel before the target pixel by the above-described method.
An error E 1 (i, j) generated when binarizing (i-1, j) and a pixel (i, j-1) one line before the target pixel are generated. This is the sum with the error E 2 (i, j).

【0019】 E(i,j)=E1(i,j)+E2(i,j) …(5) 以上の操作を画素ごとに順次行うことで画像全体の2値
化を行う。このように下位ビツトでは、乱数を閾値とし
て量子化することにより、濃度が適度に分散され、低濃
度部のドットのつながりが有効に防止できる効果があ
る。また濃度が量子化確率となるので、統計的に濃度が
保存される。
E (i, j) = E 1 (i, j) + E 2 (i, j) (5) The above operation is sequentially performed for each pixel to binarize the entire image. In this way, by quantizing the lower bits using the random number as a threshold, the density is appropriately dispersed, and there is an effect that the connection of dots in the low density portion can be effectively prevented. Further, since the density becomes the quantization probability, the density is statistically stored.

【0020】また上位ビツトでは、周辺画素情報に基づ
いて2値化を行い、2値化誤差を補正することにより濃
度が保存され、階調性、解像力ともに優れた画像が得ら
れる。そして低濃度では平均濃度算出領域を広くするこ
とでドットのつながり防止に効果があり、前記乱数を用
いることによる効果と合わせて、ハイライト部での高品
位な画質が得られる。この場合において、低濃度部用
に、広い平均濃度算出領域に対してラインメモリが必要
であるが、以上の方法を用いることにより、2値化誤差
の補正量を記憶しておくメモリは上位ビツト分だけでよ
いので、トータルしてメモリを増やさずに実現できる。
上述した図1〜図3に示す本実施例の構成における、以
上の2値化方法の原理に基づいた注目画素(i,j)の2値
化処理を以下に説明する。
In the upper bits, binarization is performed based on peripheral pixel information, and density is preserved by correcting a binarization error, so that an image having excellent gradation and resolution can be obtained. At low densities, widening the average density calculation area has the effect of preventing the connection of dots. Together with the effect of using the random numbers, high-quality image quality in the highlight portion can be obtained. In this case, a line memory is required for a wide average density calculation area for the low density portion, but by using the above method, the memory for storing the correction amount of the binarization error is a higher-order bit. Since only minutes are required, it can be realized without increasing the total memory.
The binarization processing of the pixel of interest (i, j) based on the principle of the above-described binarization method in the configuration of the present embodiment shown in FIGS. 1 to 3 will be described below.

【0021】図2に示すラインメモリ1,2には、注目
画素以前に2値化の終了した画素の、図3の比較器18
よりの2値データが記憶されている。そして注目画素を
2値化する際にラインメモリ2は1ライン前の2値デー
タB(i+2,j-1)を出力し、ラインメモリ1は2ライン前の
2値データB(i+2,j-2)を出力する。DF/F 3〜12はそ
れぞれ1画素ずつ遅延させたデータを出力する。即ちD
F/F 3はB(i+1,j-2)、DF/F 4はB(i,j-2)、DF/F 5は
B(i-1,j-2)、DF/F 6はB(i-2,j-2)、DF/F 7はB(i+1,
j-1)、DF/F 8はB(i,j-1)、DF/F 9はB(i-1,j-1)、D
F/F 10はB(i-2,j-1)、DF/F 11はB(i-1,j)、DF/F
12はB(i-2,j)をそれぞれ出力する。
The line memories 1 and 2 shown in FIG. 2 store, in the comparators 18 shown in FIG.
Is stored. When the target pixel is binarized, the line memory 2 outputs the binary data B (i + 2, j-1) one line before, and the line memory 1 outputs the binary data B (i + 2, j-2) is output. Each of the DF / Fs 3 to 12 outputs data delayed by one pixel. That is, D
F / F 3 is B (i + 1, j-2), DF / F 4 is B (i, j-2), and DF / F 5 is
B (i-1, j-2), DF / F 6 is B (i-2, j-2), DF / F 7 is B (i + 1,
j-1), DF / F 8 is B (i, j-1), DF / F 9 is B (i-1, j-1), D
F / F 10 is B (i-2, j-1), DF / F 11 is B (i-1, j), DF / F
12 outputs B (i-2, j), respectively.

【0022】これらのDF/F 3〜12よりの各2値デー
タは演算器13に入力される。また、このうちDF/F 7
よりのB(i+1,j-1)、DF/F 8よりのB(i,j-1)、DF/F 9
よりのB(i-1,j-1)、DF/F 11よりのB(i-1,j)は演算器
14にも入力される。演算器13及び演算器14は、注
目画素近傍の2値データからそれぞれの重みマスクに基
づいた符号Aで示す重み付き平均濃度値m1(i,j) 及び符
号Bで示す重み付き平均濃度値m2(i,j) を演算して図3
のセレクタ16に出力する。
Each of the binary data from the DF / Fs 3 to 12 is input to the arithmetic unit 13. Among them, DF / F 7
B (i + 1, j-1), B (i, j-1) from DF / F 8 and DF / F 9
B (i-1, j-1) and B (i-1, j) from the DF / F 11 are also input to the arithmetic unit 14. The arithmetic unit 13 and the arithmetic unit 14 calculate the weighted average density value m 1 (i, j) indicated by the code A and the weighted average density value indicated by the code B from the binary data in the vicinity of the target pixel based on the respective weight masks. Calculating m 2 (i, j)
To the selector 16.

【0023】一方、補正回路103から送られたきた注
目画素の多値データf(i,j)は、図3の演算器24に入力
される。演算器24は入力された注目画素の8ビツト多
値データf(i,j)を、上位6ビツトデータfH(i,j) と下位
2ビツトデータfc(i,j) に分けて出力する。また乱数発
生器26は画素ごとに0〜3の値をとる一様乱数を発生
する。
On the other hand, the multi-valued data f (i, j) of the pixel of interest sent from the correction circuit 103 is input to the calculator 24 in FIG. Calculator 24 the 8-bit multi-value data f of the pixel of interest is input (i, j), is divided into the upper 6 bits data f H (i, j) and low-order 2 bits data f c (i, j) output I do. The random number generator 26 generates a uniform random number having a value of 0 to 3 for each pixel.

【0024】比較器25は、乱数発生器26より発生さ
れる0〜3の乱数の値を閾値として、下位2ビツトデー
タfL(i,j) を2値化し、下位2値化データBL(i,j) を出
力する。加算器23は、演算器24よりのビツトデータ
fH(i,j) と、比較器25よりの1又は0に2値化された
下位2値化データBL(i,j) とを加算して、量子化データ
h(i,j)を出力する。
The comparator 25 uses the values of random numbers 0 to 3 generated by the random number generator 26 as a threshold value to binarize the low-order 2-bit data f L (i, j) and lower-order binary data B L Outputs (i, j). The adder 23 stores the bit data from the arithmetic unit 24.
f H (i, j) and the lower-order binarized data B L (i, j) binarized to 1 or 0 from the comparator 25 to obtain quantized data
Outputs h (i, j).

【0025】加算器22は、量子化データh(i,j)に、ラ
インメモリ20及びDF/F 21よりの誤差補正データE1
(i,j) 及びE2(i,j) とを加算して、h(i,j)+E(i,j) を出
力する。比較器15は、この誤差補正された量子化デー
タh(i,j)+E(i,j) と、所定の値βとの比較を行い、その
比較判定結果に基づきセレクタ16に対するセレクト信
号を出力する。
The adder 22 adds error correction data E 1 from the line memory 20 and DF / F 21 to the quantized data h (i, j).
(i, j) and E 2 (i, j) are added to output h (i, j) + E (i, j). The comparator 15 compares the error-corrected quantized data h (i, j) + E (i, j) with a predetermined value β, and outputs a select signal to the selector 16 based on the comparison result. Output.

【0026】セレクタ16は、比較器15から送られて
きたセレクト信号に基づき、符号Aで示す重み付き平均
濃度値m1(i,j) 及び符号Bで示す重み付き平均濃度値m2
(i,j) のいずれかを選択し、閾値m(i,j)として出力す
る。減算器17は、加算器22よりの誤差補正された量
子化データh(i,j)+E(i,j) と閾値m(i,j)との差を演算す
る。また比較器18はm(i,j)を閾値として誤差補正され
た量子化データh(i,j)+E(i,j) の2値化を行い、符号C
で示す2値データB(i,j)を出力する。この2値データB
(i,j)は、プリンタ105に送られるとともに、図2に
示すラインメモリ2及びDF/F 11にも入力され、今後
2値化を行う画素のための周辺画素情報となる。
The selector 16 is based on the select signal sent from the comparator 15 and has a weighted average density value m 1 (i, j) denoted by reference symbol A and a weighted average density value m 2 denoted by reference symbol B.
(i, j) is selected and output as a threshold value m (i, j). The subtracter 17 calculates the difference between the quantized data h (i, j) + E (i, j) from the adder 22 and the threshold value m (i, j). The comparator 18 binarizes the error-corrected quantized data h (i, j) + E (i, j) using m (i, j) as a threshold value, and outputs a code C
And outputs binary data B (i, j). This binary data B
(i, j) is sent to the printer 105 and also input to the line memory 2 and the DF / F 11 shown in FIG. 2, and becomes peripheral pixel information for pixels to be binarized in the future.

【0027】一方、減算器17から出力されたh(i,j)+E
(i,j)-m(i,j)は、誤差ROM19に入力される。誤差R
OM19は、上述した式(4)に従い、誤差データE1(i
+1,j),E2(i,j+1) を出力する。E1(i+1,j) はDF/F 21
により1画素分遅延されて画素(i+1,j) に割り付けら
れ、E2(i,j+1) はラインメモリ20に記憶され1ライン
後の画素(i,j+1) に割り付けられる。
On the other hand, h (i, j) + E output from the subtractor 17
(i, j) -m (i, j) is input to the error ROM 19. Error R
The OM 19 calculates the error data E 1 (i
+ 1, j), E 2 (i, j + 1) is output. E 1 (i + 1, j) is DF / F 21
Is delayed by one pixel and assigned to pixel (i + 1, j), and E 2 (i, j + 1) is stored in line memory 20 and assigned to pixel (i, j + 1) one line later. .

【0028】以上一連の処理を繰り返し行うことにより
画像データの2値化処理を画素ごとに順次行う。以上説
明した2値化処理を行ない、注目画素の下位データを確
率的に2値化することにより、ハイライト部分でのドツ
トの打たれ方が適度に分散され、画質を向上させること
ができる。
By repeating the series of processes described above, the binarization process of the image data is sequentially performed for each pixel. By performing the above-described binarization process and stochastically binarizing the lower-order data of the target pixel, the manner in which dots are formed in the highlight portion is appropriately dispersed, and the image quality can be improved.

【0029】[0029]

【第2実施例】以上説明した第1実施例においては、注
目画素の下位2ビツトのみ乱数を用いて2値化処理し、
この2値化データと上位ビツトとを加算していた。しか
し本発明は以上の例に限定されるものではなく、注目画
素の上位ビットのレベルに応じて乱数に加工を行う様に
制御しても良い。このように制御した本発明に係る第2
実施例を以下に説明する。
[Second Embodiment] In the first embodiment described above, only the lower two bits of the pixel of interest are binarized using random numbers.
The binarized data and the upper bits are added. However, the present invention is not limited to the above example, and control may be performed so that random numbers are processed according to the level of the upper bit of the target pixel. The second embodiment of the present invention controlled in this way
Examples will be described below.

【0030】第2実施例は上述した第1実施例と略同様
の構成であり、わずかに第1実施例の図3に示す構成が
異なり、図5に示す構成となつている構成である。図1
及び図2に示す部分は第1実施例と同様であり、他の構
成においても、第1実施例と同様構成には同一参照番号
を付し、詳細説明を省略する。図5において、図3に示
す第1実施例と異なるのは、演算器424、比較器42
5、演算器426、及び乱数発生器427部分の構成の
みである。
The second embodiment has substantially the same configuration as that of the above-described first embodiment. The configuration of the first embodiment shown in FIG. 3 is slightly different from that of the first embodiment, and is the configuration shown in FIG. FIG.
2 are the same as those in the first embodiment. In other configurations, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description is omitted. 5 is different from the first embodiment shown in FIG.
5, the arithmetic unit 426 and the random number generator 427 only.

【0031】第2実施例においては、図5に示すよう
に、演算器424によって、補正回路103から送られ
たきた8ビツトの注目画素の多値データf(i,j)を、上位
ビツトデータと下位ビツトデータにとに分ける。この上
位ビツトと下位ビツトとの振り分けは、上位4ビツトデ
ータと下位4ビツトデータとに振り分けても良く、また
第1実施例とは逆に上位2ビツト、下位6ビツトに振り
分けても良い。
In the second embodiment, as shown in FIG. 5, the multi-valued data f (i, j) of the 8-bit target pixel sent from the correction circuit 103 is transferred by the arithmetic unit 424 to the upper bit data. And lower bit data. The upper bits and the lower bits may be distributed to the upper 4 bits and the lower 4 bits, or may be distributed to the upper 2 bits and the lower 6 bits contrary to the first embodiment.

【0032】この後第2実施例においては、上位ビット
データを乱数発生器427から発生した乱数値とともに
演算器426に入力する。演算器426よりの出力は、
比較器425における下位ビツトデータの2値化の閾値
となる。演算器426は、上位ビットデータの値に応じ
て乱数発生器427よりの上位ビットデータが0となる
ような低濃度領域では、出力値(下位ビツトデータの2
値化の閾値となる乱数の値)を増やすことにより、ドツ
ト印刷確率を下げて、ハイライト部のドットのつながり
を抑える。
Thereafter, in the second embodiment, the higher-order bit data is input to the arithmetic unit 426 together with the random number value generated by the random number generator 427. The output from the arithmetic unit 426 is
This is a threshold value for binarizing the lower bit data in the comparator 425. The arithmetic unit 426 outputs an output value (2 bits of lower bit data) in a low density area where the upper bit data from the random number generator 427 becomes 0 according to the value of the upper bit data.
By increasing the value of a random number that is a threshold for value conversion), the dot printing probability is reduced, and the connection of dots in the highlight portion is suppressed.

【0033】以上の様に制御することにより、低濃度部
で平均濃度算出マスクを変えることにより、周辺画素情
報の伝わり方を変えることができ、近接した場所にドツ
トが打たれることが防止でき、低濃度部での画質の向上
をも図ることができる。
By controlling as described above, the way of transmitting the peripheral pixel information can be changed by changing the average density calculation mask in the low density portion, and it is possible to prevent the dot from being imprinted on a close place. Also, it is possible to improve the image quality in the low density portion.

【0034】[0034]

【第3実施例】上述した第1の実施例では、複数の重み
付き平均値を計算し、注目画素の量子化レベルに基づ
き、複数の重み付き平均値のいずれかを閾値として選択
する構成としたが、注目画素の量子化レベルに基づき直
接閾値を演算する様に構成しても同様の効果を達成でき
る。注目画素の量子化レベルに基づき直接閾値を演算す
る様に構成した本発明に係る第3実施例を以下に説明す
る。
Third Embodiment In the first embodiment described above, a plurality of weighted average values are calculated, and one of the plurality of weighted average values is selected as a threshold value based on the quantization level of the pixel of interest. However, the same effect can be achieved even if the threshold value is directly calculated based on the quantization level of the pixel of interest. A third embodiment according to the present invention in which a threshold value is directly calculated based on the quantization level of a target pixel will be described below.

【0035】図6は本発明に係る第3実施例の2値化回
路のブロツク構成図であり、他の部分は図1に示す第1
実施例の構成と同様である。なお、第1実施例と同様構
成には同一番号を付し詳細説明を省略する。第3実施例
においては、図6に示す様に、比較器14からのセレク
ト信号をセレクタ16ではなく演算装置600に直接入
力させ、閾値となる重み付き平均値を演算する構成とし
ている。なお、この演算装置600は、第1実施例の演
算器13,14及びセレクタ16の機能とともに、上述
した比較器14からのセレクト信号をも含めて閾値とな
る重み付き平均値を演算する機能を合わせ持つ構成であ
り、係る演算装置600をテーブル構成とすることによ
り、非常に高速での演算が行える。
FIG. 6 is a block diagram of a binarizing circuit according to a third embodiment of the present invention, and other parts are the same as those of the first embodiment shown in FIG.
The configuration is the same as that of the embodiment. The same components as those in the first embodiment are denoted by the same reference numerals, and detailed description is omitted. In the third embodiment, as shown in FIG. 6, a select signal from the comparator 14 is directly input to the arithmetic unit 600 instead of the selector 16, and a weighted average value serving as a threshold is calculated. The arithmetic unit 600 has a function of calculating a weighted average value serving as a threshold value including the select signal from the comparator 14 as well as the functions of the arithmetic units 13 and 14 and the selector 16 of the first embodiment. A very high-speed operation can be performed by using the arithmetic device 600 in a table configuration.

【0036】以上の構成としても、注目画素の下位デー
タを確率的に2値化することにより、ハイライト部分で
のドツトの打たれ方が適度に分散され、画質を向上させ
ることができる。以上説明した様の上述した各実施例に
よれば、下位ビツトを確率的に量子化するように構成す
ると共に、低濃度部で重み付き平均濃度値の算出領域を
広くする様に構成することにより、低濃度部で起こるド
ットのつながりを防止し、高画質な画像が得られる。
With the above configuration, by stochastically binarizing the lower-order data of the target pixel, the manner in which dots are formed in the highlight portion is appropriately dispersed, and the image quality can be improved. According to each of the above-described embodiments described above, the lower bits are stochastically quantized and the calculation area of the weighted average density value is widened in the low density portion. In addition, it is possible to prevent the connection of dots occurring in a low density portion, and to obtain a high quality image.

【0037】なお、以上の説明において、第1実施例に
おいては、注目画素の下位2ビツトのみ乱数を用いて2
値化処理し、この2値化データと上位ビツトとを加算し
ていた。そして第2実施例においては、注目画素の上位
ビットのレベルに応じて、低濃度領域では乱数に加工を
行う様に制御する例を示したが、これらは別個独立に備
えられるものではなく、第1実施例の機能と第2実施例
の機能とを合わせ持つ構成とし、ハイライト部分では第
1実施例の如く、低濃度領域では第2実施例の如くに2
値化処理を行う構成としても良い。この様に切り替えて
最適2値化処理を行うことにより非常に高品質の2値化
画像が得られる。
In the above description, in the first embodiment, only the lower two bits of the pixel of interest are calculated using random numbers.
The binarization processing is performed, and the binarized data and the upper bits are added. In the second embodiment, an example has been described in which control is performed so that random numbers are processed in a low-density region in accordance with the level of the upper bit of the target pixel. However, these are not provided separately and independently. The function of the first embodiment is combined with the function of the second embodiment. The highlight portion is the same as the first embodiment, and the low density region is the same as the second embodiment.
A configuration for performing a value conversion process may be adopted. By performing the optimum binarization processing by switching in this manner, a very high-quality binarized image can be obtained.

【0038】本発明は、複数の機器から構成されるシス
テムに適用しても良いし、1つの機器からなる装置に適
用しても良い。また、システムあるいは装置にプログラ
ムを供給することによつて達成される場合にも適用でき
ることは言うまでもない。
The present invention may be applied to a system including a plurality of devices, or may be applied to an apparatus including a single device. Needless to say, the present invention can also be applied to a case where the above is achieved by supplying a program to a system or an apparatus.

【0039】[0039]

【発明の効果】以上説明したように本発明によれば、注
目画素の下位ビットデータを乱数に基づき2値化しそれ
を上位ビットデータに加算し上位ビットデータを2値化
するとともに、上位ビットデータを2値化する際に用い
る平均値を複数の平均値から選択する構成としたことに
より、画像のハイライト部分でのドットの打たれ方を適
度に分散することができ、高品質な2値画像を得ること
が出来る画像処理装置を提供できる。
As described above, according to the present invention, the lower bit data of the target pixel is binarized based on a random number.
Is added to the upper bit data to binarize the upper bit data and used to binarize the upper bit data.
Is selected from multiple average values.
This makes it possible to appropriately disperse the way dots are struck in the highlight portion of the image and obtain a high-quality binary image.
An image processing apparatus capable of performing the above can be provided.

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

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

【図2】、FIG.

【図3】図1に示す2値化回路の詳細回路図である。FIG. 3 is a detailed circuit diagram of the binarization circuit shown in FIG. 1;

【図4】本実施例における画素毎の多値画像、2値化画
像、及び、平均濃度算出用重み付けマスクの例を示す図
である。
FIG. 4 is a diagram illustrating an example of a multi-valued image, a binarized image, and an average density calculation weighting mask for each pixel according to the present exemplary embodiment.

【図5】本発明に係る第2実施例の2値化回路における
第1実施例の構成と異なる部分を示す回路図である。
FIG. 5 is a circuit diagram showing a portion of a binarization circuit according to a second embodiment of the present invention which is different from the configuration of the first embodiment;

【図6】本発明に係る第3実施例における2値化回路の
詳細回路図である。
FIG. 6 is a detailed circuit diagram of a binarization circuit according to a third embodiment of the present invention.

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

1,2,20 ラインメモリ 3〜12,21 DタイプのフリツプフロツプDF/F 13,14,24,424,426 演算器 15,18,25,425 比較器 16 セレクタ 17 減算器 19 誤差ROM 23 加算器 26,427 乱数発生器 101 入力センサ部 102 A/D変換器 103 補正回路 104 2値化回路 105 プリンタ 600 演算装置である。 1, 2, 20 Line memory 3-12, 21 D type flip-flop DF / F 13, 14, 24, 424, 426 Arithmetic unit 15, 18, 25, 425 Comparator 16 Selector 17 Subtractor 19 Error ROM 23 Adder 26,427 Random number generator 101 Input sensor unit 102 A / D converter 103 Correction circuit 104 Binarization circuit 105 Printer 600 An arithmetic unit.

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

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 多値画像データを2値データに2値化処
理する画像処理装置において、注目画素に対応した多値画像データを入力する入力手段
と、 前記 注目画素以前に既に2値化された画素の2値データ
を参照して前記注目画素近傍における複数画素の重み付
けされた平均値を求める平均値演算手段と、前記多値画像データを上位ビットデータと下位ビットデ
ータに分割する分割手段と、 乱数を発生させる乱数発生手段と、 前記乱数発生手段で発生された乱数値に基づき前記分割
手段により分割された下位ビットデータを2値化する下
位2値化手段と、 前記下位2値化手段で2値化された2値データを前記分
割手段で分割された上位ビットデータに加算する加算手
段と、前記加算手段により下位ビットデータの2値化データが
加算された上位ビットデータを 前記平均値演算手段で求
めた平均値に基づき2値化する上位2値化手段とを
し、 前記平均値演算手段は、参照する画素を異ならせて複数
の重み付け平均値を演算し、前記上位2値化手段は複数
の平均値の中から1つの平均値を選択し、選択した平均
値を閾値として上位ビットデータを2値化する ことを特
徴とする画像処理装置。
1. A picture processing apparatus for processing binary the multivalued image data into binary data, input means for inputting multi-valued image data corresponding to the pixel of interest
When binary data of the pixels that have already been binarized to the pixel of interest before
Means for calculating a weighted average value of a plurality of pixels in the vicinity of the pixel of interest by referring to FIG.
Dividing means for dividing the over data, a random number generating means for generating a random number based on said random number value generated by said random number generation means divides
And lower binarizing means for binarizing the lower bit data divided by the unit, the partial binarized binary data is in the lower binarizing means
Adding means for adding the high-order bit data divided by the dividing means, the binary data of the lower bit data by the addition means
Have a summed high-order bit data to an upper binarizing means for binarizing based on the average value calculated by the average value calculating means
And the average value calculating means sets a plurality of pixels by referring to different pixels.
, And the upper binarization means includes a plurality of
Select one average value from the average values of the selected average
An image processing apparatus for binarizing upper bit data using a value as a threshold value .
【請求項2】 更に、前記上位2値化手段が注目画素の
上位ビットデータを2値化する際に発生する濃度誤差を
注目画素周辺の未2値化画素に配分することにより濃度
を保存する補正手段を備えることを特徴とする請求項1
記載の画像処理装置。
2. The method according to claim 1, further comprising: distributing a density error generated when the high -order binarizing means binarizes the high-order bit data of the pixel of interest to non-binarized pixels around the pixel of interest. 2. The apparatus according to claim 1, further comprising a correction unit.
The image processing apparatus according to any one of the preceding claims.
【請求項3】 前記上位2値化手段は、2値化前の注目
画素の多値データに基づいて複数の平均値の中から1つ
の平均値を選択することを特徴とする請求項1記載の画
像処理装置。
Wherein the upper binarizing means, the before binarization interest
One out of a plurality of average values on the basis of the multivalued data of the pixel
2. The image processing apparatus according to claim 1, wherein an average value is selected.
【請求項4】 前記平均値演算手段は、複数個の異なる
大きさの重みマスクに基づいて複数の重み付け平均値を
求めることを特徴とする請求項1記載の画像処理装置。
4. The image processing apparatus according to claim 1, wherein said average value calculating means calculates a plurality of weighted average values based on a plurality of weight masks having different sizes.
【請求項5】 前記下位2値化手段は前記乱数発生手段
の発生乱数値を閾値として2値化することを特徴とする
請求項1記載の画像処理装置。
5. The image processing apparatus according to claim 1, wherein said lower-order binarizing means binarizes the random number generated by said random number generating means as a threshold.
JP03256187A 1991-03-10 1991-10-03 Image processing device Expired - Fee Related JP3124589B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP03256187A JP3124589B2 (en) 1991-10-03 1991-10-03 Image processing device
US07/955,265 US5394250A (en) 1991-03-10 1992-10-01 Image processing capable of handling multi-level image data without deterioration of image quality in highlight areas

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03256187A JP3124589B2 (en) 1991-10-03 1991-10-03 Image processing device

Publications (2)

Publication Number Publication Date
JPH0595474A JPH0595474A (en) 1993-04-16
JP3124589B2 true JP3124589B2 (en) 2001-01-15

Family

ID=17289117

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03256187A Expired - Fee Related JP3124589B2 (en) 1991-03-10 1991-10-03 Image processing device

Country Status (1)

Country Link
JP (1) JP3124589B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100575975B1 (en) 1999-10-06 2006-05-02 삼성전자주식회사 A circuit and method for multi-bit dithering image consistof gray data in lbp
JP2007236398A (en) 2004-03-30 2007-09-20 Brother Ind Ltd Embroidery sewing machine with printing function
JP2009258224A (en) 2008-04-14 2009-11-05 Canon Inc Image forming apparatus and image forming method

Also Published As

Publication number Publication date
JPH0595474A (en) 1993-04-16

Similar Documents

Publication Publication Date Title
US5394250A (en) Image processing capable of handling multi-level image data without deterioration of image quality in highlight areas
US5353127A (en) Method for quantization gray level pixel data with extended distribution set
US5325448A (en) Image treatment method and apparatus with error dispersion and controllable quantization
CA2076780C (en) Method for quantization gray level pixel data with application of under compensated error diffusion
EP0715451B1 (en) Error diffusion pattern shifting reduction through programmable threshold perturbation
JPH08107500A (en) Error diffusion halfton processing system and method of using homogeneous response of high/low brightness picture area
JP3571716B2 (en) Improved error variance system
US5226096A (en) Digital halftoning with selectively applied dot-to-dot error diffusion
EP0781034B1 (en) Image processing apparatus and method
JP2974363B2 (en) Image processing device
US5208684A (en) Half-tone image processing system
US5577136A (en) Image processing apparatus
JP3087767B2 (en) Image processing device
JP2660004B2 (en) Recording device
JP4248654B2 (en) Processing device for preparing document image to be output to output device
US6369912B1 (en) Image processing apparatus capable of applying line component to image
JP3124589B2 (en) Image processing device
JP3124605B2 (en) Image processing device
JP2882531B2 (en) Image processing device
JP3124604B2 (en) Image processing device
JP2792581B2 (en) Image processing device
JP2900907B2 (en) Image processing device
JP3488509B2 (en) Image data processing device
JP3679522B2 (en) Image processing method and apparatus
JP3167676B2 (en) Image 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: 20000929

LAPS Cancellation because of no payment of annual fees