JPH11261818A - Image processor and image processing method - Google Patents

Image processor and image processing method

Info

Publication number
JPH11261818A
JPH11261818A JP10057731A JP5773198A JPH11261818A JP H11261818 A JPH11261818 A JP H11261818A JP 10057731 A JP10057731 A JP 10057731A JP 5773198 A JP5773198 A JP 5773198A JP H11261818 A JPH11261818 A JP H11261818A
Authority
JP
Japan
Prior art keywords
pixel
error
value
error value
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10057731A
Other languages
Japanese (ja)
Inventor
Kenji Kobayashi
研示 小林
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP10057731A priority Critical patent/JPH11261818A/en
Publication of JPH11261818A publication Critical patent/JPH11261818A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processor for preventing dots from being concentrated and displayed and the dots from being omitted at a boundary with a dense area at the time of binarizing and displaying multi-valued data for indicating the area of the thin density of images. SOLUTION: When the density of the multi-valued data of a picture element PI of attention is low and binarized data are on further, the range of other picture elements PE to be the object of an error diffusion range is widened and the range of the other picture elements PE is narrowed at the other time. By dynamically changing the error diffusion range based on the result of binarization, the dots are not concentrated around the dot and the images for which the image quality in the boundary of gradation is excellent, are displayed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プリンタなどの画
像処理装置および画像処理方法に関するものである。
The present invention relates to an image processing apparatus such as a printer and an image processing method.

【0002】[0002]

【従来の技術】ドットのオンオフを示す二値データを用
いて画像を表示するプリンタあるいはファクシミリなど
の印刷装置において、256あるいはそれ以上の多値デ
ータによって多階調表示される画像データの中間調を表
示するためにはディザマトリクスを用いたディザ法によ
る二値化処理、あるいは、誤差拡散法による二値化処理
が採用されている。
2. Description of the Related Art In a printing apparatus such as a printer or a facsimile which displays an image using binary data indicating dot on / off, a halftone of image data which is displayed in multiple gradations by 256 or more multivalued data is obtained. For display, a binarization process using a dither method using a dither matrix or a binarization process using an error diffusion method is employed.

【0003】[0003]

【発明が解決しようとする課題】近年、パーソナルコン
ピュータ(パソコン)の処理能力が向上し、これに伴っ
て、パソコンでの画像処理能力も向上しており高品質の
画像が処理され表示できるようになっている。また、ス
キャナあるいはデジタルカメラなどの画像の入力装置の
性能も向上しており、これらの機器により、従来、写真
機器でのみ取り扱えた高画質のカラー画像がパソコンを
中心としたデジタル機器によって手軽に処理できるよう
になっている。このため、出力装置であるカラープリン
タにおいても、高解像度であると共に中間調の奇麗な、
より高品位のカラープリントができることが要求されて
いる。
In recent years, the processing capability of personal computers (personal computers) has been improved, and accordingly, the image processing capabilities of personal computers have been improved, so that high-quality images can be processed and displayed. Has become. In addition, the performance of image input devices such as scanners and digital cameras has also been improved, and these devices can easily process high-quality color images that could only be handled by photographic devices in the past, using digital devices such as personal computers. I can do it. For this reason, even in a color printer which is an output device, a high resolution and a halftone beautiful,
There is a demand for higher quality color printing.

【0004】多階調の画像データの多値データ、たとえ
ば256の多値データφMを二値化して二値データφB
に変換するには、その多値データφMを閾値Th、たと
えば128と比較し、多値データφMが閾値Th以上で
あれば二値データφBをオン「1」とし、多値データφ
Mが閾値Th以下であれば二値データφBをオフ「0」
とする方法が採用される。そして、二値データφBがオ
ンのときにドットを表示し、二値データφBがオフのと
きはドットを表示しないといった画像処理方法が採用さ
れる。中間調を表示するために誤差拡散法を用いた画像
処理方法においては、ある画素(注目画素)のドットを
表示する、あるいは表示しないという結果に応じ、注目
画素の多値データφMと二値データφBとの差を誤差値
Eとして計算し、注目画素の周囲を構成する他の画素に
対しするドットを表示するか否かの判断材料の1つとし
て用いることにより、多階調のオリジナルの画像とほぼ
同様の明るさ(濃さ)が得られるようにしている。
[0004] Multi-value data of multi-gradation image data, for example, 256 multi-value data φM is binarized to form binary data φB.
Is converted to a threshold value Th, for example, 128. If the multivalued data φM is equal to or greater than the threshold value Th, the binary data φB is turned on “1”, and the multivalued data φM is turned on.
If M is less than or equal to threshold Th, binary data φB is turned off “0”
Is adopted. Then, an image processing method is adopted in which dots are displayed when the binary data φB is on, and no dots are displayed when the binary data φB is off. In an image processing method using an error diffusion method for displaying a halftone, multi-value data φM and binary data of a pixel of interest are determined according to the result of displaying or not displaying a dot of a certain pixel (pixel of interest). By calculating the difference from φB as an error value E and using it as one of the judgment materials for determining whether or not to display dots for other pixels constituting the periphery of the target pixel, an original image of multiple gradations is obtained. Almost the same brightness (density) is obtained.

【0005】従来の画像処理装置においては、誤差値E
は、あらかじめ設定された割合であらかじめ設定された
範囲の他の画素に影響を与えるように分配されており、
その範囲の設定あるいは分配率の設定について、画質と
の関係で見直されることはほとんどなかった。そこで、
さらに高品位の、写真画質に近い、あるいはそれ以上の
画質のカラープリントが要求されさているという状況に
対応し、本願の発明者らは、誤差拡散の範囲あるいは分
配率といった要素が画質に与える影響を見極め、さら
に、本願において、誤差拡散の範囲あるいは分配率を適
切に設定することにより、高品位の画像を表示あるいは
印刷などの方法により記録することができる画像処理装
置および画像処理方法を提供することを目的としてい
る。
In a conventional image processing apparatus, an error value E
Is distributed at a preset rate to affect other pixels in a preset range,
The setting of the range or the setting of the distribution ratio was hardly reviewed in relation to the image quality. Therefore,
In response to the demand for color prints of higher quality, close to photographic quality, or better, the inventors of the present application have determined that the influence of factors such as the range of error diffusion or the distribution ratio on image quality. Further, the present application provides an image processing apparatus and an image processing method capable of recording a high-quality image by a method such as display or printing by appropriately setting a range or a distribution ratio of error diffusion. It is intended to be.

【0006】[0006]

【課題を解決するための手段】このため、本願の発明者
らは、誤差拡散の範囲あるいは分配率といった要素が二
値化された画像にどのような影響を与えるかについて検
討した。図1および図2にその実験結果の一例を示して
ある。図1(a)および図2(a)に示した図は、画像
濃度の低い部分1は多値データφMの値が「7」の領域
を二値化して表示した結果、また、画像濃度の高い部分
2は多値データφMの値が「125」の領域を二値化し
て表示した結果である。そして、それらの結果を1つの
色、すなわち黒色Kで代表して示したものである。
For this reason, the inventors of the present application have examined how factors such as the range of error diffusion or the distribution ratio affect a binarized image. 1 and 2 show an example of the experimental results. FIGS. 1A and 2A show the result of binarizing and displaying an area where the value of the multi-value data φM is “7” in the low image density portion 1. The high portion 2 is a result of binarizing and displaying an area where the value of the multi-value data φM is “125”. These results are represented by one color, that is, black K.

【0007】図1(a)に示した結果は、注目画素PI
で発生した誤差を図1(b)で示すような比較的狭い範
囲の他の画素PEに分配したものであり、これに対し、
図2(a)に示した結果は、注目画素PIで発生した誤
差を図2(b)に示すような比較的広い範囲の他の画素
PEに分配したものである。
[0007] The result shown in FIG.
Is distributed to other pixels PE in a relatively narrow range as shown in FIG. 1B.
The result shown in FIG. 2A is obtained by distributing the error generated in the pixel of interest PI to a relatively wide range of other pixels PE as shown in FIG. 2B.

【0008】図1(b)においては、注目画素PI
(m,n)で発生した誤差値Eが同じラインで後続の2
つの画素PE(m,n+1)およびPE(m,n+2)
と、次のラインの4つの画素PE(m+1,n−2)か
らPE(m+1,n+1)に分散されている。一方、図
2(b)では、注目画素PI(m,n)で発生した誤差
値Eが同じラインで後続の4つの画素PE(m,n+
1)からPE(m,n+4)と、次のラインの8つの画
素PE(m+1,n−5)からPE(m+1,n+2)
に分散されている。
In FIG. 1B, the target pixel PI
The error value E generated at (m, n) is
Two pixels PE (m, n + 1) and PE (m, n + 2)
And the four pixels PE (m + 1, n−2) on the next line are distributed to PE (m + 1, n + 1). On the other hand, in FIG. 2B, the error value E generated at the pixel of interest PI (m, n) has the same four pixels PE (m, n +) on the same line.
1) to PE (m, n + 4), and eight pixels PE (m + 1, n-5) of the next line to PE (m + 1, n + 2)
Are distributed.

