JP2683085B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP2683085B2
JP2683085B2 JP1031409A JP3140989A JP2683085B2 JP 2683085 B2 JP2683085 B2 JP 2683085B2 JP 1031409 A JP1031409 A JP 1031409A JP 3140989 A JP3140989 A JP 3140989A JP 2683085 B2 JP2683085 B2 JP 2683085B2
Authority
JP
Japan
Prior art keywords
pixel
data
image
value
error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1031409A
Other languages
Japanese (ja)
Other versions
JPH02210962A (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 JP1031409A priority Critical patent/JP2683085B2/en
Priority to DE1990626846 priority patent/DE69026846T2/en
Priority to EP19900301475 priority patent/EP0382580B1/en
Priority to DE1990627870 priority patent/DE69027870T2/en
Priority to EP19900301476 priority patent/EP0382581B1/en
Publication of JPH02210962A publication Critical patent/JPH02210962A/en
Priority to US08/482,044 priority patent/US6134355A/en
Application granted granted Critical
Publication of JP2683085B2 publication Critical patent/JP2683085B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、画像データを2値又は多値に量子化処理す
る画像処理装置に関する。
Description: TECHNICAL FIELD The present invention relates to an image processing device that performs a binary or multivalued quantization process on image data.

〔従来技術〕(Prior art)

従来より、フアクシミリ装置やデジタル複写機等の画
像処理装置において、擬似中間調処理方式として、誤差
拡散法や平均濃度近似法が提案されている。
2. Description of the Related Art Conventionally, error diffusion methods and average density approximation methods have been proposed as pseudo halftone processing methods in image processing apparatuses such as facsimile machines and digital copying machines.

前者の誤差拡散法は、文献R.FLOYD & L.STEINBER
G,“AN ADAPTIVE ALGORITHMFOR SPETIAL GRAY SCA
LE",SID 75 DIGEST,PP36〜37に開示されている如く、
注目画素の多値画像データを2値化(最濃レベルか又は
最淡レベルに変換)し、前記2値化レベルと2値化前の
多値画像データとの誤差に所定の重み付けをして注目画
素近傍の画素のデータに加算するものである。
The former error diffusion method is described in R.FLOYD & L.STEINBER
G, “AN ADAPTIVE ALGORITHMFOR SPETIAL GRAY SCA
As disclosed in LE ", SID 75 DIGEST, PP36-37,
The multi-valued image data of the pixel of interest is binarized (converted to the darkest level or the lightest level), and the error between the binarized level and the multi-valued image data before the binarization is given a predetermined weighting. This is to be added to the data of the pixels in the vicinity of the pixel of interest.

また、後者の平均濃度近似法は、特開昭57−104369号
に記載されている様に、注目画素近傍の既に2値化され
た2値データを用いて注目画素を黒又は白に2値化した
場合のそれぞれの近傍画素との重み付け平均値を求め、
この2つの平均値の平均を閾値として注目画素の画像デ
ータを2値化するものである。
In addition, as described in Japanese Patent Application Laid-Open No. 57-104369, the latter average density approximation method converts a target pixel to black or white using binary data already binarized in the vicinity of the target pixel. Weighted average value with each neighboring pixel in the case of
The image data of the target pixel is binarized using the average of the two average values as a threshold.

〔発明が解決しようとする課題〕 前述した誤差拡散法は、入力画像データと出力画像デ
ータとの誤差を補正する方式のため、入力画像と出力画
像の濃度を保存することができ、解像度及び階調性共に
優れた画像を提供することが可能である。
[Problems to be Solved by the Invention] The above-mentioned error diffusion method is a method of correcting an error between input image data and output image data, and therefore the densities of the input image and the output image can be saved, and the resolution and the level It is possible to provide an image with excellent tonality.

しかしながら、誤差拡散法は入力画像データと出力画
像データとの誤差を補正する際、多くの2次元演算をし
なければならず、その処理量の多さにより、ハードウエ
ア構成が大変複雑になるといった欠点があった。
However, the error diffusion method has to perform many two-dimensional operations when correcting an error between input image data and output image data, and the hardware configuration becomes very complicated due to the large amount of processing. There were drawbacks.

又、平均濃度近似法は2値化後の2値データを用いて
演算を行うので、ハードウエア構成を簡素化することが
できると共に極めて少ない処理量のため、処理の高速化
を実現することが可能である。
In addition, since the average density approximation method uses the binary data after binarization, the operation can be simplified, so that the hardware configuration can be simplified and the processing speed can be increased due to the extremely small amount of processing. It is possible.

しかしながら、平均濃度近似法は、単に注目画素を含
めた領域の平均値に注目画素を近似させ、2値化を行う
ので階調数が制限されるとともに、なだらかな濃度変化
を有する画像に対して特有の低周波のテクスチヤが発生
し、画質が劣化するといった欠点があった。
However, the average density approximation method simply approximates a target pixel to an average value of a region including the target pixel and performs binarization, so that the number of gradations is limited and an image having a gentle density change is obtained. There is a drawback that a peculiar low-frequency texture is generated and image quality is deteriorated.

〔課題を解決するための手段及び作用〕[Means and actions for solving the problem]

本発明は上述した従来技術の欠点を除去することを目
的とし、階調性及び解像度共に優れた画像を簡単なハー
ドウエア構成で短時間に得ることができる画像処理装置
を提供するものである。
The present invention aims to eliminate the above-mentioned drawbacks of the prior art, and provides an image processing apparatus capable of obtaining an image excellent in both gradation and resolution in a short time with a simple hardware configuration.

即ち、本発明の画像処理装置は、注目画素のデータを
入力する入力手段と、所定領域の平均濃度値を求める演
算手段と、前記演算手段により得られた平均濃度値に基
づき前記注目画素のデータを量子化する量子化手段と、
前記量子化の際発生する誤差が所定範囲内の時前記誤差
を補正する補正手段とを有す。
That is, the image processing apparatus of the present invention includes an input means for inputting data of a pixel of interest, a calculating means for obtaining an average density value of a predetermined area, and data of the pixel of interest based on the average density value obtained by the calculating means. Quantizing means for quantizing
And a correction means for correcting the error generated when the quantization is within a predetermined range.

〔実施例〕〔Example〕

以下、本発明の実施例を図面を用いて詳細に説明す
る。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

実施例1 まず本方式の原理について説明する。Example 1 First, the principle of this system will be described.

第1図(1)は、入力画像の画素毎の多値データを示
す図である。
FIG. 1 (1) is a diagram showing multi-value data for each pixel of an input image.

第1図(1)においてf(i,j)は2値化しようとす
る注目画素位置の入力画像の多値濃度データを示し、正
規化された0〜1の値とする。また、破線より上の画素
位置はすでに2値化処理が終了しており、注目画素の2
値化後は、f(i,j+1),f(i,j+2)…と順次同様の
処理が行われる。
In FIG. 1 (1), f (i, j) indicates multi-value density data of the input image at the target pixel position to be binarized, and is a normalized value of 0 to 1. Further, the pixel position above the broken line has already been binarized,
After the value conversion, the same processing is sequentially performed as f (i, j + 1), f (i, j + 2).

第1図(2)は2値化画像データを表す図であり、B
(i,j)は注目画素の2値化後の濃度(0又は1の値と
する)を示す。破線により囲まれた部分は、注目画素の
処理時にはすでに2値化処理の行われた画素データであ
り、これらを注目画素の2値化処理の際用いる。
FIG. 1 (2) is a diagram showing the binarized image data.
(I, j) indicates the binarized density (0 or 1) of the target pixel. The portion surrounded by the broken line is pixel data that has already been binarized when the pixel of interest is processed, and these are used in the binarization process of the pixel of interest.

第1図(3)は重み付けマスクを表す図である。Rは
平均濃度を求めるための重み付けマスクの一例で、3×
3サイズのマトリツクスで表している。注目画素にあた
る位置の重みはR(0,0)とし、又R(0,−1)=0と
して用いる。
FIG. 1 (3) is a diagram showing a weighting mask. R is an example of a weighting mask for obtaining an average density, and 3 ×
It is represented by a matrix of three sizes. The weight of the position corresponding to the target pixel is R (0,0), and R (0, -1) = 0 is used.

本方式は、注目画素を黒又は白のいずれかに2値化し
た場合の注目画素近傍における出力画像の平均濃度を、
それぞれm1(i,j),m0(i,j)とし、次式で求める。
This method calculates the average density of the output image near the target pixel when the target pixel is binarized to either black or white.
Let m1 (i, j) and m0 (i, j) be the respective equations.

(ただし、B(i,j)=1すなわち、注目画素を黒とし
た場合とする) (ただし、B(i,j)=0すなわち、注目画素を白とし
た場合とする) ここでSは重みRの総和で、例えば第3図の重みマス
クを用いる場合にはS=29となる。
(However, it is assumed that B (i, j) = 1, that is, the target pixel is black) (However, it is assumed that B (i, j) = 0, that is, the target pixel is white.) Here, S is the total sum of the weights R. For example, when the weight mask of FIG. 3 is used, S = 29. .

注目画素f(i,j)は該平均値m1,m0及びすでに割り付
けられた2値化補正値E(i,j)を用いて、次式に従い
2値化される。
The target pixel f (i, j) is binarized according to the following equation using the average values m1, m0 and the binarized correction value E (i, j) already assigned.

上記式において、E(i,j)は注目画素(i,j)の1
画素前の画素(i,j−1)の多値濃度データf(i,j−
1)を2値濃度データB(i,j−1)に2値化した際に
発生する誤差である。つまり、入力画素濃度データf
(i,j−1)から1又は0に2値化されたことは、画素
(i,j−1)がその近似での平均濃度であるm1(i,j−
1)又はm0(i,j−1)のいずれかに近傍されたことを
意味し、それぞれの場合に入力画像の多値濃度f(i,j
−1)との間にf(i,j−1)−m1又はf(i,j−1)−
m0の誤差が発生する。そこで、この2値化誤差E(i,
j)を注目画素f(i,j)に加えて補正した値を2値化す
ることにより、入力画像全域にわたって2値化後の画像
上で濃度を完全に保存することができる。このような2
値化誤差を考慮した処理を行うことにより、上述の平均
濃度近似法と比較すると、中間調再生能力が格段に向上
する。
In the above equation, E (i, j) is 1 of the pixel of interest (i, j).
Multi-value density data f (i, j−) of the pixel (i, j−1) before the pixel
This is an error that occurs when 1) is binarized into binary density data B (i, j-1). That is, the input pixel density data f
The binarization from (i, j-1) to 1 or 0 means that the pixel (i, j-1) is the average density in the approximation m1 (i, j-
1) or m0 (i, j-1), which means that in each case, the multi-valued density f (i, j) of the input image is
-1) and f (i, j-1) -m1 or f (i, j-1)-
An error of m0 occurs. Therefore, this binarization error E (i,
By binarizing the corrected value by adding j) to the target pixel f (i, j), the density can be completely preserved on the binarized image over the entire input image. Such 2
By carrying out the processing in consideration of the digitization error, the halftone reproduction capability is remarkably improved as compared with the above-mentioned average density approximation method.

