JP4139752B2 - Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program - Google Patents

Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program Download PDF

Info

Publication number
JP4139752B2
JP4139752B2 JP2003300497A JP2003300497A JP4139752B2 JP 4139752 B2 JP4139752 B2 JP 4139752B2 JP 2003300497 A JP2003300497 A JP 2003300497A JP 2003300497 A JP2003300497 A JP 2003300497A JP 4139752 B2 JP4139752 B2 JP 4139752B2
Authority
JP
Japan
Prior art keywords
error
diffusion
diffusion error
image processing
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003300497A
Other languages
Japanese (ja)
Other versions
JP2005072984A (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2003300497A priority Critical patent/JP4139752B2/en
Publication of JP2005072984A publication Critical patent/JP2005072984A/en
Application granted granted Critical
Publication of JP4139752B2 publication Critical patent/JP4139752B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置、画像形成装置、画像処理方法、画像処理プログラム、および該プログラムを記録した記録媒体に関するものである。具体的には、本発明は、画素ごとに入力される画像データに対し誤差拡散法に基づいて中間調処理を施す画像処理装置などに関するものである。   The present invention relates to an image processing apparatus, an image forming apparatus, an image processing method, an image processing program, and a recording medium on which the program is recorded, which distributes an error generated between an input density and an output density in a target pixel to peripheral pixels. It is. Specifically, the present invention relates to an image processing apparatus that performs halftone processing on image data input for each pixel based on an error diffusion method.

従来、スキャナなどの画像読取装置で読み込まれた画像データや、コンピュータでアプリケーションソフトウェアを用いて作成された画像データなどを、プリンタなどの画像出力装置を用いて画像出力することが行われている。このとき、画像出力装置の階調表現能力が画像データの階調表現能力を下回っている場合には、良好な階調を再現するために中間調処理と呼ばれる画像処理を画像データに対して施してから画像出力を行っている。   2. Description of the Related Art Conventionally, image data read by an image reading device such as a scanner or image data created using application software on a computer is output using an image output device such as a printer. At this time, if the gradation output capability of the image output device is lower than the gradation representation capability of the image data, image processing called halftone processing is performed on the image data in order to reproduce good gradation. Image output.

このような中間調処理では、一般にディザ法および誤差拡散法の2種類の方法が主に利用されている。このうち誤差拡散法は、解像度が高く階調再現性に優れるという点から、現在インクジェットプリンタなどで利用されている。誤差拡散法は、或る注目画素に関して、注目画素の濃度を所定の閾値と比較して量子化値を求める量子化を行い、量子化値に対して量子化前の濃度の差分を誤差として求め、求めた誤差を、注目画素の周辺に位置する量子化前の画素の濃度に拡散することにより階調数を削減し、かつ画像全体としての濃度階調を維持するものである。   In such halftone processing, generally two types of methods are mainly used: a dither method and an error diffusion method. Of these, the error diffusion method is currently used in inkjet printers and the like because it has high resolution and excellent tone reproducibility. The error diffusion method performs quantization to obtain a quantized value by comparing the density of a pixel of interest with a predetermined threshold for a certain pixel of interest, and obtains a difference in density before quantization as an error with respect to the quantized value. The obtained error is diffused to the density of the pre-quantization pixel located around the pixel of interest, thereby reducing the number of gradations and maintaining the density gradation of the entire image.

ここで、座標(x,y)で表される注目画素の誤差Ex,yを、注目画素から相対座標(i,j)だけ離間した周辺画素に拡散する拡散誤差ex+i,y+jは、拡散係数をai,jとすると、
x+i,y+j=(ai,j/Σai,j)×Ex,y
で表される。
Here, a diffusion error e x + i, y + for diffusing the error Ex , y of the pixel of interest represented by coordinates (x, y) to surrounding pixels separated from the pixel of interest by the relative coordinates (i, j). j is the diffusion coefficient a i, j ,
e x + i, y + j = (a i, j / Σa i, j ) × E x, y
It is represented by

従来、拡散誤差に小数を含む場合には、ハードウエアの簡略化またはソフトウエア処理の高速化の目的で小数部分の数値を切り捨てていた。この場合、各周辺画素の拡散誤差ex+i,y+jの合計値が注目画素の誤差Ex,yから大きくずれることにより、画質が劣化する虞がある。 Conventionally, when a decimal number is included in the diffusion error, the numerical value of the decimal part is rounded down for the purpose of simplifying the hardware or speeding up the software processing. In this case, the total value of the diffusion errors e x + i, y + j of each peripheral pixel may be greatly deviated from the error E x, y of the target pixel, so that the image quality may be deteriorated.

この問題点に対して、下記特許文献1に記載の画像処理方法では、注目画素の誤差を重みマトリクスの各係数(拡散係数)の総和で除算すると共に、その商の整数部には前記重みマトリクスの各係数倍をして対応する周囲画素に分配し、かつその剰余は所定の配分順位に従って対応する周辺画素に分配している。   In order to solve this problem, in the image processing method described in Patent Document 1 below, the error of the pixel of interest is divided by the sum of the coefficients (diffusion coefficients) of the weight matrix, and the weight matrix includes the weight matrix. Each coefficient is multiplied and distributed to the corresponding surrounding pixels, and the remainder is distributed to the corresponding surrounding pixels according to a predetermined distribution order.

この画像処理方法によると、小数部分の演算が不要であるのでソフトウエア処理でも高速に実行でき、またハードウエア構造を簡単にすることができる。また、小数部分の数値に対応する剰余を所定の配分順位に従って対応する周辺画素に分配しているので、画質の劣化を防止することができる。
特開平2−97169号公報(1990年4月9日公開)
According to this image processing method, calculation of the decimal part is not necessary, so that even software processing can be executed at high speed, and the hardware structure can be simplified. Further, since the remainder corresponding to the numerical value of the decimal part is distributed to the corresponding peripheral pixels in accordance with a predetermined distribution order, it is possible to prevent image quality deterioration.
Japanese Patent Laid-Open No. 2-97169 (published on April 9, 1990)

例えばデジタル複写機などの画像形成装置の処理能力を向上させるため、画質を劣化させることなく上記中間調処理を高速に行うことが要求されている。   For example, in order to improve the processing capability of an image forming apparatus such as a digital copying machine, it is required to perform the halftone process at a high speed without degrading the image quality.

注目画素と同じラインの画素の処理は、パイプライン化ができないため、1クロックにて処理する必要がある。特に、注目画素の右隣の画素については、非常に処理が重く、かつパイプライン化ができないため、高速化を図る時のボトルネックになる。   Since processing of pixels on the same line as the target pixel cannot be pipelined, it is necessary to perform processing with one clock. In particular, the pixel immediately adjacent to the pixel of interest is a bottleneck for speeding up processing because it is very heavy and cannot be pipelined.

これに対し、注目画素と異なるラインの処理は、パイプライン化が可能であるので、パイプラインを深めれば(パイプラインの段数を増やせば)、容易に高速化が可能である。したがって、上記ボトルネックを解消することが求められている。   On the other hand, since processing of a line different from the target pixel can be pipelined, if the pipeline is deepened (if the number of pipeline stages is increased), the processing speed can be easily increased. Therefore, it is required to eliminate the bottleneck.

また、上記特許文献1では、剰余が分配される周辺画素に注目画素の右隣の画素も含まれるため、注目画素の右隣の画素は、通常よりも更に処理が重くなり、処理速度が低下することになる。   Further, in the above-mentioned Patent Document 1, since the pixel adjacent to the right side of the target pixel is included in the peripheral pixels to which the remainder is distributed, the processing of the pixel adjacent to the right side of the target pixel becomes heavier than usual, and the processing speed decreases. Will do.

本発明は、上記の問題点に鑑みてなされたものであり、その目的は、画質の劣化を抑えつつ、中間調処理を高速に行うことができる画像処理装置などを提供することにある。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image processing apparatus capable of performing halftone processing at high speed while suppressing deterioration in image quality.

上記課題を解決するため、本発明に係る画像処理装置は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化手段と、上記量子化により生じる誤差を算出する誤差算出手段と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出手段とを備えており、該拡散誤差算出手段は、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われることを特徴としている。 In order to solve the above problems, an image processing apparatus according to the present invention is an image processing apparatus that distributes an error between an input density and an output density of a target pixel to surrounding pixels, and the input density is quantized with a predetermined threshold value. Quantization means for obtaining the output density, error calculation means for calculating an error caused by the quantization, and diffusion error calculation means for calculating a diffusion error in which the error is distributed to each peripheral pixel. The diffusion error calculation means truncates the decimal part of the diffusion error distributed to the peripheral pixel that is the next pixel of interest, while subtracting the decimal part of the diffusion error distributed to other peripheral pixels. and rounded toward the smaller, rounding the fractional part of the diffused error for those absolute value decreases the diffusion errors, if the diffusion error is a positive value is the fractional part of the diffused error cut While the temple, is characterized in that the diffused error is performed by when the negative value represented by complement fractional part of the diffusion errors rounded up.

また、本発明に係る画像処理装置は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化手段と、上記量子化により生じる誤差を算出する誤差算出手段と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出手段とを備えており、上記拡散誤差算出手段は、上記拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理手段を備えており、該小数処理手段は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げることを特徴としている。 The image processing apparatus according to the present invention is an image processing apparatus that distributes an error that occurs between an input density and an output density at a pixel of interest to peripheral pixels, and the input density is quantized with a predetermined threshold value. The above-mentioned quantization error calculation means, an error calculation means for calculating an error caused by the quantization, and a diffusion error calculation means for calculating a diffusion error in which the error is distributed to each peripheral pixel are provided. The means includes a decimal processing means for rounding a decimal part of the diffusion error to a smaller absolute value of the diffusion error, and the decimal processing means has the diffusion error if the diffusion error is a positive value. The decimal part of the diffusion error is rounded down if the diffusion error is a negative value represented by a complement .

また、本発明に係る画像形成装置は、上記構成の画像処理装置を一体に備えることを特徴とする
また、本発明に係る画像処理方法は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置の画像処理方法において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化工程と、上記量子化工程により生じる誤差を算出する誤差算出工程と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出工程とを含んでおり、該拡散誤差算出工程は、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われることを特徴としている。
In addition, the image forming apparatus according to the present invention is characterized in that the image processing apparatus having the above-described configuration is integrally provided. The image processing method according to the present invention occurs between the input density and the output density in the target pixel. In an image processing method of an image processing apparatus for distributing an error to surrounding pixels, a quantization step for quantizing the input density with a predetermined threshold to obtain the output density, and an error calculation step for calculating an error caused by the quantization step And a diffusion error calculation step of calculating a diffusion error in which the error is distributed to each peripheral pixel, and the diffusion error calculation step is a decimal number of diffusion errors to be distributed to the peripheral pixel to be the next pixel of interest. The fractional part of the diffusion error distributed to other peripheral pixels is rounded down to the smaller absolute value of the diffusion error, and the diffusion error is reduced to the smaller absolute value of the diffusion error. Rounding off the decimal part of the error means that if the diffusion error is a positive value, the decimal part of the diffusion error is truncated, whereas if the diffusion error is a negative value represented by a complement, the decimal part of the diffusion error is rounded off. It is characterized by being performed by rounding up the part .

また、本発明に係る画像処理方法は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置画像処理方法において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化工程と、上記量子化により生じる誤差を算出する誤差算出工程と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出工程とを含んでおり、上記拡散誤差算出工程は、上記拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理工程を含んでおり、該小数処理工程は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げることを特徴としている。 The image processing method according to the present invention is an image processing method for an image processing apparatus for distributing an error generated between the input density and output density at the target pixel to peripheral pixels, quantizes the input density at a predetermined threshold value A quantization step for setting the output density, an error calculation step for calculating an error caused by the quantization, and a diffusion error calculation step for calculating a diffusion error in which the error is distributed to each peripheral pixel. It said diffusion error calculation step, any fractional portion of the diffused error, the absolute value and Nde including fractional step rounding towards the smaller the diffusion errors, the small number of processing steps, the diffusion error is positive value For example, the decimal part of the diffusion error is rounded down, while the decimal part of the diffusion error is rounded up if the diffusion error is a negative value represented by a complement .

また、本発明に係る画像処理プログラムは、上記構成の画像処理装置を動作させるための画像処理プログラムであって、コンピュータを上記画像処理装置の各手段として機能させるものである。   An image processing program according to the present invention is an image processing program for operating the image processing apparatus having the above configuration, and causes a computer to function as each unit of the image processing apparatus.

また、本発明に係る記録媒体は、上記画像処理プログラムが記録されたコンピュータ読取り可能な記録媒体である。   A recording medium according to the present invention is a computer-readable recording medium on which the image processing program is recorded.

本発明に係る画像処理装置は、以上のように、拡散誤差算出手段が、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われる構成である。 In the image processing apparatus according to the present invention, as described above, the diffusion error calculation means truncates the decimal part of the diffusion error distributed to the peripheral pixel that is the next pixel of interest, while the diffusion distributed to other peripheral pixels. The decimal part of the error is rounded to the smaller absolute value of the diffusion error, and the decimal part of the diffusion error is rounded to the smaller absolute value of the diffusion error. If this is the case, the decimal part of the diffusion error is rounded down. On the other hand, if the diffusion error is a negative value represented by a complement, the decimal part of the diffusion error is rounded up .

これにより、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てるという、単純な丸め処理のみを行うので、次に注目画素となる周辺画素における処理の負荷が増大することを防止する効果を奏する。また、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めることにより、蓄積された拡散誤差が大きくずれることを防止できる。従って、次に注目画素となる周辺画素に該当する場合に単純な丸め処理を行うことによる画質への影響は小さいので、画質の劣化を抑える効果を奏する。 Thus, that truncates the fractional portion of the diffusion error to be distributed to the peripheral pixels following the pixel of interest, since the only simple rounding, that the load of processing in the peripheral pixels following the pixel of interest increases There is an effect to prevent. Further, the fractional part of the diffusion error to be distributed to other surrounding pixels, by rounding towards the absolute value of the diffused error is small, Ru can be prevented accumulated diffusion error deviates greatly. Therefore, since the influence on the image quality by performing a simple rounding process is small when it corresponds to the peripheral pixel to be the next pixel of interest, an effect of suppressing the deterioration of the image quality is exhibited.

また、本発明に係る画像処理装置は、以上のように、上記拡散誤差算出手段が、拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理手段を備えており、該小数処理手段は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げる構成である。これにより、丸め処理前後での拡散誤差のずれを小さくすることができるので、拡散誤差が蓄積されることによりずれが大きくなることを抑えることができ、画質の劣化を抑えることができる効果を奏する。 In the image processing apparatus according to the present invention, as described above, the diffusion error calculation unit includes a decimal processing unit that rounds the decimal part of the diffusion error to a smaller absolute value of the diffusion error . The decimal processing means truncates the decimal part of the diffusion error if the diffusion error is a positive value, and rounds up the decimal part of the diffusion error if the diffusion error is a negative value represented by a complement. It is. As a result, the deviation of the diffusion error before and after the rounding process can be reduced, so that an increase in the deviation due to the accumulation of the diffusion error can be suppressed, and the deterioration of the image quality can be suppressed. .

また、上記構成の画像処理装置を一体に備える画像形成装置であっても、上述の作用効果を奏することができる。   In addition, even the image forming apparatus integrally including the image processing apparatus having the above configuration can achieve the above-described effects.

また、本発明に係る画像処理方法は、以上のように、拡散誤差算出工程が、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われている。これにより、次に注目画素となる周辺画素における処理の負荷が増大することを防止する効果を奏する。また、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めることにより、蓄積された拡散誤差が大きくずれることを防止できるので、次に注目画素となる周辺画素に該当する場合に単純な丸め処理を行うことによる画質への影響は小さく、従って、画質の劣化を抑える効果を奏する。 In the image processing method according to the present invention, as described above, the diffusion error calculation step truncates the decimal part of the diffusion error distributed to the peripheral pixel that is the next pixel of interest, while being distributed to other peripheral pixels. Rounding the decimal part of the diffusion error to the smaller absolute value of the diffusion error and rounding the decimal part of the diffusion error to the smaller absolute value of the diffusion error. If the value is, the decimal part of the diffusion error is rounded down. On the other hand, if the diffusion error is a negative value represented by a complement, the decimal part of the diffusion error is rounded up . As a result, there is an effect of preventing an increase in processing load on the peripheral pixel that is the next pixel of interest. Further, by rounding the decimal part of the diffusion error distributed to other peripheral pixels to the smaller absolute value of the diffusion error, it is possible to prevent the accumulated diffusion error from being greatly shifted, so that the next target pixel In the case of corresponding peripheral pixels, a simple rounding process has a small influence on the image quality, and thus has an effect of suppressing the deterioration of the image quality.

また、本発明に係る画像処理方法は、以上のように、拡散誤差算出工程が、拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理工程を含んでおり、該小数処理工程は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げている。これにより、丸め処理前後での拡散誤差のずれを小さくすることができるので、拡散誤差が蓄積されることによりずれが大きくなることを抑えることができ、画質の劣化を抑えることができる効果を奏する。 The image processing method according to the present invention, as described above, the diffusion error calculation step, the fractional part of diffused error includes a fractional step rounding towards the absolute value of the diffused error is small, the The decimal processing step rounds down the fractional portion of the diffusion error if the diffusion error is a positive value, and rounds up the fractional portion of the diffusion error if the diffusion error is a negative value represented by a complement . . As a result, the deviation of the diffusion error before and after the rounding process can be reduced, so that an increase in the deviation due to the accumulation of the diffusion error can be suppressed, and the deterioration of the image quality can be suppressed. .

なお、上記画像処理装置における各手段を、画像処理プログラムによりコンピュータ上で実行させることができる。さらに、上記画像処理プログラムをコンピュータ読取り可能な記録媒体に記憶させることにより、任意のコンピュータ上で上記画像処理プログラムを実行させることができる。   Each unit in the image processing apparatus can be executed on a computer by an image processing program. Furthermore, the image processing program can be executed on an arbitrary computer by storing the image processing program in a computer-readable recording medium.

〔実施の形態1〕
本発明の一実施形態について図1ないし図に基づいて説明すれば以下の通りである。図2は、本実施形態のデジタルカラー複写機(画像形成装置)の概略構成を示している。図示のように、デジタルカラー複写機10は、画像入力装置11、画像処理装置12、画像出力装置13、および操作パネル14を備える構成である。
[Embodiment 1]
An embodiment of the present invention will be hereinafter explained with reference to FIGS. 1 to 8. FIG. 2 shows a schematic configuration of the digital color copying machine (image forming apparatus) of the present embodiment. As illustrated, the digital color copying machine 10 includes an image input device 11, an image processing device 12, an image output device 13, and an operation panel 14.

画像入力装置11は、例えばCCD(Charge Coupled Device)を備えたスキャナ部を備える構成である。画像入力装置11は、原稿からの反射光像をCCDにて読み取って、RGB(R:赤・G:緑・B:青)のアナログ信号を生成し、生成したRGBアナログ信号を画像処理装置12に出力する。   The image input device 11 is configured to include a scanner unit including, for example, a CCD (Charge Coupled Device). The image input device 11 reads a reflected light image from a document with a CCD, generates RGB (R: red, G: green, B: blue) analog signals, and uses the generated RGB analog signals as the image processing device 12. Output to.

画像処理装置12は、ASIC(Application Specific Integrated Circuit)で構成されており、画像入力装置11から受け取ったRGBアナログ信号に対して画像処理を行って、CMYK画像データを生成し、画像出力装置13に出力する。画像出力装置13は、画像処理装置12から1ページ分のCMYK画像データを受け取り、該データに基づいて記録紙に画像を出力する。   The image processing device 12 is configured by an ASIC (Application Specific Integrated Circuit), performs image processing on the RGB analog signal received from the image input device 11, generates CMYK image data, and sends it to the image output device 13. Output. The image output device 13 receives CMYK image data for one page from the image processing device 12, and outputs an image on a recording sheet based on the data.

操作パネル14は、図示しないが、ユーザとのインタフェースを行うための液晶表示装置や動作指示用のボタン類から構成され、各装置11〜13との通信により、各装置11〜13に動作を指示したり、各装置11の動作状態を液晶表示装置に表示したりする。   Although not shown, the operation panel 14 includes a liquid crystal display device for performing an interface with a user and buttons for operation instructions. The operation panel 14 instructs each of the devices 11 to 13 by communication with the devices 11 to 13. Or the operation state of each device 11 is displayed on the liquid crystal display device.

次に、本実施形態における画像処理装置12のさらに詳しい構成および機能について説明する。図2に示すように、画像処理装置12は、A/D(アナログ/デジタル)変換部20、シェーディング補正部21、入力階調補正部22、領域分離処理部23、色補正部24、黒生成下色除去部25、空間フィルタ処理部26、出力階調補正部27、階調再現処理部(中間調生成部)28、および制御部29を備える構成である。   Next, a more detailed configuration and function of the image processing apparatus 12 in the present embodiment will be described. As shown in FIG. 2, the image processing apparatus 12 includes an A / D (analog / digital) conversion unit 20, a shading correction unit 21, an input tone correction unit 22, a region separation processing unit 23, a color correction unit 24, and a black generation. The undercolor removal unit 25, the spatial filter processing unit 26, the output tone correction unit 27, the tone reproduction processing unit (halftone generation unit) 28, and a control unit 29 are provided.

A/D変換部20は、画像入力装置11から受け取ったRGBアナログ信号をA/D変換することによりデジタル形式のRGB画像データを生成する。シェーディング補正部21は、A/D変換部20から受け取ったRGB画像データに対して、画像入力装置11の照明系、結像系、および撮像系で生じる各種の歪みを取り除く処理を施す。入力階調補正部22は、シェーディング補正部21にて各種の歪みが取り除かれたRGB画像データ(RGBの反射率データ)に対して、カラーバランスを整えると同時に、例えば濃度データのように、後の画像処理で扱い易い画像データに変換する。   The A / D converter 20 A / D converts the RGB analog signal received from the image input device 11 to generate digital RGB image data. The shading correction unit 21 performs processing for removing various distortions generated in the illumination system, the imaging system, and the imaging system of the image input device 11 on the RGB image data received from the A / D conversion unit 20. The input tone correction unit 22 adjusts the color balance of the RGB image data (RGB reflectance data) from which various distortions have been removed by the shading correction unit 21, and at the same time, for example, as in the density data, The image data is converted into easy-to-handle image data.

領域分離処理部23は、入力階調補正部22から受け取った画像データに対して、入力画像中の各画素を文字領域、網点領域、および写真領域の何れかに分離するものである。領域分離処理部23は、分離結果に基づき、画素が何れの領域に属しているかを示す領域識別信号を、黒生成下色除去部25および空間フィルタ処理部26へ出力するとともに、入力階調補正部22から受け取った画像データをそのまま後段の色補正部24に出力する。なお、領域分離処理部23は、上記領域識別信号を階調再現処理部28に出力しても良い。   The region separation processing unit 23 separates each pixel in the input image into one of a character region, a dot region, and a photographic region with respect to the image data received from the input tone correction unit 22. Based on the separation result, the region separation processing unit 23 outputs a region identification signal indicating to which region the pixel belongs to the black generation and under color removal unit 25 and the spatial filter processing unit 26 and also performs input tone correction. The image data received from the unit 22 is output to the subsequent color correction unit 24 as it is. Note that the region separation processing unit 23 may output the region identification signal to the gradation reproduction processing unit 28.

色補正部24は、RGB画像データをCMY(C:シアン・M:マゼンタ・Y:イエロー)画像データに変換するとともに、忠実な色再現を実現するために、不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理を施す。黒生成下色除去部25は、色補正部24から受け取ったCMY画像データからK(黒)画像データを生成するとともに、生成されたK画像データを元のCMY画像データから差し引いて新たなCMY画像データを生成する。これによりCMYの3色画像データはCMYKの4色画像データに変換される。   The color correction unit 24 converts the RGB image data into CMY (C: cyan, M: magenta, Y: yellow) image data, and in order to realize faithful color reproduction, the color correction unit 24 includes CMY color materials including unnecessary absorption components. A process for removing color turbidity based on spectral characteristics is performed. The black generation and under color removal unit 25 generates K (black) image data from the CMY image data received from the color correction unit 24, and subtracts the generated K image data from the original CMY image data to create a new CMY image. Generate data. As a result, the CMY three-color image data is converted into CMYK four-color image data.

空間フィルタ処理部26は、黒生成下色除去部25から受け取ったCMYK画像データに対して、領域分離処理部23から受け取った領域識別信号に基づいて、デジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正する。これにより、出力画像のぼやけや粒状性劣化を防止する。例えば、領域分離処理部23にて分離された文字領域に対しては、特に黒文字或いは色文字の再現性を高めるために、鮮鋭強調処理で高周波数の強調量が大きくされる。また、領域分離処理部23にて分離された網点領域に対しては、入力網点成分を除去するためのローパス・フィルタ処理が施される。   The spatial filter processing unit 26 performs a spatial filter process using a digital filter on the CMYK image data received from the black generation and under color removal unit 25 based on the region identification signal received from the region separation processing unit 23 to obtain a spatial frequency. Correct the characteristics. This prevents blurring of the output image and deterioration of graininess. For example, for a character region separated by the region separation processing unit 23, in order to improve the reproducibility of a black character or a color character in particular, a high frequency enhancement amount is increased by a sharp enhancement process. The halftone area separated by the area separation processing unit 23 is subjected to a low-pass filter process for removing the input halftone component.

出力階調補正部27は、濃度データなどのデータを画像出力装置13の特性値である網点面積率に変換する出力階調補正処理を行う。   The output tone correction unit 27 performs output tone correction processing for converting data such as density data into a halftone dot area ratio that is a characteristic value of the image output device 13.

階調再現処理部28は、最終的に画像を画素ごとに分離してそれぞれの階調を再現できるように処理する階調再現処理(中間調生成処理)を行う。階調再現処理としては、2値や多値のディザ法・誤差拡散法等を用いることができるが、本願では誤差拡散法を利用する。なお、階調再現処理部28の詳細は後述する。   The gradation reproduction processing unit 28 performs gradation reproduction processing (halftone generation processing) in which an image is finally separated for each pixel and processed so that each gradation can be reproduced. As the gradation reproduction process, a binary or multi-value dither method, an error diffusion method, or the like can be used. In this application, an error diffusion method is used. Details of the gradation reproduction processing unit 28 will be described later.

以上の処理が施されたCMYK画像データは、一旦記憶手段(図示せず)に記憶され、所定のタイミングで読み出されて画像出力装置13に出力される。この画像出力装置13は、画像データを紙などの記録媒体上に出力するものであり、例えば、電子写真方式やインクジェット方式を用いたカラー画像出力装置等を挙げることができるが特に限定されるものではない。   The CMYK image data subjected to the above processing is temporarily stored in a storage means (not shown), read out at a predetermined timing, and output to the image output device 13. The image output device 13 outputs image data onto a recording medium such as paper. Examples of the image output device 13 include a color image output device using an electrophotographic method or an ink jet method, but are particularly limited. is not.

制御部29は、一般的なCPU(Central Processing Unit)で構成され、画像処理装置12における各部20〜28を制御することにより、一連の画像処理を実施させる。   The control unit 29 is configured by a general CPU (Central Processing Unit), and controls each unit 20 to 28 in the image processing apparatus 12 to perform a series of image processing.

次に、本実施形態における階調再現処理部28にて行われる階調再現処理について詳細に説明する。本実施形態にて利用される誤差拡散法は、上述のように、或る注目画素に関して、注目画素の入力画像データを所定の閾値と比較して量子化値を求める量子化を行い、量子化値に対して入力画像データの差分を誤差として求め、求めた誤差を、注目画素の周辺に位置する量子化前の画素の入力画像データに拡散することにより階調数を削減し、かつ画像全体としての濃度階調を維持するものである。   Next, the gradation reproduction process performed by the gradation reproduction processing unit 28 in the present embodiment will be described in detail. As described above, the error diffusion method used in the present embodiment performs quantization to obtain a quantized value by comparing the input image data of a target pixel with a predetermined threshold for a target pixel. The difference between the input image data with respect to the value is obtained as an error, and the obtained error is diffused to the input image data of the pre-quantization pixel located around the target pixel to reduce the number of gradations, and the entire image The density gradation is maintained.

ここで、座標(x,y)で表される注目画素の誤差Ex,yを、注目画素から相対座標(i,j)だけ離間した周辺画素に拡散する拡散誤差ex+i,y+jは、拡散係数をai,jとすると、
x+i,y+j=(ai,j/Σai,j)×Ex,y
で表される。
Here, a diffusion error e x + i, y + for diffusing the error Ex , y of the pixel of interest represented by coordinates (x, y) to surrounding pixels separated from the pixel of interest by the relative coordinates (i, j). j is the diffusion coefficient a i, j ,
e x + i, y + j = (a i, j / Σa i, j ) × E x, y
It is represented by

拡散誤差が分配される周辺画素は、画像データに対して量子化処理が未だ行われていない画素である。一般に、1画面分の画像データの送出は、左上の画素を開始点として、同一ライン右方向の画素の画像データが順次送られ、これを下方向のラインに関して繰り返すことにより行われる。このため、拡散誤差が分配される周辺画素は、注目画素の同一ライン右方向の全画素と、注目画素より下のラインの全画素との中から選択することができる。   The peripheral pixels to which the diffusion error is distributed are pixels that have not yet been quantized on the image data. In general, transmission of image data for one screen is performed by sequentially sending image data of pixels in the right direction of the same line starting from the upper left pixel, and repeating this for the lower line. Therefore, the peripheral pixels to which the diffusion error is distributed can be selected from all pixels in the right direction of the same line of the target pixel and all pixels on the line below the target pixel.

図3は、本実施形態にて利用される注目画素とその周辺画素との関係を示している。図示のように、本実施形態では、或る注目画素Pに対して右隣・左下・真下・右下に位置する画素、すなわち或る注目画素Pに対して相対座標(1,0)・(−1,1)・(0,1)・(1,1)に位置する画素を選択して周辺画素A・B・C・Dとしている。 FIG. 3 shows the relationship between the pixel of interest used in this embodiment and its peripheral pixels. As shown in the figure, in the present embodiment, relative coordinates (1, 0) , ( The pixels located at −1, 1), (0, 1), (1, 1) are selected as peripheral pixels A, B, C, and D.

各周辺画素の拡散係数ai,jは、予め定められており、後述の拡散係数格納部32に格納されている。なお、各周辺画素の拡散係数ai,jを要素とする拡散マトリクスを、予め定められた複数組(例えば4組)用意しておき、注目画素ごとにランダムに1組を選択することが望ましい。この場合、同じような濃度が続く領域に対して、モアレ縞のような元の画像にはない模様が生じることを防止できる。 The diffusion coefficient a i, j of each peripheral pixel is determined in advance and stored in a diffusion coefficient storage unit 32 described later. It should be noted that it is desirable to prepare a plurality of predetermined diffusion matrixes (for example, 4 groups) having diffusion coefficients a i, j of each peripheral pixel as elements, and select one group at random for each pixel of interest. . In this case, it is possible to prevent a pattern that does not exist in the original image such as moire fringes from occurring in a region where the same density continues.

図1は、階調再現処理部28の概略構成を示している。階調再現処理部28は、量子化処理部(量子化手段、誤差算出手段)30、拡散誤差演算部(拡散誤差算出手段)31、拡散係数格納部32、および拡散誤差格納部33を備える構成である。   FIG. 1 shows a schematic configuration of the gradation reproduction processing unit 28. The gradation reproduction processing unit 28 includes a quantization processing unit (quantization unit, error calculation unit) 30, a diffusion error calculation unit (diffusion error calculation unit) 31, a diffusion coefficient storage unit 32, and a diffusion error storage unit 33. It is.

量子化処理部30は、注目画素(x,y)の入力画像データ(入力濃度)に対し、蓄積された拡散誤差Σex,yを拡散誤差格納部33から取得して加算し、加算された画像データを所定の閾値と比較して量子化する。例えば、閾値を128として、0〜255の値を有する入力画像データを「0」または「255」に2値化する。なお、複数の閾値を用いて3値以上に量子化することもできる。量子化された画像データは、出力画像データ(出力濃度)として画像出力装置13に出力される。また、量子化処理部30は、量子化された画像データから、加算された画像データを減算した差を誤差として算出する。算出された誤差は、拡散誤差演算部31における各周辺画素A〜Dの演算部に送られる。 The quantization processing unit 30 acquires and adds the accumulated diffusion error Σex , y from the diffusion error storage unit 33 to the input image data (input density) of the target pixel (x, y), and adds The image data is compared with a predetermined threshold and quantized. For example, assuming that the threshold value is 128, input image data having a value of 0 to 255 is binarized to “0” or “255”. It is also possible to quantize to three or more values using a plurality of threshold values. The quantized image data is output to the image output device 13 as output image data (output density). Further, the quantization processing unit 30 calculates a difference obtained by subtracting the added image data from the quantized image data as an error. The calculated error is sent to the calculation unit of each peripheral pixel A to D in the diffusion error calculation unit 31.

拡散誤差演算部31は、上述のように、量子化処理部30にて算出された誤差に基づいて、周辺画素A〜Dに分配される拡散誤差を算出する。なお、拡散誤差演算部31の詳細については後述する。拡散係数格納部32には、上述のように、各周辺画素A〜Dの拡散係数ai,jを含む拡散マトリックスが複数組格納されている。 As described above, the diffusion error calculation unit 31 calculates the diffusion error distributed to the peripheral pixels A to D based on the error calculated by the quantization processing unit 30. Details of the diffusion error calculation unit 31 will be described later. As described above, the diffusion coefficient storage unit 32 stores a plurality of sets of diffusion matrices including the diffusion coefficients a i, j of the peripheral pixels A to D.

拡散誤差格納部33は、各画素に関して、該当する画像データの量子化処理が行われるまで、拡散誤差を蓄積しかつ保持している。すなわち、注目画素Pから周辺画素A〜Dに分配された拡散誤差は、拡散誤差格納部33に保持されている拡散誤差に加算されて保持されることになる。   The diffusion error storage unit 33 accumulates and holds the diffusion error for each pixel until the corresponding image data is quantized. That is, the diffusion error distributed from the target pixel P to the peripheral pixels A to D is added to the diffusion error held in the diffusion error storage unit 33 and held.

実際の回路上では、画素ごとに蓄積される拡散誤差は、画素が周辺画素A〜Dに該当しない場合には、FIFO(先入れ先出し)型メモリに保持される一方、画素が周辺画素A〜Dに該当する場合には、注目画素Pから分配された拡散誤差が加算器にて加算されて、ラッチにて保持されることになる。   In an actual circuit, the diffusion error accumulated for each pixel is held in a FIFO (first in first out) type memory when the pixel does not correspond to the peripheral pixels A to D, while the pixel is stored in the peripheral pixels A to D. If this is the case, the diffusion error distributed from the pixel of interest P is added by the adder and held by the latch.

次に、拡散誤差演算部31の詳細な構成を説明する。拡散誤差演算部31は、周辺画素Aに関して簡易演算部(簡易算出手段、演算手段、小数処理手段)40を備え、他の周辺画素B〜Dのそれぞれに関して通常演算部(演算手段)41、符号判定部42、ビット判定部43、および補正部(小数処理手段)44を備える構成である。   Next, a detailed configuration of the diffusion error calculation unit 31 will be described. The diffusion error calculation unit 31 includes a simple calculation unit (simple calculation unit, calculation unit, decimal processing unit) 40 for the peripheral pixel A, and a normal calculation unit (calculation unit) 41, code for each of the other peripheral pixels B to D. The configuration includes a determination unit 42, a bit determination unit 43, and a correction unit (decimal processing means) 44.

簡易演算部40および通常演算部41は、注目画素Pから誤差Ex,yを受け取り、拡散係数格納部32から周辺画素に対応する拡散係数を受け取って、上述の式の演算を行って拡散誤差を算出する。例えば、図6(a)に示すように、周辺画素A〜Dに対応する拡散係数ai,jを全て1とした場合、次式の演算を行って拡散誤差を算出する。 The simple calculation unit 40 and the normal calculation unit 41 receive the error Ex, y from the target pixel P, receive the diffusion coefficient corresponding to the peripheral pixel from the diffusion coefficient storage unit 32, perform the above-described equation, and perform the diffusion error. Is calculated. For example, as shown in FIG. 6A, when all the diffusion coefficients a i, j corresponding to the peripheral pixels A to D are set to 1, the diffusion error is calculated by calculating the following equation.

x+i,y+j=(1/4)×Ex,y …(1)
なお、算出された拡散誤差の小数部分は、周辺画素Aに関しては簡易演算部40にて切り捨てられ、周辺画素B〜Dに関しては後述のように補正部44にて丸められる。
e x + i, y + j = (1/4) × E x, y (1)
The decimal part of the calculated diffusion error is rounded down by the simple calculation unit 40 for the peripheral pixel A, and rounded by the correction unit 44 for the peripheral pixels B to D as described later.

本実施形態では、次に注目画素Pとなる周辺画素、すなわち周辺画素Aにおける拡散誤差の算出を簡易な演算で行っている。これにより、周辺画素Aにおける拡散誤差の算出時間が短くなり、次の注目画素Pにおける量子化処理を実行するまでの時間が短くなる。したがって、中間調処理を高速に行うことができる。   In the present embodiment, the calculation of the diffusion error in the peripheral pixel that is the next target pixel P, that is, the peripheral pixel A is performed by a simple calculation. Thereby, the calculation time of the diffusion error in the peripheral pixel A is shortened, and the time until the quantization process in the next target pixel P is performed is shortened. Therefore, halftone processing can be performed at high speed.

例えば、図6(b)に示されるような拡散マトリクスの場合、通常演算では、次式の演算を行って拡散誤差を算出する。   For example, in the case of a diffusion matrix as shown in FIG. 6B, in the normal calculation, the following equation is calculated to calculate the diffusion error.

画素A:ex,y+1=(5/16)×Ex,y
画素B:ex+1,y-1=(3/16)×Ex,y
画素C:ex+1,y=(5/16)×Ex,y
画素D:ex+1,y+1=(3/16)×Ex,y
これに対し、簡易演算では、乗算を行う代わりに加算または減算を行うことにより拡散誤差を算出している。具体的には、簡易演算が行われる周辺画素Aは、5/16=(1/16)+(1/4)となることから、次式の演算を行って拡散誤差を算出する。
Pixel A: e x, y + 1 = (5/16) × E x, y
Pixel B: e x + 1, y-1 = (3/16) × E x, y
Pixel C: e x + 1, y = (5/16) × E x, y
Pixel D: e x + 1, y + 1 = (3/16) × E x, y
On the other hand, in the simple calculation, the diffusion error is calculated by performing addition or subtraction instead of multiplication. Specifically, since the surrounding pixel A on which the simple calculation is performed is 5/16 = (1/16) + (1/4), the calculation of the following equation is performed to calculate the diffusion error.

画素A:ex,y+1={(1/16)+(1/4)}×Ex,y
一般に、m桁とn桁との乗算を行う場合、積として(m+n)桁を準備する必要がある。また、桁数が増えると、論理積を行うANDゲートや加算を行う加算器の数が著しく増大することになり、処理が遅延するとともに、回路規模が増大することになる。
Pixel A: e x, y + 1 = {(1/16) + (1/4)} × E x, y
In general, when multiplying m digits and n digits, it is necessary to prepare (m + n) digits as a product. Further, when the number of digits increases, the number of AND gates that perform logical product and the number of adders that perform addition significantly increase, delaying the processing and increasing the circuit scale.

一方、加算または減算を用いて、分配される拡散誤差を算出する場合、誤差Ex,yに乗算される係数(ai,j/Σai,j)が、乗算が不要な係数とする必要があるため、利用できる拡散係数ai,jが制限される。しかしながら、乗算を行う場合に比べて桁数が大きく増えることはないので、回路を簡略化でき、演算処理を迅速に行うことができる。なお、除算において、2の累乗で除算するようにすれば、ビットシフト動作のみを行えばよいので、計算処理の負荷を一層減らすことができる。 On the other hand, by using the addition or subtraction, when calculating the diffusion errors to be distributed, the error E x, the coefficient to be multiplied by y (a i, j / Σa i, j) is required multiplication is unnecessary coefficients Therefore, the available diffusion coefficient a i, j is limited. However, since the number of digits does not increase as compared with the case of performing multiplication, the circuit can be simplified and the arithmetic processing can be performed quickly. Note that if the division is performed by a power of 2, only the bit shift operation needs to be performed, so that the calculation processing load can be further reduced.

符号判定部42は、量子化処理部30から受け取った誤差Ex,yが負の値であるか否かを判断する。これには、図7に示すように、量子化処理部30から受け取った誤差データの符号ビットが利用される。なお、図7の場合では、負の数は2の補数で表されている。また、符号判定部42は、通常演算部41にて算出された拡散誤差が負の数であるか否かを判断してもよい。 The sign determination unit 42 determines whether or not the error Ex, y received from the quantization processing unit 30 is a negative value. For this purpose, as shown in FIG. 7, the sign bit of the error data received from the quantization processing unit 30 is used. In the case of FIG. 7, the negative number is represented by 2's complement. The sign determination unit 42 may determine whether the diffusion error calculated by the normal calculation unit 41 is a negative number.

ビット判定部43は、通常演算部41で算出された拡散誤差の小数部分のビットの論理和が1であるか否かを判断する。すなわち、図7の場合では、拡散誤差は誤差に1/4を乗算したものであるから、下位2ビットが小数部分のビットとなる。したがって、下位2ビットの論理和が1であるか否かを判断することになる。これにより、拡散誤差に小数部分の値が存在するか否かを判断することができる。   The bit determination unit 43 determines whether or not the logical sum of the bits of the decimal part of the diffusion error calculated by the normal calculation unit 41 is 1. That is, in the case of FIG. 7, since the diffusion error is obtained by multiplying the error by ¼, the lower 2 bits become the bits of the decimal part. Therefore, it is determined whether or not the logical sum of the lower 2 bits is 1. This makes it possible to determine whether or not there is a decimal value in the diffusion error.

補正部44は、符号判定部42およびビット判定部41の判定結果を受け取り、これらの判定結果に基づいて、誤差Ex,yが負の値であり、かつ、拡散誤差に小数部分の値が存在する場合には、拡散誤差の小数部分を切り捨てるとともに1を加算し、それ以外の場合では、拡散誤差の小数部分を切り捨てる補正処理が行われる。すなわち、拡散誤差に小数部分の値が存在する場合、拡散誤差が正の値であれば小数部分が切り捨てられ、負の値であれば小数部分が切り上げられることになるから、拡散誤差の絶対値が小さくなる方へ拡散誤差が丸められることになる。 The correction unit 44 receives the determination results of the sign determination unit 42 and the bit determination unit 41, and based on these determination results, the error Ex, y is a negative value and the value of the decimal part is included in the diffusion error. If it exists, a correction process is performed in which the decimal part of the diffusion error is rounded down and 1 is added, and in other cases, the decimal part of the diffusion error is rounded down. That is, if there is a decimal value in the diffusion error, the decimal part is rounded down if the diffusion error is positive, and the decimal part is rounded up if it is negative. The diffusion error is rounded down to a smaller value.

例えば、図6(a)に示されるような拡散マトリクスの場合、誤差Ex,y=25とすると、上式(1)より各周辺画素A〜Dの拡散誤差ex+i,y+jは6.25となり、従来のように小数部分を切り捨てるとすると、拡散誤差ex+i,y+jは6となる。すなわち、拡散誤差ex+i,y+jが正の数でありかつ小数部分を含む場合には、小数部分の切り捨て処理により拡散誤差の絶対値(大きさ)が小さくなる方へ丸められることになる。 For example, in the case of a diffusion matrix as shown in FIG. 6A, if the error E x, y = 25, the diffusion error e x + i, y + j of each peripheral pixel A to D is obtained from the above equation (1). 6.25, and if the fractional part is discarded as in the prior art, the diffusion error e x + i, y + j is 6. That is, when the diffusion error e x + i, y + j is a positive number and includes a decimal part, the absolute value (magnitude) of the diffusion error is rounded down to a smaller value by rounding off the decimal part. become.

一方、誤差Ex,y=−25とすると、各周辺画素A〜Dの拡散誤差ex+i,y+jは−6.25となり、従来のように小数部分を切り捨てるとすると、拡散誤差ex+i,y+jは−7となる。すなわち、拡散誤差ex+i,y+jが負の数でありかつ小数部分を含む場合には、小数部分の切り捨て処理により拡散誤差の絶対値が大きくなる方へ丸められることになる。この場合、絶対値が大きくなる方へ丸められた拡散誤差が蓄積されることにより、蓄積された拡散誤差が大きすぎて画質が劣化する虞がある。 On the other hand, if the error E x, y = −25, the diffusion error e x + i, y + j of each of the peripheral pixels A to D becomes −6.25. e x + i, y + j is −7. That is, when the diffusion error e x + i, y + j is a negative number and includes a decimal part, the decimal part is rounded off to increase the absolute value of the diffusion error. In this case, the diffusion error that is rounded toward the larger absolute value is accumulated, so that the accumulated diffusion error is too large and the image quality may be deteriorated.

これに対し、本実施形態では、周辺画素B〜Dに関して、拡散誤差ex+i,y+jが負の数でありかつ小数部分を含む場合には、小数部分の切上げ処理を行うことにより、拡散誤差の絶対値が小さくなる方へ丸められることになる。この場合、拡散誤差の絶対値が大きくなる方へ丸められることがなくなり、蓄積された拡散誤差が大きすぎて画質が劣化することを防止できる。 In contrast, in the present embodiment, with respect to surrounding pixels B to D, the diffusion error e x + i, when y + j comprises is and fractional part a negative number, by performing the rounding up process of fractional part Then, the absolute value of the diffusion error is rounded down. In this case, the absolute value of the diffusion error is not rounded toward the larger value, and it is possible to prevent the accumulated diffusion error from being too large and degrading the image quality.

なお、小数部分の切上げ方法としては、小数部分を切り捨てた後に1を加算する方法と、1を加算した後に小数部分を切り捨てる方法とがあるが、前者の方法が、後者の方法に比べて処理に必要なビット数が少なくなるから、回路規模が小さくなり処理速度が向上するので望ましい。   There are two methods for rounding up the fractional part: a method in which 1 is added after the decimal part is rounded down, and a method in which the decimal part is rounded down after the 1 is added. The former method is processed in comparison with the latter method. This is desirable because the number of bits required for the processing is reduced, so that the circuit scale is reduced and the processing speed is improved.

一方、周辺画素Aに関しては、従来と同様の切り捨て処理を行う。この場合、符号判定部42、ビット判定部43、および補正部44の処理が省略されるので、処理の負荷が増大することがない。また、例え周辺画素Aの拡散誤差の絶対値が大きくなる方へ丸められても、周辺画素B〜Dに該当するときに蓄積される拡散誤差の絶対値は小さくなる方へ丸められているので、画質への影響は小さいと考えられる。実際、本実施形態のような処理を行ったところ、画質への影響は殆ど見られなかった。   On the other hand, with respect to the peripheral pixel A, the same truncation processing as that in the past is performed. In this case, since the processes of the code determination unit 42, the bit determination unit 43, and the correction unit 44 are omitted, the processing load does not increase. Further, even if the absolute value of the diffusion error of the peripheral pixel A is rounded toward the larger value, the absolute value of the diffusion error accumulated when corresponding to the peripheral pixels B to D is rounded to the smaller value. The effect on image quality is considered to be small. Actually, when the processing as in the present embodiment was performed, the influence on the image quality was hardly seen.

次に、拡散誤差が図7に示すようなデータである場合について符号判定部42、ビット判定部43、および補正部44の処理を具体的に説明する。図示のように、拡散誤差の先頭には符号ビットが含まれる。符号ビットが「0」の場合には拡散誤差が正の数であり、「1」の場合には拡散誤差が負の数であることを示している。したがって、この符号ビットを参照することにより、拡散誤差の符号を判定することができる。   Next, the processing of the sign determination unit 42, the bit determination unit 43, and the correction unit 44 will be specifically described in the case where the diffusion error is data as shown in FIG. As shown in the figure, the sign bit is included at the head of the diffusion error. When the sign bit is “0”, the diffusion error is a positive number, and when it is “1”, the diffusion error is a negative number. Therefore, the sign of the diffusion error can be determined by referring to this code bit.

一方、ビットの判定処理は、除算を行うことにより小数部分となったビットの論理和を求める。例えば、4(=22)で除算した場合には下位2ビットが小数部分となり、8(=23)で除算した場合には下位3ビットが小数部分となり、これらのビットの論理和を求めることになる。上記論理和が「1」であれば、小数部分となったビットのうち少なくとも1つのビットが「1」であり、これは小数部分に何らかの数値が存在することを意味している。一方、上記論理和が「0」であれば、小数部分となったビットの全てが「0」であり、これは小数部分に数値が存在しないことを意味している。 On the other hand, in the bit determination process, a logical sum of bits that have become a decimal part is obtained by performing division. For example, when dividing by 4 (= 2 2 ), the lower 2 bits become a decimal part, and when dividing by 8 (= 2 3 ), the lower 3 bits become a decimal part, and the logical sum of these bits is obtained. It will be. If the logical sum is “1”, at least one bit among the bits that become the decimal part is “1”, which means that some numerical value exists in the decimal part. On the other hand, if the logical sum is “0”, all the bits that have become the decimal part are “0”, which means that there is no numerical value in the decimal part.

そして、符号ビットと、上記論理和との論理積を求めることにより、拡散誤差が負の数でありかつ小数部分の数が存在するか否かを判断できる。上記論理積が「1」であれば、拡散誤差が負の数でありかつ小数部分の数が存在するので、上述のように、小数部分の切上げ処理を行う。一方上記論理積が「0」であれば、従来と同様に、小数部分の切捨て処理を行う。   Then, by obtaining the logical product of the sign bit and the logical sum, it is possible to determine whether or not the diffusion error is a negative number and the number of decimal parts is present. If the logical product is “1”, the diffusion error is a negative number and the number of fractional parts exists, and therefore, the rounding process of the fractional part is performed as described above. On the other hand, if the logical product is “0”, the decimal portion is cut off as in the conventional case.

なお、切捨て処理や切上げ処理の代わりに四捨五入処理を行ってもよい。すなわち、拡散誤差の小数部分を参照することにより、最も近い整数に丸めてもよい。例えば、拡散誤差が+6.75であれば+7に、−6.75であれば−7にそれぞれ丸めてもよい。この場合、丸め処理前後での拡散誤差のずれを小さくすることができ、蓄積された拡散誤差が大きくずれることを抑えることができ、画質の劣化を抑えることができる。   A rounding process may be performed instead of the rounding process or the rounding process. That is, it may be rounded to the nearest integer by referring to the decimal part of the diffusion error. For example, if the diffusion error is +6.75, it may be rounded to +7, and if it is −6.75, it may be rounded to -7. In this case, the deviation of the diffusion error before and after the rounding process can be reduced, and the accumulated diffusion error can be suppressed from greatly shifting, and the deterioration of the image quality can be suppressed.

四捨五入処理は、以下のように行えばよい。すなわち、小数点第1位のビットが「1」である場合には、a+0.5≦x<a+1(但しaは整数)となるから、小数部分を切り捨てて1を加算する。一方、その他の場合、すなわち小数点第1位のビットが「0」である場合には、小数部分を切り捨てる。   The rounding process may be performed as follows. That is, when the first decimal place bit is “1”, since a + 0.5 ≦ x <a + 1 (where a is an integer), the decimal part is rounded down and 1 is added. On the other hand, in other cases, that is, when the bit at the first decimal place is “0”, the decimal part is rounded down.

したがって、小数点第1位のビットのみを参照すればよく、他の小数部分や正負の符号を参照する必要がないので、上記実施形態よりも回路構成を省略でき、処理速度を向上することができる。   Therefore, it is only necessary to refer to the first decimal place bit, and it is not necessary to refer to other fractional parts and positive and negative signs. Therefore, the circuit configuration can be omitted and the processing speed can be improved as compared with the above embodiment. .

次に、階調再現処理部28における処理動作の流れを図4および図5に基づいて説明する。図4は、階調再現処理部28における処理動作の流れを示している。まず、注目画素Pに入力画像データが入力されると、量子化処理部30は、拡散誤差格納部33から蓄積された拡散誤差を取得して、入力画像データに加算する(ステップS1)。次に、量子化処理部30は、加算された入力画像データに対して、量子化処理を行って出力画像データとして出力するとともに、出力画像データとの差分を誤差として算出する(ステップS2)。   Next, the flow of the processing operation in the gradation reproduction processing unit 28 will be described with reference to FIGS. FIG. 4 shows the flow of processing operations in the gradation reproduction processing unit 28. First, when input image data is input to the target pixel P, the quantization processing unit 30 acquires the diffusion error accumulated from the diffusion error storage unit 33 and adds it to the input image data (step S1). Next, the quantization processing unit 30 performs a quantization process on the added input image data and outputs it as output image data, and calculates a difference from the output image data as an error (step S2).

次に、拡散誤差演算部31は、複数組の拡散マトリックスの中から1組を選択して拡散係数格納部32から取得することにより、各周辺画素A〜Dの拡散係数を決定する(ステップS3)。次に、拡散誤差演算部31は、拡散誤差の演算を行う(ステップS4)。   Next, the diffusion error calculation unit 31 determines a diffusion coefficient for each of the surrounding pixels A to D by selecting one set from a plurality of sets of diffusion matrices and acquiring it from the diffusion coefficient storage unit 32 (step S3). ). Next, the diffusion error calculator 31 calculates a diffusion error (step S4).