【0009】これらの図に示されたように、誤差拡散法
を用いることにより、二値データφBにより、多値デー
タφMの中間調の濃淡の差は良く表現される。しかしな
がら、このような誤差値の分配範囲を変えていくつかの
シミュレーションを繰り返すことにより、本願の発明者
らは、分配範囲が画質に与える影響を見出すことができ
た。まず、図1(a)に示したように、誤差の分配範囲
が狭い、すなわち、注目画素の近傍の他の画素に対する
分配比率が高いケースでは、画像濃度の低い領域1で、
ドットが集中して表示されるという現象が見られる。一
方、図2(a)に示すように、誤差の分配範囲が広い、
すなわち、注目画素より離れた他の画素に対しても誤差
が分配されるケースでは、画像濃度が低い領域1ではド
ットが均等に奇麗に表示されるが、画像濃度が低い領域
1と、画像濃度が高い領域2との境界近傍で、ドットが
表示されない(ドットが抜ける)という図1(a)では
見られない現象が発生することが本願の発明者らによっ
て見出された。
As shown in these figures, by using the error diffusion method, the difference between the halftones of the multi-value data φM is well represented by the binary data φB. However, by repeating some simulations while changing the distribution range of such error values, the inventors of the present application were able to find out the influence of the distribution range on the image quality. First, as shown in FIG. 1A, in the case where the distribution range of the error is narrow, that is, in the case where the distribution ratio to the other pixels in the vicinity of the target pixel is high, in the region 1 where the image density is low,
There is a phenomenon that dots are displayed in a concentrated manner. On the other hand, as shown in FIG.
In other words, in the case where the error is distributed to other pixels further away from the pixel of interest, the dots are uniformly and clearly displayed in the low image density area 1, but the low image density area 1 and the low image density It has been found by the inventors of the present application that a phenomenon that dots are not displayed (dots are missing), which is not seen in FIG.

【0010】このような、画像濃度の低い領域における
ドットの表示挙動は、それほど目立つものではない。し
かしながら、より高品位の画像を得るには、中間調の領
域をより均質に奇麗に表示することが重要であり、その
ためには画像濃度の低い領域でドットがほぼ均等に表示
され、さらに、濃度の低い領域と高い領域との境目にお
いてもドットの表示状況が変化しないようにする必要が
ある。これに対し、濃度の低い領域でドットの集中度が
低く、さらに、濃度の濃い領域と薄い領域の境界部分に
おけるドットの抜けが少なくなるような中間的な分配範
囲あるいは分配比率を設定することも可能であるが、本
発明においては、分配範囲あるいは分配比率をドットの
表示結果によって動的に変化させることにより、分配範
囲を狭くしたときのメリットと、分配範囲を広くしたと
きのメリットを積極的に利用して中間調領域の表示グレ
ードを大幅に向上できるようにしている。
The display behavior of dots in such a low image density area is not so noticeable. However, in order to obtain a higher-quality image, it is important to display the halftone area more uniformly and beautifully. For that purpose, the dots are displayed almost uniformly in the low image density area, and furthermore, the density is low. It is necessary to prevent the display state of the dots from changing even at the boundary between the low and high areas. On the other hand, it is also possible to set an intermediate distribution range or distribution ratio in which the concentration of dots is low in a low-density area, and further, the dropout of dots at the boundary between a high-density area and a low-density area is reduced. Although it is possible, in the present invention, by dynamically changing the distribution range or the distribution ratio depending on the display result of the dots, the merits when the distribution range is narrowed and the advantages when the distribution range is widened are positively increased. To significantly improve the display grade in the halftone area.

【0011】すなわち、本発明の、多階調の画像データ
を二値化可能な画像処理装置は、注目画素を二値化する
際に発生した誤差値を、この注目画素の周囲に位置する
他の画素の誤差値として分配する誤差分配部と、注目画
素の多値データを、注目画素の誤差値を加味して二値化
する二値化部とを有し、誤差分配部は、二値化部におけ
る二値化の結果および多値データに基づき他の画素の範
囲、または、他の画素に対しする誤差値の分配比率を変
更可能であることを特徴としている。また、本発明の、
多階調の画像データを二値化する画像処理方法において
は、注目画素を二値化する際に発生した誤差値を、この
注目画素の周囲に位置する他の画素の誤差値として分配
する誤差分配工程と、注目画素の多値データを、注目画
素の誤差値を加味して二値化する二値化工程とを有し、
誤差分配工程では、二値化工程における二値化の結果お
よび多値データに基づき他の画素の範囲、または、他の
画素に対する誤差値の分配比率を変更可能であることを
特徴としている。
That is, according to the image processing apparatus of the present invention capable of binarizing multi-gradation image data, an error value generated when binarizing a target pixel is calculated by using an error value located around the target pixel. An error distributing unit that distributes the error value of the pixel of interest, and a binarizing unit that binarizes the multi-value data of the pixel of interest in consideration of the error value of the pixel of interest. It is characterized in that the range of other pixels or the distribution ratio of error values to other pixels can be changed based on the binarization result in the conversion unit and the multi-value data. Also, according to the present invention,
In an image processing method for binarizing multi-tone image data, an error value generated when binarizing a target pixel is distributed as an error value of another pixel located around the target pixel. A distribution step, and a binarization step of binarizing the multi-value data of the pixel of interest in consideration of an error value of the pixel of interest,
The error distribution step is characterized in that a range of another pixel or a distribution ratio of an error value to another pixel can be changed based on a result of binarization in the binarization step and multi-valued data.

【0012】このような、誤差値の拡散範囲あるいは分
配の比率が固定されているのではなく、二値化の結果お
よび多値データによって注目画素毎に変えられる画像処
理装置あるいは画像処理方法を採用することにより、注
目画素の多値データが所定の値より小さく濃度が低いと
きに、注目画素がオンすると他の画素の範囲を広げる
か、または、近傍の他の画素に対する誤差値の分配比率
を下げて周辺の他の画素に対する誤差値の分配比率を上
げることができる。したがって、画像の濃度が低い領域
で画素が集中して表示されるのを防止でき、濃度の薄い
領域をより均等に分布したドットにより表現することが
できる。また、注目画素がオンでないときは、他の画素
の範囲を狭く、あるいは、近傍の他の画素に対する誤差
値の分配比率を高くしておけるので、濃度の高い領域と
の境界でもドットが均等に表示され、ドットの抜け(飛
び)がなく、中間調の表示が美しい高品位の画像を表示
することができる。
Such an image processing apparatus or image processing method is employed in which the diffusion range or distribution ratio of error values is not fixed, but can be changed for each pixel of interest by the result of binarization and multi-valued data. By doing so, when the multi-value data of the target pixel is smaller than a predetermined value and the density is low, when the target pixel is turned on, the range of another pixel is expanded, or the distribution ratio of the error value to other neighboring pixels is increased. By lowering it, the distribution ratio of the error value to other surrounding pixels can be increased. Therefore, it is possible to prevent the pixels from being displayed in a concentrated manner in the low-density area of the image, and to express the low-density area with more evenly distributed dots. Also, when the target pixel is not on, the range of other pixels can be narrowed, or the distribution ratio of error values to other nearby pixels can be increased, so that the dots are evenly distributed even at the boundary with the high density area. It is possible to display a high-quality image which is displayed, has no missing dots (skipping), and has a beautiful halftone display.

【0013】本発明の画像処理装置および画像処理方法
は、ソフトウェアを用いてパーソナルコンピュータなど
において実現することができる。また、ハードウェア的
に上記の画像処理を行うことも可能である。このため
に、誤差分配部は、ラインを構成する各々の画素の誤差
値を記録可能な誤差メモリと、他の画素の誤差値を記憶
可能なレジスタ群と、このレジスタ群の各々のレジスタ
に対し注目画素の誤差値を所定の分配比率で加算可能な
誤差演算部と、加算されたレジスタの値の少なくとも一
部を誤差メモリに記録可能な記録部とに加え、分配比率
を注目画素の二値化の結果および多値データに基づき変
更可能な設定部を設けることが望ましい。
The image processing apparatus and the image processing method of the present invention can be realized in a personal computer or the like using software. Further, the above-described image processing can be performed by hardware. For this purpose, the error distribution unit includes an error memory capable of recording the error value of each pixel constituting the line, a register group capable of storing the error values of other pixels, and a register group for each of the register groups. An error calculation unit that can add the error value of the target pixel at a predetermined distribution ratio and a recording unit that can record at least a part of the added register value in the error memory. It is desirable to provide a setting unit that can be changed based on the result of the conversion and the multi-value data.