また、式においてE(i,j+1)は注目画素の(i,
j)の1画素後の画素(i,j+1)に振り分けられる誤差
である。第2図に示すように、E(i,j+1)はf(i,
j)+E(i,j)>(m1+m0)/2の場合はf(i,j)+E
(i,j)からm1をひいたもの、f(i,j)+E(i,j)≦
(m1+m0)/2の場合はf(i,j)+E(i,j)からm0をひ
いたものとなる。
In the equation, E (i, j + 1) is (i, j) of the pixel of interest.
The error is assigned to the pixel (i, j + 1) one pixel after j). As shown in FIG. 2, E (i, j + 1) is f (i, j,
j) + E (i, j)> (m1 + m0) / 2, then f (i, j) + E
(I, j) minus m1, f (i, j) + E (i, j) ≦
In the case of (m1 + m0) / 2, it is obtained by subtracting m0 from f (i, j) + E (i, j).

また、本実施例が誤差拡散法と比較して処理量が極め
て少ないにもかかわらず、これと同時もしくはそれ以上
の像再生能力が得られるのは、前記誤差を隣接する1画
素で補正するのみであるのにもかかわらず、2値化後の
複数データを用いて平均濃度を得ることにより、等価的
に複数画素に誤差を分配して補正するのと同等の効果が
得られるからである。
Further, although the present embodiment has an extremely small processing amount as compared with the error diffusion method, it is possible to obtain the image reproducing ability at the same time as or more than this, only by correcting the error by one adjacent pixel. Despite this, by obtaining the average density using a plurality of data after binarization, an effect equivalent to that in which an error is equivalently distributed and corrected by a plurality of pixels can be obtained.