図5は、拡散誤差の演算処理の流れを示している。まず、右隣の周辺画素Aについては、量子化処理部30から取得した誤差に対し簡易演算部40が簡易演算処理を行い(ステップS10)、算出値から小数部分を切り捨てた値を拡散誤差とする(ステップS11)。   FIG. 5 shows the flow of the diffusion error calculation process. First, for the neighboring pixel A on the right side, the simple calculation unit 40 performs simple calculation processing on the error acquired from the quantization processing unit 30 (step S10), and a value obtained by rounding down the decimal part from the calculated value is defined as a diffusion error. (Step S11).

一方、その他の周辺画素B〜Dについては、まず、量子化処理部30から取得した誤差に対し通常演算部41が通常演算処理を行う(ステップS12)。次に、誤差の符号がマイナスであり、かつ小数部分のビットの論理和が「1」である場合には(ステップS13でYESかつステップS14でYES)、ステップS12による算出値から小数部分を切り捨て、「1」を加算した値を拡散誤差とし(ステップS15)、それ以外の場合には、ステップS12による算出値から小数部分を切り捨てた値を拡散誤差とする(ステップS16)。そして、ステップS11・S15・S16により拡散誤差を算出した後、図4に示す元の処理ルーチンに戻る。   On the other hand, for other peripheral pixels B to D, first, the normal calculation unit 41 performs normal calculation processing on the error acquired from the quantization processing unit 30 (step S12). Next, when the sign of the error is negative and the logical sum of the bits of the decimal part is “1” (YES in step S13 and YES in step S14), the decimal part is rounded down from the calculated value in step S12. , "1" is added as the diffusion error (step S15), otherwise, the value obtained by rounding down the fractional part from the calculated value at step S12 is set as the diffusion error (step S16). Then, after calculating the diffusion error in steps S11, S15, and S16, the process returns to the original processing routine shown in FIG.