【0014】mラインn番目の注目画素に対し、他の画
素の最大範囲がmラインn+1番目からn+x番目およ
びm+1ラインn−y番目からn+z番目とすると、誤
差メモリには、1ラインを構成する画素の誤差値ERR
(i)を記録可能とし、レジスタ群は、mラインn+1
番目からn+x番目の各々の画素に対応するx個のレジ
スタR0(j)と、m+1ラインn−y番目からn+z
番目の各々の画素に対応するy+z+1個のレジスタR
1(k)とを設け、誤差演算部は、これらのレジスタR
0(j)およびR1(k)に対し分配比率K0(j)お
よびK1(k)で注目画素の誤差値Eを以下の式(1)
から式(4)ように加算し、記録部は、レジスタR1
(−y)の誤差値を誤差メモリの誤差値ERR(n−
y)に記録し、さらに、設定部により分配比率K0
(j)およびK1(k)を注目画素の二値化の結果およ
び多値データに基づき変更可能とすることにより、注目
画素の二値化結果によって分配比率を変えて誤差値の拡
散範囲をダイナミックに変更することができる。
Assuming that the maximum range of the other pixels is the m + 1-th to n + x-th and the m + 1-line ny-th to the n + z-th for the nth target pixel of the m-th line, one line is formed in the error memory. Pixel error value ERR
(I) is recordable, and the register group includes m lines n + 1
X registers R0 (j) corresponding to each pixel from the (n + x) -th pixel to the (n + x) -th pixel,
Y + z + 1 registers R corresponding to each pixel of the
1 (k), and the error calculation unit uses these registers R
With respect to 0 (j) and R1 (k), the error value E of the target pixel is calculated by the following equation (1) using the distribution ratios K0 (j) and K1 (k).
From the register R1.
The error value of (−y) is converted to the error value ERR (n−
y), and further set by the setting unit to the distribution ratio K0
(J) and K1 (k) can be changed based on the binarization result of the pixel of interest and the multi-value data, so that the distribution ratio is changed according to the binarization result of the pixel of interest to dynamically change the diffusion range of the error value. Can be changed to

【0015】 R0(x)=ERR(n+x)+K0(x)×E ・・・(1) R0(1)からR(x−1)に対しては、 R0(j)=R0(j+1)+K0(j)×E ・・・(2) R1(z)=K1(z)×E ・・・(3) R1(−y)からR1(z−1)に対しては、 R1(k)=R1(k+1)+K1(k)×E ・・・(4) ただし、i,j,k,m,n,x,y,zは正の整数で
ある。
R0 (x) = ERR (n + x) + K0 (x) × E (1) For R0 (1) to R (x−1), R0 (j) = R0 (j + 1) + K0 (J) × E (2) R1 (z) = K1 (z) × E (3) From R1 (−y) to R1 (z−1), R1 (k) = R1 (k + 1) + K1 (k) × E (4) where i, j, k, m, n, x, y, and z are positive integers.

【0016】この誤差メモリを用い、式(1)から
(4)の演算を実行可能な処理回路あるいはソフトウェ
アを採用して画像処理を行うことにより、入力された画
像データを走査線毎に処理してプリンタなどに送信する
ことができる。したがって、画面全体を一度に二値化処
理する必要がなく、走査線毎に順次処理してプリントア
ウトなどを実行できる。このため、画像データが入力あ
るいは取得されてからプリントアウトなどの出力までの
時間が少なくて済む。したがって、本発明の画像処理装
置あるいは画像処理方法においては、短い処理時間で高
品位の画像を出力することが可能となる。
By using this error memory and performing image processing using a processing circuit or software capable of executing the operations of equations (1) to (4), input image data is processed for each scanning line. To a printer or the like. Accordingly, it is not necessary to binarize the entire screen at a time, and printout or the like can be executed by sequentially processing each scanning line. Therefore, the time from input or acquisition of image data to output such as printout can be reduced. Therefore, in the image processing apparatus or the image processing method of the present invention, it is possible to output a high-quality image in a short processing time.

【0017】[0017]

【発明の実施の形態】以下に図面を参照しながら本発明
の実施の形態について説明する。図3に、本発明にかか
る画像処理装置1の概略構成を示してある。たとえば、
スキャナから読み取られた1ライン分の赤、緑および青
(以降においてはRGB)の多値データφMが、CPU
からインタフェース11を介してメモリ制御回路12に
送られる。メモリ制御回路11では、入力された1ライ
ン分のRGBの画像データがRAM16に書き込まれ、
1ライン分の書込みが済んだ時点でRAM16に書き込
まれている多値データが1画素づつ第1の色変換回路1
3に送られる。この第1の色変換回路13においては、
RAM17にCPUによって予め書き込まれている3次
元のルックアップテーブルを参照してRGBからRGB
への色変換を行い、スキャナの機種などに起因する色調
の差を取り除く処理が行われる。これによって、スキャ
ナなどの周辺装置の機種間の特性の差が吸収され、ほぼ
同一の色調のRGBの多値データを得ることができる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 3 shows a schematic configuration of the image processing apparatus 1 according to the present invention. For example,
The red, green, and blue (hereinafter, RGB) multi-value data φM for one line read from the scanner is input to the CPU.
To the memory control circuit 12 through the interface 11. In the memory control circuit 11, the input RGB image data for one line is written into the RAM 16,
The multi-value data written in the RAM 16 at the time when the writing for one line is completed is performed by the first color conversion circuit 1 for each pixel.
Sent to 3. In the first color conversion circuit 13,
Referring to a three-dimensional look-up table previously written in the RAM 17 by the CPU,
Is performed to remove the difference in color tone due to the model of the scanner. As a result, differences in characteristics between models of peripheral devices such as scanners are absorbed, and RGB multi-value data having substantially the same color tone can be obtained.

【0018】第1の色変換回路13で処理された1画素
分のRGBの多値データは、次に、エッジ強調回路14
に送られ、エッジ強調処理が行われる。このエッジ強調
回路14に付随したRAM18には、2ライン分のデー
タが保持される。エッジ強調処理が行われた1画素のR
GBの多値データは、さらに、第2の色変換回路15に
送られ、RAM19に予めCPUによって書き込まれた
3次元のルックアップテーブルを参照して、濃色のシア
ンおよびマゼンダ、イエロー、ブラック、淡色のシアン
およびマゼンダ(以降においては、CMYKcm)に色
変換される。そして、この1画素のCMYKcm各色の
多値データφMが二値化回路20に送られて二値データ
φBに変換される。二値データφBは、メモリ制御回路
12に送られRAM16に記録される。
The RGB multi-value data of one pixel processed by the first color conversion circuit 13 is then converted to an edge emphasis circuit 14.
To perform edge enhancement processing. The RAM 18 attached to the edge enhancement circuit 14 holds data for two lines. R of one pixel subjected to edge enhancement processing
The multi-valued data of GB is further sent to the second color conversion circuit 15 and refers to a three-dimensional look-up table previously written in the RAM 19 by the CPU to obtain dark-colored cyan and magenta, yellow, black, The color is converted to light cyan and magenta (hereinafter CMYKcm). Then, the multi-value data φM of each color of CMYKcm of one pixel is sent to the binarization circuit 20 and converted into binary data φB. The binary data φB is sent to the memory control circuit 12 and recorded in the RAM 16.

【0019】このようにして、1ライン分の二値化処理
が行われるとCPUが1ライン分の二値データをインタ
フェース11を介してプリンタなどに送出する。また、
本例の画像処理装置10には、メモリモジュールとの入
出力インタフェース9も設けられており、各回路12か
ら20の設定値などが保存できるようになっている。
When the binarization processing for one line is performed in this way, the CPU sends the binary data for one line to a printer or the like via the interface 11. Also,
The image processing apparatus 10 of the present example is also provided with an input / output interface 9 with a memory module, so that the set values of the circuits 12 to 20 can be stored.

【0020】図4に、本例の二値化回路20における概
略処理をフローチャートを用いて示してある。二値化処
理は、CMYKcmの各色毎に同様の処理が行われるの
で、以降においては1つの色、たとえば濃色のシアンC
について説明する。まずステップ21で、注目画素PI
のシアンCを示す多値データφMに、その画素PIの誤
差値として蓄積された値ERRを加算する。そして、ス
テップ22で、加算された値を閾値Thと比較して二値
化する。さらに、ステップ23で、他の画素PEに対す
る誤差値Eを計算する。中間調を適度に表示するような
濃淡の調整を誤差拡散によって行うために、ステップ2
3では次のようにして誤差値Eが計算される。
FIG. 4 shows a schematic process in the binarization circuit 20 of the present embodiment using a flowchart. In the binarization processing, the same processing is performed for each color of CMYKcm, so that one color, for example, dark cyan C
Will be described. First, at step 21, the target pixel PI
Is added to the multi-value data φM representing the cyan C of the pixel PI. Then, in step 22, the added value is compared with a threshold value Th to be binarized. Further, in step 23, an error value E for another pixel PE is calculated. In order to adjust the shading so that the halftone is appropriately displayed by error diffusion, step 2 is performed.
In 3, the error value E is calculated as follows.