さて、本実施例では、前述誤差の補正されたデータ
(f(i,j)+E(i,j))が所定の範囲にあるときに誤
差(E(i,j+1)=f(i,j)+E(i,j)−m0(i,
j))の補正を行う。つまり、次画素2値化の際の誤差
E(i,j+1)が、 とし、上記以外の場合には、 とする。
In the present embodiment, when the error-corrected data (f (i, j) + E (i, j)) is within a predetermined range, the error (E (i, j + 1) = f (i, j). ) + E (i, j) -m0 (i,
j)) is corrected. That is, the error E (i, j + 1) when binarizing the next pixel is And in other cases, And

つまり、本方式の特徴とする処理は上記式,に示
す様、2値化時の平均値m1及びm0と注目画素補正値の比
較において、該注目画素補正値が選択された平均値m1あ
るいはm0に近い値をとる所定(αの値による)領域内
(誤差E(i,j+1)が所定領域内)であれば式に従
って、上記選択された平均値と注目画素補正値との差分
を次画素2値化時の補正値として割り付ける。一方、上
記所定領域外、つまり注目画素補正値のm1及びm0からの
差が十分大きい場合は該補正値を0とし、次画素2値化
時の補正は行わない事とする。
In other words, the processing that is characteristic of this method is, as shown in the above equation, in comparing the average values m1 and m0 at the time of binarization with the target pixel correction value, the target pixel correction value is the selected average value m1 or m0. If the difference is between the selected average value and the pixel-of-interest correction value according to the equation, if the difference is within the predetermined area (error E (i, j + 1) is within the predetermined area) taking a value close to Assign as a correction value when binarizing. On the other hand, when the difference between the target pixel correction value and m1 and m0 is outside the predetermined area, the correction value is set to 0, and the correction for binarizing the next pixel is not performed.