次に、拡散誤差演算部31は、各周辺画素A〜Dに該当する画素に蓄積された拡散誤差を拡散誤差格納部33から取得し、蓄積された拡散誤差に、ステップS4により算出された拡散誤差を加算し、加算した拡散誤差を拡散誤差格納部33に格納させる(ステップS5)。   Next, the diffusion error calculation unit 31 acquires the diffusion error accumulated in the pixels corresponding to the respective peripheral pixels A to D from the diffusion error storage unit 33, and adds the diffusion error calculated in step S4 to the accumulated diffusion error. The error is added, and the added diffusion error is stored in the diffusion error storage unit 33 (step S5).

そして、以上の処理を全ての画素について行った後(ステップS6)、階調再現処理部28における処理動作を終了する。   Then, after performing the above processing for all the pixels (step S6), the processing operation in the gradation reproduction processing unit 28 is terminated.

なお、上記実施形態では、周辺画素Aの拡散係数は、簡易演算部40にて簡易演算を行い、算出された拡散誤差の小数部分を切り捨てているが、他の周辺画素B〜Dと同様に、拡散誤差が正の値であれば小数部分を切り捨て、負の値であれば小数部分を切り上げる処理に変更してもよい。この場合、図8に示されるように、階調再生処理部28の拡散誤差演算部31における周辺画素Aの演算部は、図1に示される簡易演算部40に、符号判定部42、ビット判定部43、および補正部44が追加された構成となる。   In the above embodiment, the diffusion coefficient of the peripheral pixel A is simply calculated by the simple calculation unit 40, and the decimal part of the calculated diffusion error is rounded down. However, as with the other peripheral pixels B to D, If the diffusion error is a positive value, the decimal part may be rounded down, and if the diffusion error is negative, the process may be changed to round up the decimal part. In this case, as shown in FIG. 8, the calculation unit of the peripheral pixel A in the diffusion error calculation unit 31 of the gradation reproduction processing unit 28 is replaced with the code determination unit 42 and the bit determination in the simple calculation unit 40 shown in FIG. The unit 43 and the correction unit 44 are added.