【0021】 二値化結果がオン「1」のとき E=φM+ERR−255 ・・・(5) 二値化結果がオフ「0」のとき E=φM+ERR ・・・(6) ただし、本例では、多値データφMは0から255の値
をとる8ビットのデータを仮定しているが、これに限定
されないことはもちろんである。
When the binarization result is ON “1”, E = φM + ERR-255 (5) When the binarization result is OFF “0” E = φM + ERR (6) However, in this example, The multi-value data φM is assumed to be 8-bit data having a value of 0 to 255, but is not limited to this.

【0022】このように注目画素PIで発生する誤差値
Eを演算することにより、注目画素PIでドットが表示
されたときはマイナスの誤差が周囲の他の画素PEに分
配され、濃度の調整が行われる。一方、注目画素PIで
ドットが表示されなかったときは、プラスの誤差が周囲
の他の画素PEに分配され、濃度調整が行われる。
As described above, by calculating the error value E generated at the target pixel PI, when a dot is displayed at the target pixel PI, a negative error is distributed to other surrounding pixels PE, and the density adjustment is performed. Done. On the other hand, when no dot is displayed at the target pixel PI, a plus error is distributed to other surrounding pixels PE, and density adjustment is performed.

【0023】さらに、本例の二値化回路20において
は、ステップ24において、二値化の結果と、多値デー
タφMの値によって誤差拡散するときの分配比率の設定
を変えるようにしている。本例の二値化回路20は、図
5に示すように、分配比率の異なる2つのモード0とモ
ード1とを備えており、入力画像濃度を示す多値データ
φMが8以下で、かつ、二値化の結果(二値データφ
B)が「1」のときは、誤差拡散範囲の広い、すなわ
ち、周辺の他の画素に対する分配比率が大きなモード0
が選択され、それ以外の条件では、誤差拡散範囲の狭
い、すなわち、近傍の他の画素に対する分配比率の大き
なモード1が選択されるようになっている。
Further, in the binarization circuit 20 of this embodiment, in step 24, the setting of the distribution ratio at the time of error diffusion according to the binarization result and the value of the multi-value data φM is changed. As shown in FIG. 5, the binarization circuit 20 of the present example includes two modes 0 and 1 having different distribution ratios, the multi-value data φM indicating the input image density is 8 or less, and Result of binarization (binary data φ
When B) is "1", the mode 0 has a wide error diffusion range, that is, a large distribution ratio to other surrounding pixels.
Is selected, and under other conditions, mode 1 having a narrow error diffusion range, that is, a large distribution ratio to other nearby pixels, is selected.

【0024】本例においては、誤差拡散の最大範囲は、
注目画素PI(m,n)の同じラインの後続する1つめ
から4つめの他の画素PE(PE(m,n+1)からP
E(m,n+4))と、次のラインの注目画素PIに対
し先行する5つめの画素から後続の2つめの他の画素P
E(PE(m+1,n−5)からPE(m+1,n+
2))までの範囲になっており、それぞれの他の画素P
Eに対する分配比率Kを変えることによって誤差拡散の
範囲が調整されるようになっている。
In this example, the maximum range of error diffusion is
The following first to fourth other pixels PE (PE (m, n + 1) to P (m, n + 1)) on the same line of the pixel of interest PI (m, n)
E (m, n + 4)) and the fifth pixel preceding the pixel of interest PI on the next line to the second pixel P following
E (PE (m + 1, n-5) to PE (m + 1, n +
2)) and each other pixel P
The range of error diffusion is adjusted by changing the distribution ratio K with respect to E.