つまり、前者は注目画素近傍の画像の濃度変化が小さ
く、従って、中間調を有する画像域であると判断出来、
したがって2値化する事によって発生する平均濃度値と
の差分を次画素で補正する事により画像のなめらかな濃
度変化を忠実に擬似中間処理出来る。つまり、階調性を
向上することができる。一方、後者は逆に文字,線画等
におけるエツジ部分、つまり注目画素が近傍画像濃度に
比べて急激に変化していると判断出来、従って、その場
合の画素に対しては補正値を0とし、濃度を保存する事
による解像力の低下を抑えて2値再生する。これによ
り、エツジ部分における解像度を向上することができ
る。
In other words, the former has a small change in the density of the image in the vicinity of the pixel of interest, and can therefore be judged to be an image area having halftones.
Therefore, by correcting the difference from the average density value generated by binarizing with the next pixel, the pseudo intermediate processing of the smooth density change of the image can be faithfully performed. That is, the gradation can be improved. On the other hand, in the latter case, it is possible to determine that the edge portion of the character, line drawing, or the like, that is, the pixel of interest changes drastically compared to the density of the neighboring image. Therefore, the correction value is 0 for the pixel in that case, Binary reproduction is performed while suppressing the decrease in resolution due to storage of density. Thereby, the resolution in the edge portion can be improved.

このように、本実施例の特徴的処理方式は、上記画像
濃度変化に応じて中間調画像域は2値化誤差を用いて2
値化画像上で濃度を保存すると共に文字等の解像画像部
においては、上記濃度保存による像のぼけを防止する為
に2値化誤差の補正を行わず、平均濃度値m1,m0に近似
させるものである。
As described above, according to the characteristic processing method of the present embodiment, the halftone image area is binarized by using the binarization error according to the image density change.
The density is saved on the binarized image, and in the resolution image part such as characters, the binarization error is not corrected in order to prevent the blurring of the image due to the above density storage, and the average density values m1 and m0 are approximated. It is what makes me.

第4図は、本発明の一実施例を示す画像処理装置のブ
ロツク図である。入力センサ部AはCCD等の光電変換素
子およびこれを走査する駆動装置より構成され原稿の読
み取り走査を行う。入力センサ部Aで読み取られた原稿
の画像データは、逐次A/D変換器Bに送られる。ここで
は各画素のデータを6ビツトのデジタルデータに変換
し、64レベルの階調数をもつデータに量子化する。次に
補正回路CにおいてCCDセンサーの感度ムラや照明光源
による照度ムラを補正するためのシエーデイング補正等
をデジタル演算処理で行う。次に、この補正処理済のデ
ータを2値化回路Dに送出する。2値化回路Dでは入力
した6ビツト多値の画像データを前述した方式により1
ビツト2値のデータに量子化処理する。プリンタEはレ
ーザビーム又はインクジエツト方式により構成されるプ
リンタで、2値化回路Dから送られてくる2値データに
基づきドツトをオン/オフ制御し、画像を記録紙上に再
現する。
FIG. 4 is a block diagram of an image processing apparatus showing one embodiment of the present invention. The input sensor unit A includes a photoelectric conversion element such as a CCD and a driving device for scanning the same, and performs scanning of a document. The image data of the document read by the input sensor unit A is sequentially sent to the A / D converter B. Here, the data of each pixel is converted into 6-bit digital data and quantized to data having 64 levels of gradation. Next, in the correction circuit C, the shading correction for correcting the sensitivity unevenness of the CCD sensor and the illuminance unevenness due to the illumination light source is performed by digital calculation processing. Next, the corrected data is sent to the binarization circuit D. In the binarization circuit D, the input 6-bit multi-valued image data is converted into 1
Quantization processing is performed on bit binary data. The printer E is a printer configured by a laser beam or an ink jet system, and controls the dot on / off based on the binary data sent from the binarization circuit D to reproduce an image on a recording sheet.

第5図は第4図における2値化回路Dの詳細を示した
ブロツク図である。
FIG. 5 is a block diagram showing details of the binarizing circuit D in FIG.

第5図において、1,2は2値化処理された2値データ
を1ライン分記憶する遅延RAM、3〜7,11は2値データ
を1画素遅延させるためのDF/F(フリツプフロツプ)、
8は注目画素周辺の平均濃度を演算し、閾値を出力する
平均濃度演算ROM、9は入力された注目画素の多値デー
タと前記閾値との差を演算する減算器、10はROM8から出
力される閾値と注目画素の多値データを比較する比較
器、11はDF/F、12は注目画素の次に入力される多値デー
タに加算されるべき誤差データを演算するROM、13は入
力データとROM12から出力される誤差データを加算する
加算器である。
In FIG. 5, reference numerals 1 and 2 denote a delay RAM for storing one line of binary data subjected to the binarization processing, reference numerals 3 to 7, 11 denote DF / Fs (flip flops) for delaying the binary data by one pixel,
8 is an average density calculation ROM for calculating the average density around the target pixel and outputting a threshold value; 9 is a subtractor for calculating the difference between the input multi-value data of the target pixel and the threshold value; 10 is output from the ROM 8 11 is a DF / F, 12 is a ROM for calculating error data to be added to the multi-value data input next to the pixel of interest, and 13 is input data. And an adder for adding the error data output from the ROM 12.