〔実施の形態2〕
次に、本発明の別の実施形態について、図9および図10に基づいて説明する。本実施形態のデジタルカラー複写機は、図1〜7に示されるデジタルカラー複写機に比べて、階調再生処理部28の拡散誤差演算部31における周辺画素Aの演算部の構成が異なり、その他の構成は同様である。なお、上記実施形態で説明した構成と同様の機能を有する構成には、同一の符号を付して、その説明を省略する。
[Embodiment 2]
Next, another embodiment of the present invention will be described with reference to FIGS. The digital color copying machine of the present embodiment is different from the digital color copying machine shown in FIGS. 1 to 7 in the configuration of the calculation unit of the peripheral pixel A in the diffusion error calculation unit 31 of the gradation reproduction processing unit 28. The configuration of is the same. In addition, the same code | symbol is attached | subjected to the structure which has the function similar to the structure demonstrated in the said embodiment, and the description is abbreviate | omitted.

本実施形態では、階調再生処理部28の拡散誤差演算部31における周辺画素Aの演算部は、図1に示される簡易演算部40を通常演算部41に変更している。すなわち、量子化処理部30から取得した誤差に対し、通常演算を行って拡散誤差を算出し、その小数部分を切り捨てる処理を行っている。この場合、簡易演算部40に比べると、処理負担が増大するが、周辺画素B〜Dの演算部に比べると、符号判定部42、ビット判定部43、および補正部44が省略されるので、回路規模が簡略化されるとともに、処理負担が軽減される。   In the present embodiment, the calculation unit of the peripheral pixel A in the diffusion error calculation unit 31 of the gradation reproduction processing unit 28 is changed from the simple calculation unit 40 shown in FIG. In other words, a normal calculation is performed on the error acquired from the quantization processing unit 30 to calculate a diffusion error, and the decimal part is rounded down. In this case, the processing load increases as compared with the simple calculation unit 40, but the sign determination unit 42, the bit determination unit 43, and the correction unit 44 are omitted as compared with the calculation units of the peripheral pixels B to D. The circuit scale is simplified and the processing burden is reduced.