【0025】たとえば、モード0においては、注目画素
PIの近傍の4つの他の画素PE(PE(m,n+
1)、PE(m+1,n−1)からPE(m+1,n+
1))に対する分配係数Kが2/16であり、その他の
8つの他の画素PEに対する分配係数Kは1/16であ
る。これに対し、モード1では、注目画素PIの近傍の
2つの他の画素PE(PE(m,n+1)およびPE
(m+1,n))に対する分配係数Kが4/16で、そ
の周囲の4つの他の画素PE(PE(m,n+2)、P
E(m+1,n−2)、PE(m+1,n−1)および
PE(m+1,n+1))に対する分配係数Kが2/1
6となっている。そして、その周囲の6つの他の画素P
Eに対する分配係数Kは0に設定されており、誤差分散
される範囲が注目画素PIの周囲の6つに限定されてい
る。
For example, in mode 0, four other pixels PE (PE (m, n +
1), PE (m + 1, n-1) to PE (m + 1, n +)
The distribution coefficient K for 1)) is 2/16, and the distribution coefficient K for the other eight other pixels PE is 1/16. On the other hand, in mode 1, two other pixels PE (PE (m, n + 1) and PE
The distribution coefficient K for (m + 1, n)) is 4/16, and four other pixels PE (PE (m, n + 2), P
The distribution coefficient K for E (m + 1, n-2), PE (m + 1, n-1) and PE (m + 1, n + 1) is 2/1.
It is 6. Then, the other six pixels P around it
The distribution coefficient K for E is set to 0, and the range in which the error is dispersed is limited to six around the pixel of interest PI.

【0026】ステップ24において、注目画素PIの二
値化の結果によって分配係数が設定された後、ステップ
25において誤差演算が行われ、周囲の他の画素の誤差
値ERRがもとめられる。このようなステップ21から
25の処理を各画素の多値φMに対して行い、1ライン
を構成する各画素の各色について二値化処理が終了する
と、そのデータに基づき印刷が行われる。
In step 24, after the distribution coefficient is set according to the binarization result of the target pixel PI, an error calculation is performed in step 25, and the error value ERR of other surrounding pixels is obtained. The processing of steps 21 to 25 is performed on the multi-value φM of each pixel, and when the binarization processing is completed for each color of each pixel constituting one line, printing is performed based on the data.

【0027】図6に、本例の画像処理装置10で処理さ
れた二値データφBを用いて印刷された結果を、ドット
表示が明瞭になる程度まで拡大して示してある。入力の
多値データφMは、上述した図1および図2と同様のも
のである。本図から判るように、画像濃度の低い領域1
で、ドットが集中して表示される現象は現れておらず、
さらに、画像濃度の低い領域1と画像濃度の高い領域2
との境目にもドットが抜けず、画像濃度の低い領域1の
全体にわたりドットが均等に表示されている。このよう
に、本例の画像処理装置10で採用された画像処理方法
では、多値データφMの値が低く画像濃度の低い領域に
おいて、二値化の結果によって誤差分散の分配係数を変
えており、通常は拡散範囲を狭くして濃度の高い領域と
低い領域との境目を良好に表示されるようにするととも
に、ドットが打たれたときは拡散範囲を広くして広い範
囲にマイナスの誤差値を分散してドットが集中するのを
押さえている。この結果、図6に示したように画像の濃
度の低い領域1でドットが略均等に境界近傍まで表示さ
れた高品位の画像を得ることができる。
FIG. 6 shows the result of printing using the binary data φB processed by the image processing apparatus 10 of this embodiment, enlarged to such an extent that the dot display becomes clear. The input multi-value data φM is the same as that in FIGS. 1 and 2 described above. As can be seen from this figure, the area 1 where the image density is low
Therefore, the phenomenon that dots are displayed concentratedly has not appeared,
Further, an area 1 having a low image density and an area 2 having a high image density
Dots do not fall out at the boundary between, and the dots are uniformly displayed over the entire area 1 having a low image density. As described above, in the image processing method employed in the image processing apparatus 10 of the present embodiment, the distribution coefficient of the error variance is changed depending on the result of binarization in a region where the value of the multi-value data φM is low and the image density is low. Usually, the diffusion range is narrowed so that the boundary between the high density region and the low density region is displayed well, and when a dot is hit, the diffusion range is widened and a negative error value is set in a wide range. Is dispersed and dots are suppressed from being concentrated. As a result, as shown in FIG. 6, it is possible to obtain a high-quality image in which dots are displayed almost uniformly up to the vicinity of the boundary in the low density region 1 of the image.

【0028】図7に、上記の処理をハード的に実現した
二値化回路20の例を示してある。この二値化回路20
は、注目画素PIを二値化する際に発生した誤差値E
を、この注目画素PIの周囲に位置する他の画素PEの
誤差値ERRとして分配する誤差分配部21と、注目画
素PEの多値データφMを注目画素の誤差値ERRを加
味して二値化する二値化部50とを有している。さら
に、誤差分配部21は、ラインを構成する各々の画素の
誤差値ERR(i)を記録可能な誤差メモリ22と、他
の画素PEの誤差値ERRを記憶可能なレジスタ群23
と、このレジスタ群23の各々のレジスタに対し注目画
素PIの誤差値Eを分配比率Kで加算可能な誤差演算部
24と、加算されたレジスタの値の少なくとも一部を誤
差メモリ22に記録可能な記録部25と、さらに、分配
比率Kを注目画素PIの二値化の結果φBおよび多値デ
ータφMに基づき変更可能な設定部26とを備えてい
る。
FIG. 7 shows an example of the binarization circuit 20 which implements the above processing in hardware. This binarization circuit 20
Is an error value E generated when the target pixel PI is binarized.
And an error distribution unit 21 that distributes the error value ERR of another pixel PE located around the pixel of interest PI, and binarizes the multi-value data φM of the pixel of interest PE by adding the error value ERR of the pixel of interest. And a binarizing unit 50 that performs the conversion. Further, the error distribution unit 21 includes an error memory 22 capable of recording an error value ERR (i) of each pixel constituting the line, and a register group 23 capable of storing an error value ERR of another pixel PE.
And an error calculation unit 24 that can add the error value E of the pixel of interest PI to each register of the register group 23 at the distribution ratio K, and can record at least a part of the added register value in the error memory 22. And a setting unit 26 that can change the distribution ratio K based on the binarization result φB and the multi-value data φM of the target pixel PI.

【0029】上述したように、本例の画像処理装置10
においては、mラインn番目の注目画素PIに対し、他
の画素PEの最大範囲は、mラインn+1番目からn+
4番目およびm+1ラインのn−5番目からn+2番目
になっている。したがって、これらの他の画素PEに対
応してレジスタ群は、同一のライン(mライン)のn番
目からn+4番目の各々の画素PEに対応する4個のレ
ジスタR0(1)からR0(4)を備えた第1のレジス
タ群30と、次のライン(m+1ライン)のn−5番目
からn+2番目の各々の画素PEに対応する8個のレジ
スタR1(−5)からR1(2)を備えた第2のレジス
タ群31とを備えている。
As described above, the image processing apparatus 10 of this embodiment
, The maximum range of the other pixels PE for the n-th pixel of interest PI on the m-th line is from the (m + 1) -th line to the n-th line.
The fourth and m + 1 lines are from the (n-5) th to the (n + 2) th lines. Accordingly, the register group corresponding to these other pixels PE includes four registers R0 (1) to R0 (4) corresponding to the nth to (n + 4) th pixel PEs on the same line (m line). , And eight registers R1 (-5) to R1 (2) corresponding to each of the (n-5) th to (n + 2) th pixels PE of the next line (m + 1 line). And a second register group 31.

【0030】これらのレジスタ群30および31に対応
して、誤差演算部24も第1のレジスタ群30に対し演
算を行う第1の誤差演算部32と、第2のレジスタ群3
1に対して演算を行う第2の誤差演算部33とを備えて
おり、それぞれの演算部32および33は、それぞれの
レジスタ35に対し加算した結果を設定する加算器36
と、二値化部50から供給された発生誤差値Eに所定の
分配比率Kをかけて加算器36に加える誤差分配回路3
7を備えている。そして、誤差演算部24においては、
第1のレジスタ群30の各レジスタR0(j)および第
2のレジスタ群31の各レジスタR1(k)に対し分配
比率K0(j)およびK1(k)としたときに注目画素
PIの誤差値Eを以下のように加算するように構成され
ている。
Corresponding to these register groups 30 and 31, error calculator 24 also has a first error calculator 32 for performing an operation on first register group 30 and a second register group 3.
And a second error calculating section 33 for performing an operation on the first and second registers. Each of the calculating sections 32 and 33 includes an adder 36 for setting the result of addition to each of the registers 35.
And an error distribution circuit 3 which multiplies the generated error value E supplied from the binarization section 50 by a predetermined distribution ratio K and adds the multiplied error value E to the adder 36.
7 is provided. Then, in the error calculator 24,
The error value of the target pixel PI when the distribution ratios K0 (j) and K1 (k) are set for each register R0 (j) of the first register group 30 and each register R1 (k) of the second register group 31. It is configured to add E as follows.

【0031】 R0(4)=ERR(n+4)+K0(4)×E ・・・(11) R0(1)からR(3)に対しては、 R0(j)=R0(j+1)+K0(j)×E ・・・(12) ただし、j=1から3 R1(2)=K1(2)×E ・・・(13) R1(−5)からR1(1)に対しては、 R1(k)=R1(k+1)+K1(k)×E ・・・(14) ただし、k=−5から1 さらに、各レジスタR0およびR1に対応した各々の誤
差分配回路37には,誤差値Eとともに設定部26から
の制御信号φ1が入力されており、各々の分配比率K0
(j)とK1(k)とを図5に示したように、入力され
た多値データφMと、出力される二値データφBの結果
に応じて変えられるようになっている。したがって、本
例の誤差分配部21は、多値データφMと二値データφ
Bの結果によって、誤差拡散の範囲をダイナミックに変
えることができる回路であり、この誤差分配部21で誤
差演算を行うことにより上述したような中間調の奇麗な
高画質の二値化された画像データを得ることができる。
R0 (4) = ERR (n + 4) + K0 (4) × E (11) For R0 (1) to R (3), R0 (j) = R0 (j + 1) + K0 (j ) × E (12) where j = 1 to 3 R1 (2) = K1 (2) × E (13) For R1 (−5) to R1 (1), R1 ( k) = R1 (k + 1) + K1 (k) × E (14) where k = −5 to 1 Further, each error distribution circuit 37 corresponding to each of the registers R0 and R1 has an error value E The control signal φ1 from the setting unit 26 is input, and the respective distribution ratios K0
As shown in FIG. 5, (j) and K1 (k) can be changed according to the result of the input multi-value data φM and the output binary data φB. Therefore, the error distributing unit 21 of the present example performs multi-value data φM and binary data φ
B is a circuit that can dynamically change the range of error diffusion according to the result of B. By performing an error operation in the error distribution unit 21, a high-quality binary image of the above-described halftone is obtained. Data can be obtained.

【0032】また、誤差メモリ22には、現在処理する
ライン(m)の1つ前のライン、本例においてはライン
(m−1)の画素を二値化するときに発生した誤差の演
算結果が記録されており、記録部25の読出し部38に
よって誤差拡散範囲の端の他の画素PE(m,n+4)
の誤差値ERR(n+4)が読み出され、上記の式
(1)にしたがって演算された結果がレジスタR0
(4)に設定される。そして、その誤差値は、注目画素
PIが移動するにしたがって、順々にレジスタR0
(3)、R0(2)およびR0(1)に移動しながら演
算され、最終的には注目画素PIの誤差値ERRとなっ
て二値化部50に供給される。
The error memory 22 stores, in the present example, the calculation result of the error generated when binarizing the pixel of the line immediately before the line (m) to be processed, in this example, the line (m-1). Is recorded, and another pixel PE (m, n + 4) at the end of the error diffusion range is read by the reading unit 38 of the recording unit 25.
Is read out, and the result calculated according to the above equation (1) is stored in the register R0.
(4) is set. The error value is sequentially stored in the register R0 as the pixel of interest PI moves.
(3) The calculation is performed while moving to R0 (2) and R0 (1), and finally, the error value ERR of the target pixel PI is supplied to the binarization unit 50.

【0033】二値化部50においては、誤差値ERRが
加算器51によって多値データφMと加算され、注目画
素PIの二値化用の誤差データEとなる。この加算され
た誤差データEは、判定器52によってメモリモジュー
ルなどに記憶された所定の閾値Th(たとえば、12
8)と比較され、二値化データφBが生成される。誤差
データEは、引算器53によって上述した式(5)のよ
うにマイナス化されたデータとともに選択回路54に入
力されており、二値化データφBの結果によって上述し
た式(5)または式(6)の誤差値Eが生成される。そ
して、この誤差値Eが各々の誤差分配回路37に供給さ
れ、次の注目画素PIの誤差値の演算および次のライン
m+1の各画素の誤差値の演算に用いられる。
In the binarizing section 50, the error value ERR is added to the multi-value data φM by the adder 51, and becomes the error data E for binarizing the target pixel PI. The added error data E is determined by a predetermined threshold value Th (for example, 12
8) to generate binary data φB. The error data E is input to the selection circuit 54 together with the data converted to a minus value as in the above-described equation (5) by the subtractor 53, and the above-described equation (5) or the above-described equation is obtained based on the result of the binarized data φB. The error value E of (6) is generated. Then, this error value E is supplied to each error distribution circuit 37, and is used for calculating the error value of the next pixel of interest PI and calculating the error value of each pixel of the next line m + 1.

【0034】次のラインm+1の各画素PEの誤差値の
演算は、第2の誤差演算部33および第2のレジスタ3
1を用いて行われる。誤差が拡散するもっとも後方のレ
ジスタR1(2)にまず誤差拡散による誤差値がセット
され、その誤差値が順次レジスタR1を移動しながら演
算される。最終的に誤差拡散範囲のもっとも前方の画素
PE(m+1,n−5)の値がレジスタR1(−5)で
得られると、その誤差値ERRが書込み部39によって
誤差メモリ22のERR(n−5)に書き込んで次のラ
インm+1の誤差値が保存される。
The calculation of the error value of each pixel PE on the next line m + 1 is performed by the second error calculation unit 33 and the second register 3.
1 is performed. First, an error value due to error diffusion is set in the rearmost register R1 (2) where the error is diffused, and the error value is calculated while sequentially moving through the register R1. When the value of the pixel PE (m + 1, n−5) at the forefront of the error diffusion range is finally obtained by the register R1 (−5), the error value ERR is written into the ERR (n− 5) and the error value of the next line m + 1 is stored.

【0035】このようにして、本例の二値化回路20に
おいては、各々のラインの画素の二値化処理が行われ、
その結果発生する次のラインに対する誤差値が誤差メモ
リ22に記憶される。したがって、多階調の画像データ
をライン毎に二値化処理して出力することが可能であ
り、ライン毎にプリンタに送出して印刷を開始すること
ができる。たとえば1ページ分の画像データの処理が済
まなくては印刷がスタートできないといった状況にはな
らず、カラープリントを短時間で開始することができ、
短時間で終了することが可能となる。このため、本例の
画像処理装置、あるいは画像処理方法をプリンタに搭載
したり、プリンタドライバとしてパソコンにインストー
ルすることにより中間調の奇麗な高品位の画像を短時間
で印刷することができる。
As described above, in the binarization circuit 20 of this embodiment, the binarization processing of the pixels of each line is performed.
The resulting error value for the next line is stored in error memory 22. Therefore, multi-gradation image data can be binarized and output for each line, and can be sent to a printer line by line to start printing. For example, it is not possible to start printing without processing the image data for one page, and color printing can be started in a short time.
It can be completed in a short time. For this reason, by installing the image processing apparatus or the image processing method of this example in a printer or by installing the image processing apparatus or the image processing method in a personal computer as a printer driver, it is possible to print a high-quality beautiful image of a halftone in a short time.

【0036】図8に誤差配分回路37の構成例を示して
ある。この誤差配分回路37は、誤差値Eを図5に示す
モード0にしたがって分配するための第1のセレクタ4
1と、モード1にしたがって分配するための第2のセレ
クタ42とを備えており、それぞれにCPUなどから3
ビットの信号φm0と信号φm1が供給されてモード0
とモード1のときの分配比率が自由に設定できるように
なっている。本例においては、信号φm0あるいはφm
1が「000」で分配比率Kが0、「001」で分配比
率Kが1/16、「010」で分配比率Kが2/16、
「100」で分配比率Kが4/16に設定できるように
なっている。そして、これら第1および第2のセレクタ
41および42の出力が第3のセレクタ43に入力され
ており、設定部26から供給されるモード信号φ1にし
たがって、図5に示したような誤差拡散範囲が多値デー
タφM及び二値データφBに基づき切り替えられるよう
になっている。
FIG. 8 shows an example of the configuration of the error distribution circuit 37. This error distribution circuit 37 is provided with a first selector 4 for distributing the error value E according to mode 0 shown in FIG.
1 and a second selector 42 for distributing according to the mode 1, each of which is
The mode signal 0 is supplied when bit signals φm0 and φm1 are supplied.
And the distribution ratio in the mode 1 can be freely set. In this example, the signal φm0 or φm
1 is “000” and the distribution ratio K is 0, “001” is the distribution ratio K of 1/16, “010” is the distribution ratio K of 2/16,
With “100”, the distribution ratio K can be set to 4/16. The outputs of the first and second selectors 41 and 42 are input to the third selector 43, and the error diffusion range as shown in FIG. Can be switched based on the multi-value data φM and the binary data φB.

【0037】本例の二値化回路20においては、図5に
あわせてレジスタR0およびR1に対応する誤差配分回
路の信号φm0およびφm1の値は次のように設定され
ている。
In the binarization circuit 20 of this embodiment, the values of the signals φm0 and φm1 of the error distribution circuit corresponding to the registers R0 and R1 are set as follows in accordance with FIG.

【0038】 レジスタ 信号φm0(モード0) 信号φm1(モード1) R0(1) 010 100 R0(2) 001 010 R0(3) 001 000 R0(4) 001 000 R1(−5) 001 000 R1(−4) 001 000 R1(−3) 001 000 R1(−2) 001 010 R1(−1) 010 010 R1(0) 010 100 R1(1) 010 010 R1(2) 001 000 本例の誤差配分回路37を用いた誤差分配部21におい
ては、それぞれの誤差配分回路に供給されている信号φ
m0およびφm1の値を変えることによってモード0お
よびモード1における誤差の拡散範囲あるいは誤差の分
配比率Kを図5に示した分配比率にかぎらず、その他の
比率にも自由に変えることが可能でありフレキシビリテ
ィの高い誤差分配部21となっている。
Register signal φm0 (mode 0) signal φm1 (mode 1) R0 (1) 010 100 R0 (2) 001 010 R0 (3) 001000 R0 (4) 001000 R1 (−5) 001000 R1 (−) 4) 001 000 R1 (-3) 001 000 R1 (-2) 001 010 R1 (-1) 010 010 R1 (0) 010 100 R1 (1) 010 010 R1 (2) 001 000 Error distribution circuit 37 of this example. Is used in the error distribution unit 21 using the signal φ supplied to each error distribution circuit.
By changing the values of m0 and φm1, the error diffusion range in mode 0 and mode 1 or the error distribution ratio K can be freely changed to other ratios in addition to the distribution ratio shown in FIG. The error distribution unit 21 has high flexibility.