上記構成において、比較器10は式に基づき2値化し
た1bitのデータB(i,j)をDF/F7,プリンタEに出力す
る。該2値データは、ライン毎に遅延させるためのRAM
2,RAM1に入力され、RAM2により1ライン遅延させた2値
データB(i−1,j+1)、RAM1により2ライン遅延さ
せた2値データB(i−2,j+1)がROM8に出力され
る。
In the above configuration, the comparator 10 outputs 1-bit data B (i, j) binarized based on the equation to the DF / F7 and the printer E. The binary data is stored in a RAM for delaying each line.
2, Binary data B (i-1, j + 1) input to RAM1 and delayed by one line by RAM2, and binary data B (i-2, j + 1) delayed by two lines by RAM1 are output to ROM8. .

さらに、DF/F3はB(i−2,j)、DF/F4は(i−2,j−
1)、DF/F5は(i−1,j)、DF/F6は(i−1,j−1)、
DF/F7は(i,j−1)をROM8に出力する。
Further, DF / F3 is B (i-2, j), and DF / F4 is (i-2, j-
1), DF / F5 is (i-1, j), DF / F6 is (i-1, j-1),
DF / F7 outputs (i, j-1) to ROM8.

上記2値データは、第1図に示すように入力画像f
(i,j)に対し、周辺画素の2値化画像であり、これら
をROM8の入力アドレスに接続すれば、ROM8にはあらかじ
め式,式に基づき、式に示す2値化閾値(m1(i,
j)+m0(i,j))/2が格納されているので、高速に2値
化閾値を得ることができる。
The binary data is input image f as shown in FIG.
(I, j) is a binarized image of peripheral pixels, and if these are connected to the input address of the ROM 8, the ROM 8 previously stores the binarized threshold (m1 (i ,
Since j) + m0 (i, j)) / 2 is stored, the binarization threshold value can be obtained at high speed.

この閾値は、減算器9及び比較器10に入力される。一
方、減算器9及び比較器10にはDF/F11からf(i,j)+
E(i,j)が入力される。
This threshold is input to the subtractor 9 and the comparator 10. On the other hand, the subtractor 9 and the comparator 10 provide f (i, j) +
E (i, j) is input.

この2つの入力に基づき、減算器9は式における不
等式の両辺の差 f(i,j)+E(i,j)−(m1(i,j)+m0(i,j))/2 を演算する。上記は式,を用いて変形すれば、 となる。
Based on these two inputs, the subtractor 9 calculates the difference f (i, j) + E (i, j)-(m1 (i, j) + m0 (i, j)) / 2 between the two sides of the inequality in the equation. . If the above is transformed using the equation, Becomes

一方、比較器10は上記2つの入力に基づき、f(i,
j)+E(i,j)と(m1(i,j)+m0(i,j))/2を比較
し、2値化データB(i,j)を出力する。
On the other hand, the comparator 10 calculates f (i,
j) + E (i, j) is compared with (m1 (i, j) + m0 (i, j)) / 2 to output binary data B (i, j).

つまり、ROM12では比較器10からのB(i,j)の値と減
算器9からのf(i,j)−E(i,j)−(m1(i,j)+m0
(i,j))/2から式で示したE(i,j+1)を演算す
る。
That is, in the ROM 12, the value of B (i, j) from the comparator 10 and f (i, j) -E (i, j)-(m1 (i, j) + m0 from the subtractor 9
E (i, j + 1) expressed by the equation is calculated from (i, j)) / 2.

上記式において、重みR(0,0)及びSは既知なの
で、式,に従う2値化誤差E(i,j+1)をあらか
じめ演算し、誤差演算ROM12に記憶させておくことによ
り、前記2値化データB(i,j)と減算器9の出力であ
る。
In the above formula, since the weights R (0,0) and S are known, the binarization error E (i, j + 1) according to the formula is calculated in advance and stored in the error calculation ROM 12, so that the binarization is performed. These are the data B (i, j) and the output of the subtractor 9.

f(i,j)+E(i,j)−(m1(i,j)+m0(i,j))/2 をROM12に入力すれば、テーブル変換でE(i,j+1)が
得られる。
If f (i, j) + E (i, j)-(m1 (i, j) + m0 (i, j)) / 2 is input to the ROM 12, E (i, j + 1) is obtained by table conversion.

第6図にROM12に格納されているテーブルの一例を示
す。
FIG. 6 shows an example of a table stored in the ROM 12.

なお、本実施例においては第3図に示す重みマスク1
を用いたので、実際に入力される6bit画像濃度レベル
(0〜63)に正規化する為に平均濃度演算ROMテーブル
は式,で得られた値を63倍して6bit値に変換した値
として格納しておく。この場合、重みマスク1は第7図
に示したものとなる。
In this embodiment, the weight mask 1 shown in FIG.
In order to normalize to the actually input 6-bit image density level (0 to 63), the average density calculation ROM table is converted into a 6-bit value by multiplying the value obtained by the formula by 63. Store it. In this case, the weight mask 1 is as shown in FIG.

第6図においては式におけるα=1とした場合のテ
ーブルを示しており、E(i,j+1)がR(0,0)=18よ
り大きい場合、E(i,j+1)を0としている。
FIG. 6 shows a table when α = 1 in the equation, and when E (i, j + 1) is larger than R (0,0) = 18, E (i, j + 1) is set to 0.