図10は、本実施形態における周辺画素A〜Dに関する拡散誤差の演算処理の流れを示している。図示のように、まず、量子化処理部30から取得した誤差に対し通常演算処理を行う(ステップS20)。次に、誤差の符号がマイナスであり、小数部分のビットの論理和が「1」であり、かつ注目画素Pの右隣の周辺画素A以外の画素である場合には(ステップS21でYES、ステップS22でYES、かつステップS23でNO)、ステップS20による算出値から「1」を加算し、小数部分を切り捨てた値を拡散誤差とする(ステップS25)。一方、それ以外の場合には、ステップS20による算出値から小数部分を切り捨てた値を拡散誤差とする(ステップS24)。そして、ステップS24・S25により拡散誤差を算出した後、図4に示す元の処理ルーチンに戻る。   FIG. 10 shows the flow of the diffusion error calculation process for the peripheral pixels A to D in this embodiment. As illustrated, first, normal calculation processing is performed on the error acquired from the quantization processing unit 30 (step S20). Next, if the sign of the error is negative, the logical sum of the bits of the decimal part is “1”, and the pixel is other than the peripheral pixel A right next to the target pixel P (YES in step S21) “YES” in step S22 and NO in step S23), “1” is added from the calculated value in step S20, and a value obtained by rounding down the decimal part is defined as a diffusion error (step S25). On the other hand, in other cases, a value obtained by discarding the decimal part from the calculated value in step S20 is set as a diffusion error (step S24). Then, after calculating the diffusion error in steps S24 and S25, the process returns to the original processing routine shown in FIG.