【0039】上記にて説明したような機能を備えた画像
処理装置10は、プリンタ自体に搭載したり、あるい
は、パソコンにプリンタドライバとして搭載することに
より中間調の奇麗な画像処理を行うことができる。ま
た、図9に示したように、スキャナ5とプリンタ6とを
接続してスキャナ5で読み取った画像をプリンタ6にわ
たして出力するような周辺機器管理装置60に搭載して
使用することも可能である。この周辺機器管理装置60
は、スキャナ5に接続されるスキャナ制御部61と、プ
リンタ6と接続されるプリンタ制御部62とを備えてお
り、これらが内部バス64によってCPU65、ROM
66、RAM67および画像処理装置10に接続されて
いる。したがって、スキャナ5で読み取った多階調の画
像データを画像処理装置10で二値化処理し、その二値
データをプリンタ6に送ってカラープリントを行うこと
ができる。さらに、内部バス64には、LAN7と接続
されるネットワーク制御部63も接続されており、LA
N7に接続された不図示のネットワークコンピュータに
もデータを送って印刷することができる。
The image processing apparatus 10 having the functions as described above can be mounted on the printer itself or mounted on a personal computer as a printer driver to perform beautiful halftone image processing. . Further, as shown in FIG. 9, the scanner 5 and the printer 6 can be connected to each other and the image read by the scanner 5 can be transferred to the printer 6 for output to the peripheral device management device 60 for use. It is. This peripheral device management device 60
Has a scanner control unit 61 connected to the scanner 5 and a printer control unit 62 connected to the printer 6.
66, the RAM 67 and the image processing apparatus 10. Therefore, the image processing apparatus 10 binarizes the multi-gradation image data read by the scanner 5 and sends the binary data to the printer 6 to perform color printing. Further, a network control unit 63 connected to the LAN 7 is also connected to the internal bus 64,
The data can also be sent and printed to a network computer (not shown) connected to N7.

【0040】なお、上記の例では、誤差の拡散範囲が図
5に示されたケースで説明しているが、誤差の拡散範囲
はさらに広げたり、あるいは狭めたりすることはもちろ
ん可能であり、そのような場合においても、上述した一
般的な式(1)から式(4)を用い、あるいはこれらの
式に基づいた回路構成を採用することにより、本例と同
様の画像処理を行うことができる。
In the above example, the case where the error diffusion range is shown in FIG. 5 is described. However, it is of course possible to further widen or narrow the error diffusion range. Even in such a case, image processing similar to that of the present example can be performed by using the above-described general formulas (1) to (4), or by employing a circuit configuration based on these formulas. .