尚、減算器9の出力f(i,j)+E(i,j)−(m1(i,
j)+m0(i,j))/2は絶対値としてROM12に入力され、
B(i,j)の値に応じて正,負が決定される。
The output f (i, j) + E (i, j)-(m1 (i,
j) + m0 (i, j)) / 2 is input to ROM12 as an absolute value,
Positive or negative is determined according to the value of B (i, j).

ROM12で得られた誤差E(i,j+1)は加算器13により
入力画像データf(i,j+1)に加えられる。DF/F11は
加算値をデータ1クロツク期間遅延する。
The error E (i, j + 1) obtained by the ROM 12 is added to the input image data f (i, j + 1) by the adder 13. The DF / F11 delays the added value by one data period.

以上、本実施例は平均濃度近似法に比べて、数チツプ
の演算ICを付加する程度で簡単に実現できる。
As described above, this embodiment can be easily realized by adding a few chips of the operation IC as compared with the average density approximation method.

以上、説明した如く、本発明の第1の実施例によれ
ば、既に2値化されたデータに基づき、平均濃度を演算
し、その平均濃度に基づき2値化処理を行うので、2値
化のための処理量を極めて軽減することができる。しか
も2値化した際発生する平均濃度と入力多値データの差
が所定範囲内の時、その差を補正するので、階調性に優
れた中間調処理を行うことができる。
As described above, according to the first embodiment of the present invention, the average density is calculated based on the already binarized data, and the binarization processing is performed based on the average density. The processing amount for can be significantly reduced. Moreover, when the difference between the average density generated when binarizing and the input multi-valued data is within the predetermined range, the difference is corrected, so that the halftone processing excellent in gradation can be performed.

更に、本実施例では、平均濃度と入力多値データの差
が所定値より大きい時は、その差を補正しないので、濃
度を保存することによる解像度の低下を防ぎ、エツジ部
を鮮明に再現することができる。
Further, in the present embodiment, when the difference between the average density and the input multi-valued data is larger than the predetermined value, the difference is not corrected, so that the resolution is prevented from being lowered by storing the density, and the edge portion is clearly reproduced. be able to.

なお、本実施例においては、式で2値化誤差Eは次
画素のみに振り分けて補正したが、所定配分率で二次元
的に複数の近傍画素に振り分けるようにしても良い。こ
の場合、ハード構成は多少複雑となるが、主走査方向と
ともに副走査方向についても均一な画像を得ることがで
き、再現性が向上する。
In the present embodiment, the binarization error E is corrected by allocating it to only the next pixel in the formula, but it may be allocated two-dimensionally to a plurality of neighboring pixels at a predetermined allocation rate. In this case, although the hardware configuration is somewhat complicated, a uniform image can be obtained in the main scanning direction as well as the sub scanning direction, and reproducibility is improved.

また、2値化誤差Eを、例えば第1図において、画素
(i,j+1)へ3E(i,j+1)/4、画素(i,j+2)へE
(i,j+1)/4の如く複数画素へ分配すれば平均処理マ
スクが小さくとも階調性の再現能力は向上する。
Further, the binarization error E is, for example, 3E (i, j + 1) / 4 to pixel (i, j + 1) and E to pixel (i, j + 2) in FIG.
If the pixels are distributed to a plurality of pixels such as (i, j + 1) / 4, the gradation reproducibility is improved even if the average processing mask is small.

また、重みマスクは注目画素に近づく程大きくした
が、その傾斜,分布は限定されず、隣接しない離散位置
の画素を用いても良い。
Further, although the weight mask is increased as approaching the pixel of interest, the inclination and distribution are not limited, and pixels at discrete positions that are not adjacent may be used.

また、本発明は、フアクシミリ装置,複写機をはじめ
とする画像処理装置に広く用いることができる。
Further, the present invention can be widely used in image processing apparatuses such as facsimile machines and copying machines.

実施例2 前記実施例1では、2値化誤差Eを式,で示され
る場合に分け、誤差Eが定数αを用いたある一定値以上
の場合には、誤差Eを0として次画素に振りまかないと
したが、上記定数αの値を平均濃度値あるいは注目画素
濃度値に応じて変化させることもできる。
Second Embodiment In the first embodiment, the binarization error E is divided into cases represented by the equation, and when the error E is a certain value or more using the constant α, the error E is set to 0 and is assigned to the next pixel. Although it is not covered, the value of the constant α can be changed according to the average density value or the target pixel density value.

例えば、第8図に示すように、平均濃度が0又は1に
近づく程小さくなるように設定すれば、白地中の黒文字
あるいは黒地中の白ぬき文字等のエツジ部分に対して、
より高精細に2値化することができる。
For example, as shown in FIG. 8, if the average density is set to be smaller as it gets closer to 0 or 1, it is possible to obtain an edge portion such as a black character in a white background or a white character in a black background.
It is possible to perform binarization with higher precision.