〔実施の形態3〕
次に、本発明のその他の実施形態について、図11に基づいて説明する。図11は、本実施形態におけるプリントシステムの概略構成を示している。図示のように、プリントシステムは、コンピュータ50と該コンピュータに接続されたプリンタ51とを備える構成である。コンピュータ50は、アプリケーション実行部52、プリンタドライバ53、通信ポートドライバ54、および通信ポート55を備える構成である。アプリケーション実行部52にて画像データの印刷指示が実行されると、アプリケーション実行部52は、画像データをプリンタドライバ53に送り出す。プリンタドライバ53は、アプリケーション実行部52から送られた画像データに対して各種処理を施した後、通信ポートドライバ54と、RS232C・LANなどの通信ポート55を介して電子写真方式やインクジェット方式のプリンタ(画像出力装置)51に出力する。
[Embodiment 3]
Next, another embodiment of the present invention will be described with reference to FIG. FIG. 11 shows a schematic configuration of a print system in the present embodiment. As illustrated, the printing system includes a computer 50 and a printer 51 connected to the computer. The computer 50 includes an application execution unit 52, a printer driver 53, a communication port driver 54, and a communication port 55. When an image data print instruction is executed by the application execution unit 52, the application execution unit 52 sends the image data to the printer driver 53. The printer driver 53 performs various processes on the image data sent from the application execution unit 52, and then performs an electrophotographic or inkjet printer via a communication port driver 54 and a communication port 55 such as RS232C / LAN. (Image output device) 51 for output.