【0041】[0041]

【発明の効果】以上に説明したように、本発明の画像処
理装置および画像処理方法においては、多値データを二
値化する際に、誤差の拡散範囲を一定にとどめるのでは
なく、その多値データおよび二値化されたデータによっ
て誤差の拡散範囲を変動できるようにしている。したが
って、通常は、誤差の拡散範囲を狭くして濃淡の境界付
近のドットの抜けを防止し、そして、ドットが打たれる
と誤差(マイナス誤差)の拡散範囲を拡大してドットが
集中して打たれないようにしている。このため、濃度の
薄い領域の中間調に対応するドット表示が微視的な範囲
でもほぼ均一な濃さとなるように二値化することができ
る。したがって、本発明の画像処理装置および画像処理
方法を採用することにより、高解像度であると共に中間
調も奇麗に表現される画像データを作成し、利用するこ
とができる。
As described above, according to the image processing apparatus and the image processing method of the present invention, when binarizing multi-valued data, the error diffusion range is not kept constant but is multiplied. The error diffusion range can be varied by the value data and the binarized data. Therefore, usually, the diffusion range of the error is narrowed to prevent the dropout of dots near the boundary between shades, and when a dot is hit, the diffusion range of the error (minus error) is enlarged to concentrate the dots. I try not to be hit. For this reason, the binarization can be performed so that the dot display corresponding to the halftone in the low density area has a substantially uniform density even in a microscopic range. Therefore, by employing the image processing apparatus and the image processing method of the present invention, it is possible to create and use image data that has a high resolution and clearly expresses a halftone.

【0042】また、本願に開示した画像処理装置および
画像処理方法においては、誤差メモリを用いてライン毎
に二値化処理ができるようになっているので、二値化処
理を非常に高速で行うことが可能であり、写真画質に近
い高品位のカラープリンタを短時間で出力可能な画像処
理装置を提供することができる。
Further, in the image processing apparatus and the image processing method disclosed in the present application, since the binarization processing can be performed for each line using the error memory, the binarization processing is performed at a very high speed. It is possible to provide an image processing apparatus capable of outputting a high-quality color printer close to photographic image quality in a short time.

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

【図1】(a)は多階調の画像データを二値化して出力
した画像を拡大して示した例であり、(b)に示すよう
に、誤差拡散範囲を狭く設定したときの表示例である。
FIG. 1A is an example in which an image output by binarizing multi-gradation image data is enlarged and shown in FIG. 1B, and a table when an error diffusion range is set to be narrow as shown in FIG. This is an example.

【図2】(a)は多階調の画像データを二値化して出力
した画像を拡大して示した例であり、(b)に示すよう
に、誤差拡散範囲を広く設定したときの表示例である。
FIG. 2A is an example in which an image output by binarizing multi-gradation image data is enlarged and shown in FIG. 2B, a table when an error diffusion range is set wide as shown in FIG. This is an example.

【図3】本発明の実施の形態にかかる画像処理装置の概
略構成を示すブロック図である。
FIG. 3 is a block diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment of the present invention.

【図4】本発明の実施の形態にかかる二値化処理の概要
を示すフローチャートである。
FIG. 4 is a flowchart illustrating an outline of a binarization process according to the embodiment of the present invention;

【図5】本例の二値化処理において採用されている誤差
拡散範囲を模式的に示す図であり、(a)は拡散範囲の
広い(モード0)とき、(b)は拡散範囲が狭い(モー
ド1)を示してある。
FIGS. 5A and 5B are diagrams schematically showing an error diffusion range employed in the binarization processing of the present example. FIG. 5A shows a wide diffusion range (mode 0), and FIG. 5B shows a narrow diffusion range. (Mode 1) is shown.

【図6】図5に示した誤差拡散範囲で二値化した出力画
像を拡大して示す図である。
6 is an enlarged view showing an output image binarized in the error diffusion range shown in FIG. 5;

【図7】二値化回路の構成例を示す回路図である。FIG. 7 is a circuit diagram illustrating a configuration example of a binarization circuit;

【図8】誤差配分回路の構成例を示す回路図である。FIG. 8 is a circuit diagram illustrating a configuration example of an error distribution circuit.

【図9】本例の画像処理装置を搭載した周辺機器管理装
置の構成例を示すブロック図である。
FIG. 9 is a block diagram illustrating a configuration example of a peripheral device management device including the image processing device according to the present embodiment.

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

1・・画像濃度の薄い領域 2・・画像濃度の濃い領域 10・・画像処理装置 12・・メモリ制御回路 13・・第1の色変換回路 14・・エッジ強調回路 15・・第2の色変換回路 20・・二値化回路 21・・誤差分配部 22・・誤差メモリ 23・・レジスタ群 24・・誤差演算部 25・・記録部 35・・レジスタ 36・・加算器 37・・誤差分配回路 50・・二値化部 1. Area with low image density 2. Area with high image density 10. Image processing device 12. Memory control circuit 13. First color conversion circuit 14. Edge enhancement circuit 15. Second color Conversion circuit 20 binarization circuit 21 error distribution unit 22 error memory 23 register group 24 error calculation unit 25 recording unit register 36 adder 37 error distribution Circuit 50 ··· Binarization section

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 多階調の画像データを二値化可能な画像
処理装置において、 注目画素を二値化する際に発生した誤差値を、この注目
画素の周囲に位置する他の画素の誤差値として分配する
誤差分配部と、 注目画素の多値データを、注目画素の誤差値を加味して
二値化する二値化部とを有し、 前記誤差分配部は、前記二値化部における二値化の結果
および前記多値データに基づき前記他の画素の範囲、ま
たは、前記他の画素に対する誤差値の分配比率を変更可
能であることを特徴とする画像処理装置。
1. An image processing apparatus capable of binarizing multi-gradation image data, wherein an error value generated when binarizing a target pixel is determined by calculating an error value of another pixel located around the target pixel. An error distributing unit for distributing as a value, and a binarizing unit for binarizing multi-value data of the pixel of interest in consideration of an error value of the pixel of interest, wherein the error distributing unit includes the binarizing unit. An image processing apparatus, wherein a range of the other pixel or a distribution ratio of an error value to the other pixel can be changed based on a binarization result and the multi-valued data in.
【請求項2】 請求項1において、前記誤差分配部は、
前記注目画素の多値データが所定の値より小さく、か
つ、前記注目画素の二値化の結果がオンとなったとき
に、前記他の画素の範囲を広げるか、または、近傍の前
記他の画素に対する誤差値の分配比率を下げて周辺の前
記他の画素に対する誤差値の分配比率を上げることを特
徴とする画像処理装置。
2. The method according to claim 1, wherein the error distribution unit includes:
When the multi-value data of the pixel of interest is smaller than a predetermined value, and the binarization result of the pixel of interest is turned on, the range of the other pixel is expanded, or the other pixel in the vicinity is expanded. An image processing apparatus, wherein a distribution ratio of an error value to a pixel is lowered to increase a distribution ratio of an error value to the other neighboring pixels.
【請求項3】 請求項1において、前記誤差分配部は、
ラインを構成する各々の画素の誤差値を記録可能な誤差
メモリと、 前記他の画素の誤差値を記憶可能なレジスタ群と、 このレジスタ群の各々のレジスタに対し前記注目画素の
誤差値を所定の分配比率で加算可能な誤差演算部と、 加算されたレジスタの値の少なくとも一部を前記誤差メ
モリに記録可能な記録部と、 前記分配比率を前記注目画素の二値化の結果および前記
多値データに基づき変更可能な設定部とを備えているこ
とを特徴とする画像処理装置。
3. The error distribution unit according to claim 1, wherein:
An error memory capable of recording an error value of each pixel constituting the line; a register group capable of storing the error values of the other pixels; and a predetermined error value of the target pixel for each register of the register group. An error calculating unit capable of adding at least a part of the value of the added register in the error memory; a binarizing result of the pixel of interest and the multiplying unit; An image processing apparatus comprising: a setting unit that can be changed based on value data.
【請求項4】 請求項3において、mラインn番目の前
記注目画素に対し、前記他の画素の最大範囲は、mライ
ンn+1番目からn+x番目およびm+1ラインn−y
番目からn+z番目であり、 前記誤差メモリは、1ラインを構成する画素の誤差値E
RR(i)を記録可能であり、 前記レジスタ群は、mラインn+1番目からn+x番目
の各々の画素に対応するx個のレジスタR0(j)と、
前記m+1ラインn−y番目からn+z番目の各々の画
素に対応するy+z+1個のレジスタR1(k)とを備
えており、 前記誤差演算部は、これらのレジスタR0(j)および
R1(k)に対し分配比率K0(j)およびK1(k)
で前記注目画素の誤差値Eを以下のように加算し、 前記記録部は、レジスタR1(−y)の誤差値を前記誤
差メモリの誤差値ERR(n−y)に記録し、さらに、 前記設定部は、前記分配比率K0(j)およびK1
(k)を前記注目画素の二値化の結果および前記多値デ
ータに基づき変更することを特徴とする画像処理装置。 R0(x)=ERR(n+x)+K0(x)×E R0(1)からR(x−1)に対しては、 R0(j)=R0(j+1)+K0(j)×E R1(z)=K1(z)×E R1(−y)からR1(z−1)に対しては、 R1(k)=R1(k+1)+K1(k)×E ただし、i,j,k,m,n,x,y,zは正の整数で
ある。
4. The method according to claim 3, wherein the maximum range of the other pixel is n + 1 to n + x and m + 1 line ny with respect to the n-th pixel of interest in the m-line.
From the nth to the (n + z) th, and the error memory stores an error value E of a pixel constituting one line.
RR (i) can be recorded, and the register group includes x registers R0 (j) corresponding to each of the (m + 1) th to (n + x) th pixels of the m line,
Y + z + 1 registers R1 (k) corresponding to each of the (n + 1) -th to (n + z) -th pixels of the (m + 1) -th line, and the error calculation unit stores these registers R0 (j) and R1 (k) Distribution ratios K0 (j) and K1 (k)
Then, the error value E of the target pixel is added as follows, and the recording unit records the error value of the register R1 (−y) as the error value ERR (ny) of the error memory. The setting unit determines the distribution ratios K0 (j) and K1
(K) is changed based on the binarization result of the pixel of interest and the multi-value data. R0 (x) = ERR (n + x) + K0 (x) × E For R0 (1) to R (x−1), R0 (j) = R0 (j + 1) + K0 (j) × E R1 (z) = K1 (z) × E From R1 (−y) to R1 (z−1), R1 (k) = R1 (k + 1) + K1 (k) × E where i, j, k, m, n , X, y, z are positive integers.
【請求項5】 多階調の画像データを二値化する画像処
理方法において、 注目画素を二値化する際に発生した誤差値を、この注目
画素の周囲に位置する他の画素の誤差値として分配する
誤差分配工程と、 注目画素の多値データを、注目画素の誤差値を加味して
二値化する二値化工程とを有し、 前記誤差分配工程では、前記二値化工程における二値化
の結果および前記多値データに基づき前記他の画素の範
囲、または、前記他の画素に対しする誤差値の分配比率
を変更可能であることを特徴とする画像処理方法。
5. An image processing method for binarizing multi-tone image data, comprising: converting an error value generated when binarizing a target pixel to an error value of another pixel located around the target pixel. An error distribution step of distributing the target pixel, and a binarization step of binarizing the multi-valued data of the pixel of interest in consideration of an error value of the pixel of interest. An image processing method, wherein a range of the other pixel or a distribution ratio of an error value to the other pixel can be changed based on a binarization result and the multi-valued data.
【請求項6】 請求項5において、前記誤差分配工程で
は、前記注目画素の多値データが所定の値より小さく、
かつ、前記注目画素の二値化の結果がオンとなったとき
に、前記他の画素の範囲を広げるか、または、近傍の前
記他の画素に対する誤差値の分配比率を下げて周辺の前
記他の画素に対する誤差値の分配比率を上げることを特
徴とする画像処理方法。
6. The error distribution step according to claim 5, wherein the multi-value data of the target pixel is smaller than a predetermined value,
And, when the binarization result of the pixel of interest is turned on, the range of the other pixel is expanded, or the distribution ratio of the error value to the other pixel in the vicinity is reduced to reduce the other pixel in the vicinity. An image processing method comprising: increasing the distribution ratio of an error value to a pixel of (c).
【請求項7】 請求項5において、mラインn番目の前
記注目画素に対し、前記他の画素の最大範囲がmライン
n+1番目からn+x番目およびm+1ラインn−y番
目からn+z番目のときに、 前記誤差分配工程は、1ラインを構成する画素の誤差値
ERR(i)を記録可能な誤差メモリを用いて、mライ
ンn番目からn+x番目の各々の画素に対応するx個の
レジスタR0(j)と、前記m+1ラインn−y番目か
らn+z番目の各々の画素に対応するy+z+1個のレ
ジスタR1(k)に対し、分配比率K0(j)およびK
1(k)で前記注目画素の誤差値Eを以下のように加算
し、レジスタR1(−y)の誤差値を前記誤差メモリの
誤差値ERR(n−y)に記録しする演算工程と、 この演算工程に先立って、前記分配比率K0(j)およ
びK1(k)を前記注目画素の二値化の結果および前記
多値データに基づき設定する設定工程とを備えているこ
とを特徴とする画像処理方法。 R0(x)=ERR(n+x)+K0(x)×E R0(1)からR(x−1)に対しては、 R0(j)=R0(j+1)+K0(j)×E R1(z)=K1(z)×E R1(−y)からR1(z−1)に対しては、 R1(k)=R1(k+1)+K1(k)×E ただし、i,j,k,m,n,x,y,zは正の整数で
ある。
7. The method according to claim 5, wherein, for the n-th pixel of interest in the m-th line, when the maximum range of the other pixel is n-th to n + x-th and m + 1-th to ny to n + z-th, The error distribution step uses an error memory capable of recording an error value ERR (i) of a pixel forming one line, and uses a number of registers R0 (j) corresponding to each of the nth to n + xth pixels of the m line. ) And the distribution ratios K0 (j) and K0 for the (y + z + 1) registers R1 (k) corresponding to the (n−y) th to (n + z) th pixels of the (m + 1) th line.
An arithmetic step of adding the error value E of the target pixel at 1 (k) as follows, and recording the error value of the register R1 (-y) as the error value ERR (ny) of the error memory; Prior to this calculation step, there is provided a setting step of setting the distribution ratios K0 (j) and K1 (k) based on the binarization result of the target pixel and the multi-value data. Image processing method. R0 (x) = ERR (n + x) + K0 (x) × E For R0 (1) to R (x−1), R0 (j) = R0 (j + 1) + K0 (j) × E R1 (z) = K1 (z) × E From R1 (−y) to R1 (z−1), R1 (k) = R1 (k + 1) + K1 (k) × E where i, j, k, m, n , X, y, z are positive integers.
JP10057731A 1998-03-10 1998-03-10 Image processor and image processing method Pending JPH11261818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10057731A JPH11261818A (en) 1998-03-10 1998-03-10 Image processor and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10057731A JPH11261818A (en) 1998-03-10 1998-03-10 Image processor and image processing method

Publications (1)

Publication Number Publication Date
JPH11261818A true JPH11261818A (en) 1999-09-24

Family

ID=13064079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10057731A Pending JPH11261818A (en) 1998-03-10 1998-03-10 Image processor and image processing method

Country Status (1)

Country Link
JP (1) JPH11261818A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7362473B2 (en) 2002-12-13 2008-04-22 Seiko Epson Corporation Image processing technique for tone number conversion of image data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7362473B2 (en) 2002-12-13 2008-04-22 Seiko Epson Corporation Image processing technique for tone number conversion of image data

Similar Documents

Publication Publication Date Title
JP2500837B2 (en) Pixel value quantization method
JP3381755B2 (en) Method and apparatus for improved adaptive filtering and thresholding to reduce image graininess
US5325448A (en) Image treatment method and apparatus with error dispersion and controllable quantization
US6011878A (en) Image processing method and apparatus
JP2000333010A (en) Gradation dependent type error spread half tone processing method
JPH05336373A (en) Image recorder
JP3339610B2 (en) Improved method and apparatus for reducing warm in halftone images using gray balance correction
US5835238A (en) Phantom level edge enhanced error diffusion
JP3309944B2 (en) Improved method and apparatus for performing vivid color correction in a binary printing device
US20050195443A1 (en) Method and apparatus for processing images
JPH11196271A (en) Image data conversion method, device and recording medium recording image data conversion program and readable by computer
JPH11261818A (en) Image processor and image processing method
JP3976863B2 (en) Image processing apparatus and method
US6101001A (en) Target patterns controlled error management
US6356360B1 (en) Apparatus and method for rendering halftone dot structures using grey level dots
US7068395B1 (en) Image processing apparatus and method
JP2800071B2 (en) Color image forming equipment
JP2004282344A (en) Image processing method
JP2004186910A (en) Error propagation gradation generation method, gradation image revelation method, error propagation gradation image revelation method and gradation generation encoder
US20070002380A1 (en) Method and system for error compensation
JP2001309188A (en) Image processing unit and image processing method
US20020060812A1 (en) Image processing method and image processing apparatus
JPH091866A (en) Image forming apparatus
JPH10136205A (en) Image processor
JP2001203888A (en) Image processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041116

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050705