実施例3 実施例1の式のかわりに以下の式を用いる。Example 3 The following formula is used in place of the formula of Example 1.

ここでKは定数であり、K=0,1程度に設定すると良
好な結果を得ることができる。
Here, K is a constant, and good results can be obtained by setting K = 0,1.

本実施例によれば、平均濃度値が0又は1に近づいた
場合に誤差Eを0とすることにより、実施例2と同様、
文字部分を高精細に2値化することができる。
According to the present embodiment, the error E is set to 0 when the average density value approaches 0 or 1, so that the same as in the second embodiment.
The character portion can be binarized with high precision.

なお、実施例2及び本実施例3は、第5図に示すよう
に誤差演算ROM12のアドレス端子に2値化データB(i,
j)のかわりに、平均濃度演算ROM8の出力(m1(i,j)+
m0(i,j))/2を入力すれば、実施例1と同様にあらか
じめ書き込まれたデータに基づくテーブル変換処理で容
易に実施できる。
In the second and third embodiments, as shown in FIG. 5, the binary data B (i,
Instead of j), the average density calculation ROM8 output (m1 (i, j) +
By inputting m0 (i, j) / 2, it is possible to easily carry out the table conversion processing based on the prewritten data as in the first embodiment.

実施例4 実施例1においては、第3図に示す3×3マトリツク
スの重みマスクを用いたが、一般的に中間調部分をなめ
らかに2値化するためには注目画素の重みR(0,0)を
小さく設定するのが望ましい。また、式で示すエツジ
部分の検出も被2値化データの濃度変化に対して重みR
(0,0)が小さい程正確に行うことができる。従って、
第9図に示す4×5の重みマスクを用いた場合には実施
例1の第3図におけるR(0,0)が8/28=0.29であるの
に対して、第9図のそれは11/96=0.11となり、より中
間調部分はなめらかに2値化でき、かつ文字部分等のエ
ツジ部はより精細に2値再現できる。
Fourth Embodiment In the first embodiment, the weight mask of 3 × 3 matrix shown in FIG. 3 is used. Generally, in order to smoothly binarize the halftone part, the weight R (0, It is desirable to set 0) small. Further, the edge portion shown by the equation is also detected by the weight R for the density change of the binarized data.
The smaller (0,0), the more accurate the operation. Therefore,
When the 4 × 5 weight mask shown in FIG. 9 is used, R (0,0) in FIG. 3 of the first embodiment is 8/28 = 0.29, whereas that in FIG. Since /96=0.11, the halftone part can be smoothly binarized, and the edge part such as the character part can be binarized more finely.

前実施例ではすべて処理中濃度保存の為の補正値Eの
演算を、平均値m0,m1を用いて行っているが、例えばエ
ツジ部等でEを0にするか否かの判定等は公知の技術、
例えば被2値化画像データより2次元的ラプラシアンを
求め、該値を閾値処理した判定結果に基づきエツジ部を
判定し、エツジ部ではEを0にしても同様の結果が得ら
れる。又、操作者の領域指定操作で得られる指示に基づ
き、画素毎の処理の切り換えでなく広い領域でエツジ部
を指定し、その領域ではEを0にしてもよい。
In the previous embodiment, the calculation of the correction value E for storing the in-process density is performed using the average values m0 and m1. However, for example, it is publicly known whether or not E is set to 0 in the edge portion. Technology of
For example, a two-dimensional Laplacian is obtained from the binarized image data, the edge portion is determined based on the determination result obtained by thresholding the value, and the same result can be obtained even when E is 0 in the edge portion. Further, based on the instruction obtained by the operator's area specifying operation, the edge portion may be specified in a wide area instead of switching the processing for each pixel, and E may be set to 0 in that area.

尚、上記した実施例では入力多値データを2値データ
に量子化する例を説明したが、本発明は3値あるいは4
値に量子化する際も用いることができる。
In the above embodiment, an example in which the input multi-valued data is quantized into binary data has been described, but the present invention is ternary or quaternary.
It can also be used when quantizing to a value.

又、上記実施例では入力データの種類が1つ(1色)
の場合を説明したが、入力データをR,G,B3色とすること
で、本発明はカラー画像にも適用することができる。
In the above embodiment, the type of input data is one (one color).
However, the present invention can also be applied to a color image by making the input data R, G, and B colors.

〔発明の効果〕〔The invention's effect〕

以上説明した如く、本発明によれば、階調性及び解像
度共に優れた画像を簡単なハードウエア構成で短時間に
得ることができる。
As described above, according to the present invention, an image having excellent gradation and resolution can be obtained in a short time with a simple hardware configuration.

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

第1図は画素毎の多値画像,2値化画像,重み付けマスク
を示した図、 第2図は2値化処理の際発生する誤差を示した図、 第3図は重みマスクの一例を示した図、 第4図は本実施例における画像処理装置の構成を示した
ブロツク図、 第5図は第4図の2値化回路Dの詳細を示したブロツク
図、 第6図はROM12に格納されているテーブルの一例を示し
た図、 第7図は重みマスク1を6ビツトデータに変換した場合
を示す図、 第8図は本発明の第2の実施例を説明するための図、 第9図は重みマスクの他の例を示した図である。 図中、1,2は遅延RAM、3〜7はDF/F、8は平均濃度演算
ROM、9は減算器、10は比較器、11はDF/F、12はROM、13
は加算器である。
FIG. 1 is a diagram showing a multi-valued image for each pixel, a binarized image, and a weighting mask, FIG. 2 is a diagram showing errors that occur during binarization processing, and FIG. 3 is an example of the weighting mask. FIG. 4, FIG. 4 is a block diagram showing the configuration of the image processing apparatus in this embodiment, FIG. 5 is a block diagram showing the details of the binarization circuit D of FIG. 4, and FIG. FIG. 7 is a diagram showing an example of a stored table, FIG. 7 is a diagram showing a case where the weight mask 1 is converted into 6-bit data, and FIG. 8 is a diagram for explaining a second embodiment of the present invention. FIG. 9 is a diagram showing another example of the weight mask. In the figure, 1 and 2 are delay RAM, 3 to 7 are DF / F, and 8 is average density calculation.
ROM, 9 is subtractor, 10 is comparator, 11 is DF / F, 12 is ROM, 13
Is an adder.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】注目画素のデータを入力する入力手段と、 所定領域の平均濃度値を求める演算手段と、 前記演算手段により得られた平均濃度値に基づき前記注
目画素のデータを量子化する量子化手段と、 前記量子化の際発生する誤差が所定範囲内の時前記誤差
を補正する補正手段とを有すことを特徴とする画像処理
装置。
1. An input means for inputting data of a pixel of interest, a calculating means for obtaining an average density value of a predetermined area, and a quantum for quantizing the data of the pixel of interest based on the average density value obtained by the calculating means. An image processing apparatus, comprising: a converting unit; and a correcting unit that corrects the error generated when the quantization is within a predetermined range.
JP1031409A 1989-02-10 1989-02-10 Image processing device Expired - Lifetime JP2683085B2 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP1031409A JP2683085B2 (en) 1989-02-10 1989-02-10 Image processing device
DE1990626846 DE69026846T2 (en) 1989-02-10 1990-02-12 Image processing device
EP19900301475 EP0382580B1 (en) 1989-02-10 1990-02-12 Image processing apparatus
DE1990627870 DE69027870T2 (en) 1989-02-10 1990-02-12 Image processing device
EP19900301476 EP0382581B1 (en) 1989-02-10 1990-02-12 Image processing apparatus
US08/482,044 US6134355A (en) 1989-02-10 1995-06-07 Binarization using a local average, and using error diffusion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1031409A JP2683085B2 (en) 1989-02-10 1989-02-10 Image processing device

Publications (2)

Publication Number Publication Date
JPH02210962A JPH02210962A (en) 1990-08-22
JP2683085B2 true JP2683085B2 (en) 1997-11-26

Family

ID=12330462

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1031409A Expired - Lifetime JP2683085B2 (en) 1989-02-10 1989-02-10 Image processing device

Country Status (1)

Country Link
JP (1) JP2683085B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6113210A (en) * 1993-04-28 2000-09-05 Canon Kabushiki Kaisha Method and apparatus for ink-jet recording with inks having different densities
JP3397662B2 (en) * 1996-12-04 2003-04-21 キヤノン株式会社 Recording apparatus and control method for the apparatus
JP3774568B2 (en) 1998-07-30 2006-05-17 キヤノン株式会社 Recording apparatus and recording method
JP2002029072A (en) 2000-07-14 2002-01-29 Canon Inc Ink jet recording apparatus, its method, and computer readable memory
US6854822B2 (en) 2002-01-16 2005-02-15 Canon Kabushiki Kaisha Ink-jet printing method and apparatus

Also Published As

Publication number Publication date
JPH02210962A (en) 1990-08-22

Similar Documents

Publication Publication Date Title
US5121447A (en) Apparatus for performing gradation processing on image data
US5243445A (en) Picture processing apparatus
US5760918A (en) Image processing apparatus with conversion and reconversion of the number of bits per pixel
EP0382581B1 (en) Image processing apparatus
JP2683085B2 (en) Image processing device
JPH04286465A (en) Picture processor
US6134355A (en) Binarization using a local average, and using error diffusion
JP2683084B2 (en) Image processing device
JP2801195B2 (en) Image processing device
JP2810395B2 (en) Image processing device
JP2848566B2 (en) Image processing device
JP2810396B2 (en) Image processing device
JPH02210959A (en) Picture processor
JP2644491B2 (en) Image processing device
JP2675792B2 (en) Image processing device
JP2733314B2 (en) Image processing device
JP2848567B2 (en) Image processing device
JP2644492B2 (en) Image processing device
JP2848568B2 (en) Image processing device
JPH0691605B2 (en) Image processing device
JPH03109872A (en) Picture processor
JP3346111B2 (en) Image processing device
JP3178077B2 (en) Binarization processing method
JPH08204960A (en) Image processor
JPH01157166A (en) Image processor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070808

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20080808

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20080808

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 12