本実施形態のプリントシステムは、図1〜7に示されるデジタルカラー複写機に比べると、画像入力装置11がコンピュータ50に対応し、画像出力装置13がプリンタ51に対応する。そして、画像処理装置12の構成のうち、色補正部24、黒生成下色除去部25、および階調再現処理部28がコンピュータ50のプリンタドライバ53に含まれ、その他の構成がプリンタ51に含まれる。なお、プリンタ51は、プリンタ機能の他にコピー機能およびファックス機能を有するデジタル複合機であってもよい。   In the printing system of the present embodiment, the image input device 11 corresponds to the computer 50 and the image output device 13 corresponds to the printer 51 as compared with the digital color copying machine shown in FIGS. Among the configurations of the image processing apparatus 12, the color correction unit 24, the black generation and under color removal unit 25, and the gradation reproduction processing unit 28 are included in the printer driver 53 of the computer 50, and the other configurations are included in the printer 51. It is. The printer 51 may be a digital multi-function peripheral having a copy function and a fax function in addition to the printer function.

本実施形態では、プリンタドライバ53は、色補正部56、階調再現処理部57、およびプリンタ言語翻訳部58を備える構成である。色補正部56は、図2に示される色補正部24および黒生成下色除去部25と同様の処理を行うものである。また、階調再現処理部57は、図2に示される階調再現処理部28と同様の処理を行うものである。また、プリンタ言語翻訳部58は、色補正部56および階調再現処理部57にて画像処理された画像データをページ記述言語(PDL)などのプリンタ言語に翻訳するものである。   In the present embodiment, the printer driver 53 includes a color correction unit 56, a gradation reproduction processing unit 57, and a printer language translation unit 58. The color correction unit 56 performs the same processing as the color correction unit 24 and the black generation and under color removal unit 25 shown in FIG. Further, the gradation reproduction processing unit 57 performs the same processing as the gradation reproduction processing unit 28 shown in FIG. The printer language translation unit 58 translates the image data image-processed by the color correction unit 56 and the gradation reproduction processing unit 57 into a printer language such as a page description language (PDL).

このように、本発明に係る階調再現処理は、コンピュータ50のプリンタドライバ53にて実行することができる。   As described above, the gradation reproduction processing according to the present invention can be executed by the printer driver 53 of the computer 50.

最後に、上記実施形態の画像処理装置12の各ブロック、特に階調再現処理部28は、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   Finally, each block of the image processing apparatus 12 of the above-described embodiment, in particular, the gradation reproduction processing unit 28 may be configured by hardware logic, or may be realized by software using a CPU as follows. .

すなわち、画像処理装置12は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit )、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアである印刷管理装置4の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記印刷管理装置4に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   That is, the image processing apparatus 12 includes a CPU (central processing unit) that executes instructions of a control program for realizing each function, a ROM (read only memory) that stores the program, and a RAM (random access memory) that expands the program. And a storage device (recording medium) such as a memory for storing the program and various data. An object of the present invention is a recording medium on which a program code (execution format program, intermediate code program, source program) of a control program of the print management apparatus 4 which is software for realizing the functions described above is recorded so as to be readable by a computer. This can also be achieved by supplying the print management apparatus 4 and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フレキシブルディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などを用いることができる。   Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a disk system including a magnetic disk such as a flexible disk / hard disk and an optical disk such as a CD-ROM / MO / MD / DVD / CD-R, and an IC card. A card system such as an optical card (including a memory card) or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM can be used.

また、画像処理装置12を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された搬送波あるいはデータ信号列の形態でも実現され得る。   Further, the image processing apparatus 12 may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication. A net or the like is available. Further, the transmission medium constituting the communication network is not particularly limited. For example, even in the case of wired such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL line, infrared rays such as IrDA and remote control, Bluetooth, It can also be used with radio such as 802.11 radio, HDR, mobile phone network, satellite line, and terrestrial digital network. The present invention can also be realized in the form of a carrier wave or a data signal sequence in which the program code is embodied by electronic transmission.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、さらに、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
なお、画像処理装置は、以下のように構成してもよい。
すなわち、画像処理装置は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化手段と、上記量子化により生じる誤差を算出する誤差算出手段と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出手段とを備えており、該拡散誤差算出手段は、次に注目画素となる周辺画素に分配される拡散誤差を簡易に算出する簡易算出手段を備える構成でもよい。
この場合、拡散誤差算出手段が、次に注目画素となる周辺画素、すなわち、注目画素の右隣の画素に分配される拡散誤差を簡易に算出する簡易算出手段を備える構成である。ここで、簡易に算出するとは、上記誤差に対し、各周辺画素に割り当てられた拡散係数を乗算し、かつ上記拡散係数の総和で除算する通常の演算よりも簡易な演算で算出することをいう。これにより、非常に処理が重く、しかもパイプライン化できない右隣の画素の処理を軽くして高速動作を可能にし、中間調処理を高速に実行できる効果を奏する。
さらに、画像処理装置は、上記の構成において、上記拡散誤差算出手段は、上記誤差に対し、各周辺画素に割り当てられた拡散係数を乗算し、かつ上記拡散係数の総和で除算する演算手段と、演算手段の演算値に対して小数部分を丸める小数処理手段とを備えており、上記簡易算出手段は、上記演算手段の演算を、除算と加算との組合せで行う構成でもよい。
この場合、利用できる拡散係数が制限されるけれども、演算に必要な桁数の増加が抑えられるので、回路を簡略化でき、演算処理を迅速に行うことができる効果を奏する。
さらに、画像処理装置は、上記の構成において、上記拡散誤差算出手段は、上記誤差に対し、各周辺画素に割り当てられた拡散係数を乗算し、かつ上記拡散係数の総和で除算する演算手段と、演算手段の演算値に対して小数部分を丸める小数処理手段とを備えており、上記簡易算出手段は、上記小数処理手段の丸め処理を、小数部分を切り捨てる処理により行う構成でもよい。
この場合、単純な丸め処理のみを行うので、次に注目画素となる周辺画素における処理の負荷が増大することを防止する効果を奏する。また、次に注目画素となる周辺画素において単純な丸め処理を行っても、他の周辺画素において適切な丸め処理を行うことにより、各周辺画素の拡散誤差の合計値が注目画素の誤差から大きくずれることを防止でき、画質の劣化を防止する効果を奏する。
また、画像処理装置における画像処理方法は、注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置における画像処理方法において、上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化工程と、上記量子化工程により生じる誤差を算出する誤差算出工程と、上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出工程とを含んでおり、該拡散誤差算出工程は、次に注目画素となる周辺画素に分配される拡散誤差を簡易に算出する簡易算出工程を含んでもよい。
この場合、拡散誤差算出工程が、次に注目画素となる周辺画素、すなわち、注目画素の右隣の画素に分配される拡散誤差を簡易に算出する簡易算出工程を含んでいる。これにより、非常に処理が重く、しかもパイプライン化できない右隣の画素の処理を軽くして高速動作を可能にし、中間調処理を高速に実行できる効果を奏する。
The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims. Further, the present invention can be obtained by appropriately combining technical means disclosed in different embodiments. Embodiments are also included in the technical scope of the present invention.
The image processing apparatus may be configured as follows.
That is, in the image processing apparatus that distributes an error generated between the input density and the output density at the target pixel to the peripheral pixels, the image processing apparatus quantizes the input density with a predetermined threshold to obtain the output density. Means, an error calculating means for calculating an error caused by the quantization, and a diffusion error calculating means for calculating a diffusion error in which the error is distributed to each peripheral pixel. The diffusion error calculating means includes: In addition, a configuration may be provided that includes simple calculation means for simply calculating the diffusion error distributed to the peripheral pixels as the target pixel.
In this case, the diffusion error calculation means includes a simple calculation means that simply calculates the diffusion error distributed to the peripheral pixel that will be the next pixel of interest, that is, the pixel to the right of the target pixel. Here, “simple calculation” means that the error is calculated by a simpler operation than a normal operation of multiplying the diffusion coefficient assigned to each peripheral pixel and dividing by the sum of the diffusion coefficients. . As a result, the processing of the right adjacent pixel which is very heavy and which cannot be pipelined can be lightened to enable high-speed operation, and the halftone processing can be executed at high speed.
Further, the image processing apparatus according to the above configuration, wherein the diffusion error calculation means multiplies the error by a diffusion coefficient assigned to each peripheral pixel, and divides the error by the sum of the diffusion coefficients; A decimal processing means for rounding a decimal part with respect to a calculation value of the calculation means, and the simple calculation means may be configured to perform the calculation of the calculation means by a combination of division and addition.
In this case, although the diffusion coefficient that can be used is limited, an increase in the number of digits required for the operation can be suppressed, so that the circuit can be simplified and the arithmetic processing can be performed quickly.
Further, the image processing apparatus according to the above configuration, wherein the diffusion error calculation means multiplies the error by a diffusion coefficient assigned to each peripheral pixel, and divides the error by the sum of the diffusion coefficients; A decimal processing unit that rounds a decimal part with respect to a calculation value of the calculation unit, and the simple calculation unit may perform a rounding process of the decimal processing unit by a process of rounding down the decimal part.
In this case, since only a simple rounding process is performed, there is an effect of preventing an increase in the processing load on the peripheral pixel which is the next pixel of interest. Also, even if simple rounding is performed on the next peripheral pixel as the target pixel, by performing appropriate rounding on other peripheral pixels, the total diffusion error of each peripheral pixel becomes larger than the error of the target pixel. The shift can be prevented, and the effect of preventing the deterioration of the image quality is achieved.
An image processing method in the image processing apparatus is an image processing method in an image processing apparatus that distributes an error between an input density and an output density at a target pixel to surrounding pixels, and the input density is quantized with a predetermined threshold. A quantization step for calculating the output density, an error calculation step for calculating an error caused by the quantization step, and a diffusion error calculation step for calculating a diffusion error in which the error is distributed to each peripheral pixel. The diffusion error calculation step may include a simple calculation step of simply calculating the diffusion error distributed to the peripheral pixels that will be the next pixel of interest.
In this case, the diffusion error calculation step includes a simple calculation step of simply calculating the diffusion error distributed to the peripheral pixel that will be the next pixel of interest, that is, the pixel adjacent to the right of the target pixel. As a result, the processing of the right adjacent pixel which is very heavy and which cannot be pipelined can be lightened to enable high-speed operation, and the halftone processing can be executed at high speed.

本発明により、次に注目画素となる周辺画素における拡散誤差の算出時間を短縮した画像処理装置が提供される。これにより、デジタルカラー複写機などの画像処理装置において、画像処理に必要な時間の短縮を実現することができる。   According to the present invention, an image processing apparatus is provided in which the calculation time of a diffusion error in a peripheral pixel that is the next pixel of interest is reduced. Thereby, in an image processing apparatus such as a digital color copying machine, it is possible to reduce the time required for image processing.

本発明の一実施形態であるデジタルカラー複写機における階調再現処理部の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of a gradation reproduction processing unit in a digital color copier that is an embodiment of the present invention. FIG. 上記デジタルカラー複写機の概略構成を示すブロック図である。FIG. 2 is a block diagram showing a schematic configuration of the digital color copying machine. 本実施形態にて利用される注目画素とその周辺画素との関係を示す図である。It is a figure which shows the relationship between the attention pixel and its peripheral pixel utilized in this embodiment. 上記階調再現処理部の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the said gradation reproduction process part. 上記階調再現処理部の処理動作にて実行される拡散誤差の演算の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the calculation of the diffusion error performed by the processing operation of the said gradation reproduction process part. 同図(a)(b)は拡散係数の例を示す図である。FIGS. 7A and 7B are diagrams showing examples of diffusion coefficients. 拡散誤差のデータ構造を示す図である。It is a figure which shows the data structure of a diffusion error. 上記階調再現処理部における周辺画素Aに関する構成の変更例を示すブロック図である。It is a block diagram which shows the example of a change of the structure regarding the surrounding pixel A in the said gradation reproduction process part. 本発明の別の実施形態であるデジタルカラー複写機における階調再現処理部の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the gradation reproduction process part in the digital color copying machine which is another embodiment of this invention. 上記階調再現処理部の処理動作にて実行される拡散誤差の演算の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the calculation of the diffusion error performed by the processing operation of the said gradation reproduction process part. 本発明の他の実施形態であるプリントシステムの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the printing system which is other embodiment of this invention.

符号の説明Explanation of symbols

10 デジタルカラー複写機(画像形成装置)
12 画像処理装置
30 量子化処理部(量子化手段、誤差算出手段)
31 拡散誤差演算部(拡散誤差算出手段)
40 簡易演算部(簡易算出手段、演算手段、小数処理手段)
41 通常演算部(演算手段)
42 補正部(小数処理手段)
50 コンピュータ
53 プリンタドライバ(画像処理装置)
P 注目画素
A〜D 周辺画素
10 Digital color copier (image forming device)
12 Image processing apparatus 30 Quantization processing unit (quantization means, error calculation means)
31 Diffusion error calculation unit (Diffusion error calculation means)
40 Simple calculation unit (simple calculation means, calculation means, decimal processing means)
41 Normal calculation unit (calculation means)
42 Correction unit (decimal processing means)
50 Computer 53 Printer driver (image processing device)
P Target pixel A to D Peripheral pixel

Claims (7)

注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置において、
上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化手段と、
上記量子化により生じる誤差を算出する誤差算出手段と、
上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出手段とを備えており、
該拡散誤差算出手段は、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、
上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われることを特徴とする画像処理装置。
In an image processing apparatus that distributes an error occurring between an input density and an output density at a target pixel to surrounding pixels,
Quantization means for quantizing the input density with a predetermined threshold to obtain the output density;
An error calculating means for calculating an error caused by the quantization;
A diffusion error calculating means for calculating a diffusion error in which the error is distributed to each peripheral pixel;
The diffusion error calculation means truncates the decimal part of the diffusion error distributed to the peripheral pixel that is the next target pixel, while the absolute value of the diffusion error is reduced to the decimal part of the diffusion error distributed to the other peripheral pixels. It is rounded to the smaller one ,
Rounding the fractional portion of the diffusion error to the smaller absolute value of the diffusion error means that if the diffusion error is a positive value, the fractional portion of the diffusion error is truncated, while the diffusion error is represented by a complement. An image processing apparatus, wherein a negative value is performed by rounding up a decimal part of the diffusion error .
注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置において、
上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化手段と、
上記量子化により生じる誤差を算出する誤差算出手段と、
上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出手段とを備えており、
上記拡散誤差算出手段は、上記拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理手段を備えており、
該小数処理手段は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げることを特徴とする画像処理装置。
In an image processing apparatus that distributes an error occurring between an input density and an output density at a target pixel to surrounding pixels,
Quantization means for quantizing the input density with a predetermined threshold to obtain the output density;
An error calculating means for calculating an error caused by the quantization;
A diffusion error calculating means for calculating a diffusion error in which the error is distributed to each peripheral pixel;
The diffusion error calculation means includes a decimal processing means for rounding the decimal part of the diffusion error to the smaller absolute value of the diffusion error ,
The decimal processing means truncates the decimal part of the diffusion error if the diffusion error is a positive value, and rounds up the decimal part of the diffusion error if the diffusion error is a negative value represented by a complement. An image processing apparatus.
請求項1または2に記載の画像処理装置を一体に備えることを特徴とする画像形成装置。   An image forming apparatus comprising the image processing apparatus according to claim 1 or 2 integrally. 注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置の画像処理方法において、
上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化工程と、
上記量子化工程により生じる誤差を算出する誤差算出工程と、
上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出工程とを含んでおり、
該拡散誤差算出工程は、次に注目画素となる周辺画素に分配される拡散誤差の小数部分を切り捨てる一方、他の周辺画素に分配される拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸めており、
上記拡散誤差の絶対値が小さくなる方に上記拡散誤差の小数部分を丸めることは、上記拡散誤差が正の値であれば上記拡散誤差の小数部分が切り捨てられる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分が切り上げられることによって行われることを特徴とする画像処理方法。
In an image processing method of an image processing apparatus that distributes an error that occurs between an input density and an output density in a pixel of interest to peripheral pixels,
A quantization step of quantizing the input density with a predetermined threshold to obtain the output density;
An error calculation step of calculating an error caused by the quantization step;
A diffusion error calculation step of calculating a diffusion error in which the error is distributed to each peripheral pixel,
In the diffusion error calculation step, the decimal part of the diffusion error distributed to the peripheral pixel that is the next pixel of interest is discarded, while the decimal part of the diffusion error distributed to the other peripheral pixels is reduced to the absolute value of the diffusion error. It is rounded to the smaller one ,
Rounding the fractional portion of the diffusion error to the smaller absolute value of the diffusion error means that if the diffusion error is a positive value, the fractional portion of the diffusion error is truncated, while the diffusion error is represented by a complement. An image processing method characterized by being performed by rounding up a decimal part of the diffusion error if the negative value is a negative value .
注目画素における入力濃度と出力濃度との間で生じる誤差を周辺画素に分配する画像処理装置の画像処理方法において、
上記入力濃度を所定の閾値で量子化して上記出力濃度とする量子化工程と、
上記量子化により生じる誤差を算出する誤差算出工程と、
上記誤差が各周辺画素に分配される拡散誤差を算出する拡散誤差算出工程とを含んでおり、
上記拡散誤差算出工程は、上記拡散誤差の小数部分を、該拡散誤差の絶対値が小さくなる方に丸める小数処理工程を含んでおり、
該小数処理工程は、上記拡散誤差が正の値であれば上記拡散誤差の小数部分を切り捨てる一方、上記拡散誤差が補数で表された負の値であれば上記拡散誤差の小数部分を切り上げることを特徴とする画像処理方法。
In an image processing method of an image processing apparatus that distributes an error that occurs between an input density and an output density in a pixel of interest to peripheral pixels,
A quantization step of quantizing the input density with a predetermined threshold to obtain the output density;
An error calculating step of calculating an error caused by the quantization;
A diffusion error calculation step of calculating a diffusion error in which the error is distributed to each peripheral pixel,
It said diffusion error calculation step, the fractional part of the diffusion errors, which Nde including fractional step rounding towards the absolute value of the diffused error is small,
The decimal processing step rounds down the fractional portion of the diffusion error if the diffusion error is a positive value, and rounds up the fractional portion of the diffusion error if the diffusion error is a negative value represented by a complement. An image processing method characterized by the above.
請求項1または2の画像処理装置を動作させるための画像処理プログラムであって、コンピュータを上記画像処理装置の各手段として機能させるための画像処理プログラム。   An image processing program for operating the image processing apparatus according to claim 1 or 2 for causing a computer to function as each unit of the image processing apparatus. 請求項6に記載の画像処理プログラムが記録されたコンピュータ読取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 6 is recorded.
JP2003300497A 2003-08-25 2003-08-25 Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program Expired - Fee Related JP4139752B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003300497A JP4139752B2 (en) 2003-08-25 2003-08-25 Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003300497A JP4139752B2 (en) 2003-08-25 2003-08-25 Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2005072984A JP2005072984A (en) 2005-03-17
JP4139752B2 true JP4139752B2 (en) 2008-08-27

Family

ID=34405413

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003300497A Expired - Fee Related JP4139752B2 (en) 2003-08-25 2003-08-25 Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4139752B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4906784B2 (en) * 2008-05-27 2012-03-28 シャープ株式会社 Error diffusion processing apparatus and error diffusion processing method

Also Published As

Publication number Publication date
JP2005072984A (en) 2005-03-17

Similar Documents

Publication Publication Date Title
US8259357B2 (en) Image processing apparatus, image forming apparatus, image processing method, and computer readable recording medium
JP2500837B2 (en) Pixel value quantization method
JP4173154B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP4105704B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium
JP2012186711A (en) Color processing apparatus and program
JP5095667B2 (en) Output instruction apparatus, image forming system, output instruction method, control program, and recording medium therefor
JP4342560B2 (en) Image processing method, image processing apparatus, computer program, and recording medium
JP4596964B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP2010278933A (en) Image processing device, image forming device, image processing method, program and recording medium
JP4139752B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program
JP2013074309A (en) Image processing apparatus, image forming apparatus, image processing method, computer program and recording medium
JP2008306400A (en) Image processing method, image processing device, image forming apparatus, computer program, and record medium
JP3933941B2 (en) Image processing method, image processing apparatus, and image forming apparatus
JP2005072635A (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium stored with the image processing program
JP2014143512A (en) Image processing device and image processing method
JP4499685B2 (en) Image processing apparatus, image forming apparatus including the same, image processing method, image processing program, and recording medium
JP4266004B2 (en) Image processing method, image processing apparatus, image forming apparatus, image processing program, and recording medium recording image processing program
JP4991782B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2002262084A (en) Image processing method, image processor, image forming device, image processing program and computer readable recording medium
JP2005057598A (en) Color image forming device and color image processor
JP4560357B2 (en) Image processing method, image processing apparatus, image forming apparatus including the same, program, and recording medium
JP3206031B2 (en) Color image forming equipment
JP4118823B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
US20050122546A1 (en) Image processing mechanism for image enhancement and halftone processing
JP2009171034A (en) Image processor, encoding method, and decoding method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070925

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070925

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080220

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20080403

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080513

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080609

R150 Certificate of patent or registration of utility model

Ref document number: 4139752

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130613

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees