JP5750924B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP5750924B2 JP5750924B2 JP2011028837A JP2011028837A JP5750924B2 JP 5750924 B2 JP5750924 B2 JP 5750924B2 JP 2011028837 A JP2011028837 A JP 2011028837A JP 2011028837 A JP2011028837 A JP 2011028837A JP 5750924 B2 JP5750924 B2 JP 5750924B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- error
- bits
- quantization
- error 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、画像形成装置(複写機、プリンタ、複合機等)等に搭載される入力画像をプリント出力用のデータに処理する画像処理装置に関し、処理過程においてビット拡張が行なわれても、誤差拡散による中間調処理に必要となるメモリ容量の肥大化を抑制することができる画像処理装置に関する。 The present invention relates to an image processing apparatus that processes an input image mounted on an image forming apparatus (such as a copying machine, a printer, or a multifunction machine) into print output data. Even if bit expansion is performed in the processing process, an error occurs. The present invention relates to an image processing apparatus capable of suppressing an increase in memory capacity required for halftone processing by diffusion.
複写機、プリンタ、複合機等の画像形成装置に求められる画質は、カラー化や多機能化に伴って、年々高くなっている。
高画質化の進展に連れて、処理対象画像をプリント出力用のデータに処理する過程でビット拡張を行う画像処理手法が様々な形で提案され、実施されている。
プリント出力用のデータ処理においては、例えば、図14に示す処理が一般的である。同図に示す処理過程は、スキャナ入力もしくはホスト機からのPDL(ページ記述言語)データ入力が行われ、入力側のデータ処理を経て生成される画像がプリント出力の対象となる。
このプリント出力の対象となるデータは、多くの場合、RGB各8bitで、この画像データに対し、出力処理として、色変換23’、プリンタγ補正24’、中間調処理25’、レンダリング&エンジン出力26’という処理過程を経てプリント出力が行われる。
The image quality required for image forming apparatuses such as copiers, printers, and multifunction machines has been increasing year by year as colorization and multi-functionality increase.
Along with the progress of high image quality, various image processing techniques for performing bit expansion in the process of processing a processing target image into print output data have been proposed and implemented in various forms.
In data processing for print output, for example, the processing shown in FIG. 14 is common. In the processing process shown in FIG. 6, scanner input or PDL (page description language) data input from a host machine is performed, and an image generated through data processing on the input side is a target of print output.
In many cases, the data to be printed out is 8 bits for each of RGB, and
図14の例では、プリンタγ補正24’で8bitから10bitへ拡張され、その下流の中間調処理25’では内部処理(後記図5、参照)では12bitを必要とし、中間生成物を格納するメモリを肥大化させることに繋がって、コスト増を招く結果となる。
こうしたメモリの肥大化に対し、メモリ容量を削減する目的で提案された従来技術として、特許文献1(特開2004−096709号公報)を挙げることができる。
特許文献1には、誤差拡散処理の際の演算誤差の影響を低減しつつ、必要となるバッファメモリの容量を削減する目的で、発生した量子化誤差の少数部分を次の入力画像にビット結合させることで、量子化誤差の少数部分をバッファメモリに保持することを不要にすることが記載されている。
In the example of FIG. 14, the
Patent Document 1 (Japanese Patent Laid-Open No. 2004-096709) can be cited as a conventional technique proposed for the purpose of reducing the memory capacity in response to such an increase in memory.
Japanese Patent Application Laid-Open No. 2004-133867 discloses that a small part of a generated quantization error is bit-coupled to the next input image for the purpose of reducing the required buffer memory capacity while reducing the influence of calculation errors during error diffusion processing. By doing so, it is described that it becomes unnecessary to hold a small part of the quantization error in the buffer memory.
しかし、上述の従来例におけるバッファメモリの容量の削減は、量子化誤差の上位ビットのみを対象に誤差拡散を行い、下位ビットを対象外としているので、画質を低下させるという問題が生じる。
本発明は、プリント出力用のデータ処理過程におけるビット拡張が招く、中間調処理の誤差拡散に必要となるバッファのメモリ容量の肥大化を抑制すべく提案された上述の従来技術において生じる問題に鑑みてなされたもので、その目的は、下位ビットを切り捨てずに量子化処理に反映させることで高画質を保つことと、バッファのメモリ容量の肥大化を抑制することを両立させることにある。
However, the reduction in the capacity of the buffer memory in the above-described conventional example causes a problem of reducing the image quality because error diffusion is performed only on the upper bits of the quantization error and the lower bits are excluded.
The present invention takes into account the problems arising in the above-described conventional technique proposed to suppress the increase in the memory capacity of the buffer required for error diffusion in halftone processing, which is caused by bit expansion in the data processing process for print output. The purpose of this is to achieve both maintaining high image quality by suppressing the lower bits and reflecting them in the quantization process and suppressing enlargement of the memory capacity of the buffer.
本発明は、多値データの画素で構成する画像における処理対象画素の多値データに対して、周辺画素で発生し当該処理対象画素へ拡散された誤差データを付加した上で、閾値との比較を行い、少値データを出力する量子化手段と、前記量子化手段によって量子化された少値データと元の多値データを比較することで、量子化による誤差を算出する量子化誤差算出手段と、前記量子化誤差算出手段によって算出された誤差を拡散させるための重みを、複数の対象周辺画素に付与する重み付与手段と、現行ラインの量子化誤差拡散処理の際、前記重み付与手段によって付与された重みに従い拡散される誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された誤差データに加算する誤差加算手段と、前記誤差加算手段によって計算された誤差データを、処理対象画素の前記量子化手段への入力データに付加するために、処理順となる画素配列に従って保存するバッファとを有する画像処理装置であって、前記誤差加算手段によって計算された次ラインの誤差データを上位ビットと下位ビットに分離するデータ分離手段と、現行ラインの量子化誤差拡散処理の際、前記データ分離手段で分離された下位ビットの誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された次ラインの下位ビットの誤差データに加算し、桁上げ信号を出力する下位ビット誤差累算手段と、前記データ分離手段で分離された上位ビットの誤差データに前記下位ビット誤差累算手段の出力する桁上げ信号を加算する上位ビット誤差データ算出手段と、前記バッファに設けた、前記上位ビット誤差データ算出手段によって算出された上位ビットの誤差データを保存する次ライン誤差データ保存部と、前記次ライン誤差データ保存部に保存された誤差データを現行ラインの量子化誤差拡散処理に適用する際に、元のビット数に合わせるためのレフトシフタを備え、前記データ分離手段、前記次ライン誤差データ保存部及び前記誤差加算手段を、次の関係式、即ち、前記データ分離手段で分離する上位ビット数≦前記次ライン誤差データ保存部で保存する誤差データのビット数<前記データ分離手段で分離される誤差データのビット数に基づいて構成することを特徴とする。
The present invention adds the error data generated in the surrounding pixels and diffused to the processing target pixel to the multi-value data of the processing target pixel in the image composed of pixels of the multi-value data, and then compares it with the threshold value. Quantization means for outputting small value data, and a quantization error calculation means for calculating an error due to quantization by comparing the small value data quantized by the quantization means with the original multivalue data And weighting means for giving a weight for diffusing the error calculated by the quantization error calculating means to a plurality of target peripheral pixels, and the weighting means at the time of quantization error diffusion processing of the current line the error data is diffused in accordance granted weighting, for each pixel, and error addition means for adding the error data accumulated until a quantization error diffusion processing on the current line, depending on the error addition means In order to add the calculated error data to the input data to the quantization means of the pixel to be processed, the image processing apparatus includes a buffer that stores the pixel data according to the pixel arrangement in the processing order. Data separation means for separating the calculated error data of the next line into upper bits and lower bits, and error data of the lower bits separated by the data separation means at the time of quantization error diffusion processing of the current line for each pixel Are added to the error data of the lower bit of the next line accumulated up to the quantization error diffusion processing of the current line, and the lower bit error accumulation means for outputting a carry signal, and the upper bit separated by the data separation means Upper bit error data calculating means for adding a carry signal output from the lower bit error accumulating means to bit error data, and provided in the buffer The upper bit error data calculated and the next line error data storage unit for storing the error data of the upper bits calculated by means quantization error diffusion process of the error data stored in the next line error data storing unit current line When applying to the above, a left shifter for adjusting to the original number of bits is provided , and the data separating unit, the next line error data storage unit, and the error adding unit are separated by the following relational expression, that is, the data separating unit. The number of higher order bits ≦ the number of bits of error data stored in the next line error data storage unit <the number of bits of error data separated by the data separation means .
本発明によれば、プリント出力用のデータ処理過程におけるビット拡張が招く、中間調処理の誤差拡散に必要となるバッファのメモリ容量の肥大化を抑制するとともに、量子化誤差の拡散の対象に下位ビットも含めることで階調性を失わず、高画質を保つことができる。 According to the present invention, it is possible to suppress an increase in the memory capacity of a buffer required for error diffusion in halftone processing, which is caused by bit expansion in a data processing process for print output, and to reduce the quantization error diffusion target. By including bits, it is possible to maintain high image quality without losing gradation.
以下、本発明に係る画像処理装置の実施形態について、添付図を参照して説明する。
本発明に係る画像処理装置の実施形態として、以下には、複合機(MFP)を例にする。
本実施形態のMFPは、スキャナ入力もしくはホスト機からの印刷データの入力が行われ、入力側のデータ処理を経て生成される画像データをもとに、印刷要求に指示される出力条件に従いプリント出力用のデータ処理を行う。
このプリント出力用のデータ処理の過程で行う中間調処理では、入力多値データ(ここでは10bit)の画素で構成する画像に対し量子化によって少値データ(ここでは2bit)に処理され、出力に用いられる。この量子化で個々の画素に生じる誤差は、出力画像全体としての画質が保たれるように、周辺画素に拡散される。
Embodiments of an image processing apparatus according to the present invention will be described below with reference to the accompanying drawings.
As an embodiment of the image processing apparatus according to the present invention, a multifunction peripheral (MFP) will be described below as an example.
The MFP according to the present embodiment receives a scanner input or print data from a host machine, and prints out according to output conditions instructed by a print request based on image data generated through data processing on the input side. Data processing is performed.
In halftone processing performed in the process of data processing for print output, an image composed of pixels of input multi-value data (here 10 bits) is processed into low-value data (here 2 bits) by quantization and output. Used. An error generated in each pixel by this quantization is diffused to peripheral pixels so that the image quality of the entire output image is maintained.
本発明では、誤差拡散の処理に使用するメモリ容量の肥大化を抑制するために、拡散する誤差データの下位ビットを分離して後続する画素の量子化処理に反映させる方法を採用する点が本発明の要旨である。
ただ、中間調処理として行う誤差拡散を伴う量子化処理そのものは、MFPにおいても既存の技術である。よって、先ず、本実施形態が基礎を置くMFPの構成の概要について、図1及び図2を参照して説明する。
図1は、本発明の実施形態としてのMFPの構成の概要を示す図である。
また、図2は、画像データの処理機能を有するコントローラの下に構成されるMFP(図1)の制御システムの概要を示すブロック図である。
In the present invention, in order to suppress the enlargement of the memory capacity used for error diffusion processing, a method of separating the lower bits of the error data to be diffused and reflecting it in the quantization processing of the subsequent pixels is adopted. This is the gist of the invention.
However, the quantization process with error diffusion performed as a halftone process is an existing technology in the MFP. Therefore, first, an outline of the configuration of the MFP on which the present embodiment is based will be described with reference to FIGS. 1 and 2.
FIG. 1 is a diagram showing an outline of the configuration of an MFP as an embodiment of the present invention.
FIG. 2 is a block diagram showing an outline of the control system of the MFP (FIG. 1) configured under the controller having the image data processing function.
図1に示すように、MFP1は、コントローラボード2b、スキャナユニット3、プロッタユニット4、操作部5の各ユニットを有する。
また、ホスト7は、印刷要求等を発行するPC(personal computer)等の外部機であり、通信手段を介してコントローラボード2bと接続される。
スキャナユニット3は、原稿面を主・副2次元走査で読み取って、走査ラインに従った配列となる画素の光量を対応する電気信号に変換し、コントローラボード2bへ出力する。スキャナユニット3には、自動原稿送り装置(ADF)を備え、複数枚の原稿を自動で読み取る機能を持たせてもよい。また、原稿画像の電気信号への変換方式は、CCD(Charge Coupled Devices)方式、CIS(Contact Image Sensor)方式のどちらでもよい。
As shown in FIG. 1, the
The
The
プロッタユニット4は、スキャナユニット3で読み取った画像やホスト7等から入力した画像データを後述するプリント出力用データの処理を通してカラー構成色であるCMYK(+α)データに変換した後、このデータを用いて、記録媒体(用紙)へ印刷し、用紙出力を行う。印字方式は、インクジェット方式、電子写真方式のどちらでもよい。
操作部5は、キー等の入力手段及び表示器等を備え、ユーザーによる動作モードの設定等の動作条件の設定や指令の入力を受け付け、また、ユーザーへの機器のステータスの通知や入力用画面等の表示を行う。
コントローラボード2bは、後記図2に示すコントローラ2を構成する要素を搭載し、コピー処理・プリント処理などの制御を行うユニットである。コピーではスキャナユニット3より入力されたRGB多値画像をプロッタユニット4で出力可能なフォーマットに変換する。プリント出力の際に、ページ順序を入れ替えたり、画像を蓄積したり、画像編集をしたりなど付加的な機能を実現する。なお、プリント出力用の画像データの処理、特に本発明を特徴付ける中間調処理の実施形態については、後記で詳細に説明する。
The
The
The
図2に示す制御システムは、画像データの処理機能を有するコントローラ2の下に構成され、スキャナユニット3、プロッタユニット4、操作部5の各ユニットがコントローラ2の制御下で、それぞれスキャナエンジン制御32、プリンタエンジン制御42、操作部I/F52を介して動作する。
ここでは、コントローラ2が有する画像データの処理機能として、プリント出力用の画像データ処理が要旨となるので、コピー要求時及びホスト7からの印刷要求時の画像データの処理を主に、その処理フローに係る要素のみ図示しているので、同図示にもとづいて説明をする。
The control system shown in FIG. 2 is configured under the
Here, the image data processing function of the
スキャナ画像入力部21は、スキャナユニット3より入力されたRGB多値データを取り込む。画像信号をアナログ信号で受信した場合は、デジタルデータに変換する。画像の光電変換素子間のばらつき補正や、当該素子の物理的な位置の違い、照明の変動等に対する補正を行う。
スキャナ画像処理部22は、スキャナ特性を打ち消すような処理を施し、標準RGBのデータ形式に変換する。
色変換23は、スキャナ画像処理部から入力されるRGB多値データをCMYK多値データに変換する。
γ変換24は、プリンタエンジン(プロッタ)の出力特性の非線形性による画質の劣化を打ち消すために、画像の濃度特性を補正する。後述する実施形態におけるように、γ変換24への入力ビット数よりも、γ変換24からの出力ビット数を大きくすると(例:8bit⇒10bit)高画質化につながる場合がある(後記、図3及び4の説明、参照)。
The scanner
The scanner image processing unit 22 performs processing for canceling the scanner characteristics and converts the data into a standard RGB data format.
The
The
中間調処理25は、色変換23で変換されたCMYK多値データに対するγ変換24で、例えば10bitの多値データとされ、その入力を受け、量子化によって、プロッタユニット4で出力に用いる2〜8bit程度の少値データに変換する。中間調処理25は、本発明に特有の処理によるものであり、後記で詳細に説明する。
プリンタ画像出力部26は、プロッタユニット4の仕様に合わせた順序・タイミングで中間調処理25の処理を受けた画像データをプロッタユニット4に送信する。
ホストI/F72は、PC等のホスト7などで発行される印刷要求を受信し、ジョブを管理するメモリ(不図示)へ格納する。
プリント画像処理27は、印刷要求として受信したPDL(ページ記述言語)データを解析し、RGB多値データに変換する。なお、色変換23以降のプリント出力用の画像データの処理は、先に述べたスキャナ入力した画像データにおけると同様に処理される。
CPU20は、処理を要求してMFPに入力される各種のジョブを管理し、コントローラ2内の制御要素全体の動作を制御する。
The
The printer
The host I /
The
The
ところで、上記コントローラ2は、CPU20、CPU20が駆動するプログラム(ソフトウェア)を格納するROM(不図示)、プログラムを動作させるときのワークメモリとして使用するRAM(不図示)等のハードウェアを要素として構成するコンピュータによって構成することができる。
コンピュータによってコントローラ2を構成する場合、例えば、プリント出力用の画像データを処理する場合、この処理を実行する上記各処理部等として機能させるためのプログラムをROMに記録、搭載し、このプログラムを当該コンピュータにより駆動することにより、これらの処理部等を実現する手段とする。
なお、プログラムを記録する媒体としては、ROMに限らず、HDD(ハードディスク)、CD−ROM,MO(Magneto Optical Disk)等のディスク型を含む各種記憶媒体を用いることができる。
By the way, the
When the
The medium for recording the program is not limited to ROM, and various storage media including disk types such as HDD (hard disk), CD-ROM, and MO (Magneto Optical Disk) can be used.
“ビット数の拡張”
プリント出力用のデータ処理では、画質の劣化を招かないようにデータを保存する必要があり、そのためにビット数の拡張を必要とする場合がある。
γ変換を例に引くと、γ変換では、入力された濃度情報に対して、非線形なテーブルを用いて変換を行うことで、エンジンの出力特性の非線形性起因による画質の劣化を打ち消す処理を行う。
図3はγ変換の変換特性を説明する図である。同図に例示するγ変換特性は、入力8bit、出力8bit(最大値255)の変換を行う場合であり、γ特性の非線形性が強いと、拡大図に示すように入力の階調性が失われる原因となる。つまり、それぞれ異なる入力値に対して、出力値が同一となってしまい(拡大図の連なる3点が同一出力値である)、表現できる濃度の数が縮小する結果となる。
“Extended number of bits”
In the data processing for print output, it is necessary to store data so as not to cause deterioration of image quality, and therefore, it may be necessary to extend the number of bits.
Taking γ conversion as an example, in γ conversion, input density information is converted using a non-linear table, thereby performing processing to counteract deterioration in image quality due to non-linearity in engine output characteristics. .
FIG. 3 is a diagram for explaining the conversion characteristics of γ conversion. The γ conversion characteristic illustrated in the figure is a case where input 8 bits and output 8 bits (maximum value 255) are converted. If the nonlinearity of the γ characteristic is strong, the gradation of the input is lost as shown in the enlarged view. It becomes cause. That is, the output value becomes the same for each different input value (three points in the enlarged view are the same output value), resulting in a reduction in the number of densities that can be expressed.
そこで、出力ビット数を拡張する。
図4は、図3における出力ビット数を、より拡張したときのγ変換の変換特性を説明する図である。同図では、入力8bitに対して、出力10bit(最大値1023)に拡張した状態を示している。出力のビット数を拡張することで、強い非線形性が存在しても、階調性の低下が抑えられる。つまり、それぞれ異なる入力値に対して、出力値がそれぞれ異なり(拡大図の連なる3点の出力値が滑らかに変化する)、表現できる濃度の数が拡大する結果となる。
このように、より高画質を求める場合には、γ変換などのテーブル処理において、出力ビットの拡張を行うことで、特性データが保存され、画質の劣化を防ぐことが可能になる。
ここでは、γ変換において出力ビットの拡張を行った場合を示しているが、さらに上流画像処理においてビット数を拡張することも考えられ、その場合においても、後述する中間調処理において、処理の対象となる画像データのビット数が大きくなる。
Therefore, the number of output bits is expanded.
FIG. 4 is a diagram for explaining the conversion characteristics of γ conversion when the number of output bits in FIG. 3 is further expanded. In the figure, a state in which the input is 8 bits and the output is 10 bits (maximum value 1023) is shown. By expanding the number of output bits, a reduction in gradation can be suppressed even if strong nonlinearity exists. That is, for each different input value, the output value is different (the output values at three points in the enlarged view change smoothly), resulting in an increase in the number of densities that can be expressed.
In this way, when higher image quality is desired, characteristic data is saved by extending the output bits in table processing such as γ conversion, and deterioration of image quality can be prevented.
Here, the case where the output bit is expanded in the γ conversion is shown, but it is also conceivable that the number of bits is further expanded in the upstream image processing. The number of bits of the image data becomes larger.
[中間調処理]
本発明が要旨とする、処理対象画像の多値データをプリント出力用の少値データへ量子化する、即ち、プロッタユニット4で用いる少値データにより中間調を表現するデータへ変換する中間調処理について、詳細に説明する。
ここでは、中間調処理において、量子化の過程で発生する誤差を周辺画素へ拡散し、量子化処理の対象画素に拡散した誤差を付加する誤差拡散法を用いて、量子化誤差の影響を緩和する方法を採用する。
図5は、誤差拡散を伴う中間調処理系の基本構成を示す図である。
同図に示すように、中間調処理系は、加算251、量子化252、逆量子化253、加算254、重み付け255、誤差保存・出力256の各要素を有する。
[Halftone processing]
A halftone process for quantizing multivalued data of an image to be processed into low-value data for print output, that is, converting into multi-level data represented by low-value data used in the
Here, in halftone processing, the error caused by quantization is diffused to surrounding pixels, and the error diffusion method that adds the diffused error to the target pixel for quantization processing is used to mitigate the effects of quantization errors. Adopt the method to do.
FIG. 5 is a diagram showing a basic configuration of a halftone processing system with error diffusion.
As shown in the figure, the halftone processing system includes each element of
ここでは、γ変換24を経て10bitとした画像データの画素を配列順に従い画素ごとに処理する。また、入力10bitを量子化によって2bitに少値し、出力するが、その際、量子化誤差を拡散する。
画像データが入力されると、加算251は、処理対象画素のデータ値に当該画素の周辺画素で発生した誤差(誤差の算出方法等は後述)を加算する。加算後のデータは、12bitのデータとなる。
次に、量子化252は、加算251によって周辺画素で発生した誤差を付加した入力データに対し量子化処理を行う。この量子化処理は、(出力階調数−1)だけの数の閾値を持ち、閾値との大小比較により出力データを決定する。
図6は、12bitデータ⇒2bitデータを例とする量子化(図5、参照)の入力と出力の関係を示す表である。同図に示す例では、3段階の閾値処理により12bitデータを4値(2bit)のデータとして出力する。
量子化252は、量子化処理の結果をプリント出力用のデータ処理過程の次の処理部(図2の例では、プリンタ画像出力部26)に出力する。
Here, the pixels of the image data that have been converted to 10 bits through the
When the image data is input, the
Next, the
FIG. 6 is a table showing the relationship between the input and output of quantization (see FIG. 5) taking 12 bit data → 2 bit data as an example. In the example shown in the figure, 12-bit data is output as 4-level (2-bit) data by three-stage threshold processing.
The
中間調処理25の内部処理として、次に、逆量子化253は、量子化252が出力する4値(2bit)のデータに対する逆量子化、即ち、量子化前の12bitデータに戻す処理を行う。
図7は、2bitデータ⇒12bitデータを例とする逆量子化の入力と出力の関係を示す表である。同図に示すように、量子化252の4値(2bit)の出力データに対する逆量子化であるから、逆量子化253の処理の結果として得られる出力は、当然、量子化252への入力データが保存されることはない。
次いで、加算254は、量子化252を行う前の周辺画素で発生した誤差を付加した入力データを+入力とし、他方、逆量子化253の出力データを−入力として、これらのデータの加算をする。この加算によって、量子化誤差を表すデータ(以下単に「誤差データ」という)が得られる。なお、図5の例では、誤差データは12bitで出力される。
Next, as the internal processing of the
FIG. 7 is a table showing the relationship between the input and output of inverse quantization taking 2 bit data => 12 bit data as an example. As shown in the figure, since the inverse quantization is performed on the 4-value (2-bit) output data of the
Next, the
次に、重み付け255は、加算254が出力する、当該処理対象の画素の処理で発生した誤差データを、周辺画素に拡散させる処理を行う。この拡散処理は、未処理の周辺画素それぞれの当該画素(「注目点画素」ともいう)に対する位置に応じて決められた所定の重みを付けて拡散させる。
図8は、重み付けをして行う誤差拡散を説明する模式図である。同図中に矢示される処理の順序、即ちライン方向及び第1のライン,第2のライン,・・・、というラインの並び順に従い、各画素を処理の対象とし、同図に示す例は、現行の量子化処理の対象である注目点画素に対し、処理中の現行ラインにある3個の未処理画素及び次ラインの4個の未処理画素を周辺画素とし、これらの画素へ誤差拡散を行う。付与する重みは、例えば、現行ラインにある3個は、注目点画素に近い方から順に、4/16,2/16,2/16、また、次ラインにある4個は、注目点画素に近い方から順に、4/16,2/16,1/16,1/16とする。なお、付与する重みは、合計で1となるように設定し、このようにすることで、全体として誤差がない階調表現が可能となる。
Next, the
FIG. 8 is a schematic diagram for explaining error diffusion performed by weighting. According to the processing order indicated by arrows in the figure, that is, according to the line direction and the line arrangement order of the first line, the second line,... , With respect to the pixel of interest that is the target of the current quantization process, three unprocessed pixels in the current line being processed and four unprocessed pixels in the next line are set as peripheral pixels, and error diffusion to these pixels I do. For example, three weights on the current line are assigned to 4/16, 2/16, 2/16 in order from the closest to the pixel of interest, and four on the next line are assigned to the pixel of interest. In order from the nearest, 4/16, 2/16, 1/16, and 1/16. Note that the weights to be assigned are set so as to be 1 in total, and by doing so, it is possible to perform gradation expression with no error as a whole.
重み付け255は、上述の手法に従って、予定した周辺画素に対し、予定した重みによって拡散させる誤差データを周辺画素ごとに決め、決めた誤差データは、拡散先の画素が量子化処理の対象になるときに、現行画素に対して行ったと同様に入力画像データに付加される(加算251が行う処理の上記説明、参照)。
このために、誤差データの拡散を受ける各未処理画素に対して、量子化処理のたびに発生し、拡散される誤差データを画素ごとに累算(以下、[重み加算]という)し、量子化処理の対象になるタイミングで累算した誤差データを加算251に出力する処理が必要になる。
For the
For this purpose, each unprocessed pixel that is subjected to diffusion of error data is accumulated every time the quantization process is performed, and the error data that is diffused is accumulated for each pixel (hereinafter referred to as [weight addition]) A process for outputting the error data accumulated at the timing of the conversion processing to the
この処理は、誤差保存・出力256が行う。誤差保存・出力256は、次ラインの全未処理画素に拡散され累積される誤差データを1ライン分保存するために用意されるラインバッファに、現行ラインの処理を行う際に次ラインにおいて拡散先となる画素分(図8の例では4画素分)のバッファを用いて行う重み加算によって得られる誤差データを各画素に対する量子化処理が行われるたびに、1画素ずつ格納する。現行ラインの終了時、ラインバッファに1ライン分格納され、保存されていた誤差データは、次ラインにおける当該画素の量子化処理にタイミングを合わせて出力する。なお、上記重み加算に必要な手段については、後記で図9を参照して、説明する。
This processing is performed by the error storage /
また、誤差保存・出力256は、現行ラインにおいて拡散先となる画素分(図8の例では3画素分)のバッファを用いて、別途、重み加算によって(重み加算に必要な手段は、図9にもとづく後述の説明、参照)誤差データを求め、現行ラインにおける当該画素の量子化処理にタイミングを合わせて出力する。
なお、図5の例では、誤差データを拡散し、後続する画素の量子化処理に反映させるための処理過程では、入力データ+2bitが一般的であり、ここでは、これにならって、12bitでデータ処理を行っている。
このように、重み加算の動作とともに、その結果を格納するバッファ、特にラインバッファのメモリ容量は、1ライン分の各画素について、12bitの誤差データを保存するので、相当大きくなる。これが、後述する本実施形態における中間調処理系を必要とする動機となる。
Further, the error storage /
In the example of FIG. 5, in the process for diffusing the error data and reflecting it in the quantization process of the subsequent pixels, the input data +2 bits is generally used. Processing is in progress.
Thus, along with the weight addition operation, the memory capacity of the buffer for storing the result, particularly the line buffer, becomes considerably large because 12-bit error data is stored for each pixel of one line. This is a motivation that requires a halftone processing system in the present embodiment to be described later.
“重み付け及び誤差保存・出力の回路構成例”
図9は、図5に示した中間調処理系における重み付け及び誤差保存・出力の回路構成例を示す図である。
図9において、重み付け255は、図8に例示した重み付けの方法に従う回路の構成例を示すものである。
即ち、処理中の現行ラインにある拡散先の3個の未処理画素への重みは、注目点画素に近い方から順に、4/16,2/16,2/16とするので、この数値の乗算を行い、また、次ラインにある拡散先の4個は、注目点画素に近い方から順に、4/16,2/16,1/16,1/16の乗算を行う。
"Example circuit configuration for weighting and error storage / output"
FIG. 9 is a diagram showing a circuit configuration example of weighting and error storage / output in the halftone processing system shown in FIG.
In FIG. 9,
In other words, the weights for the three unprocessed pixels at the current line being processed are 4/16, 2/16, and 2/16 in order from the pixel closest to the target pixel. Multiplication is performed, and the four diffusion destinations in the next line are multiplied by 4/16, 2/16, 1/16, and 1/16 in order from the closest point of interest pixel.
誤差保存・出力256は、重み付け255による重み付けの乗算で得られる、各画素に拡散された誤差データを画素ごとにバッファに格納するが、その際、内部の重み加算256iで拡散される誤差データの累算を行う。重み加算256iは、重み加算に必要な手段として、拡散先の画素数分のバッファと累算数分の加算手段を備える。
つまり、図9に示すように、現行ラインへの拡散については、各画素が3回拡散先となるので、3画素分のバッファと2回の累算を行うための加算手段を備え、量子化処理の対象画素の移動に合わせてバッファの値をシフトさせ、各画素が現行ラインの量子化処理における対象画素となるまで、拡散される誤差データの累算を2回行い、この累算で得られる誤差データを入力データに対し付加するために出力する。また、次ラインへの拡散については、各画素が4回拡散先となるので、4画素分のバッファと3回の累算を行うための加算手段を備え、量子化処理の対象画素の移動に合わせてバッファの値をシフトさせ、現行ラインの量子化処理を終えるまで、次ラインの各画素に対し拡散される誤差データの累算を3回行い、この累算で得られる誤差データを一旦ラインバッファに格納し、次ラインにおける当該画素の量子化処理にタイミングを合わせて出力する。
The error storage /
In other words, as shown in FIG. 9, for diffusion to the current line, each pixel becomes the diffusion destination three times, so a buffer for three pixels and an adding means for performing accumulation twice are provided, and quantization is performed. The buffer value is shifted according to the movement of the target pixel of processing, and error data to be diffused is accumulated twice until each pixel becomes the target pixel in the quantization processing of the current line. Output the error data to be added to the input data. Also, for diffusion to the next line, each pixel becomes the diffusion destination four times, so a buffer for four pixels and an adding means for performing accumulation three times are provided to move the target pixel of the quantization process. At the same time, the buffer value is shifted, and the error data diffused for each pixel of the next line is accumulated three times until the quantization process for the current line is completed, and the error data obtained by this accumulation is temporarily stored in the line. The data is stored in the buffer and output in time with the quantization processing of the pixel in the next line.
[ビット分離の採用]
プリント出力用のデータ処理の際、先にγ変換を例に述べたように、ビット数が拡張され、後段で行う中間調処理において、拡散される誤差データの処理を、上述のように、12bitを確保する仕様で行うようにすると、この処理に用いるラインバッファ(1ライン分の各画素の誤差データを保存)等のメモリ容量が肥大化する。
そこで、この実施形態では、誤差拡散の処理に使用するメモリ容量の肥大化を抑制するために、拡散する誤差データの上位ビットと下位ビットを分離し、それぞれに別の処理を適用し、後続する画素の量子化処理に反映させるために用いるラインバッファを上位ビットのビット数に抑える方法を採用する。つまり、ビット分離した下位ビットを切り捨てずに量子化処理に反映させ、高画質を保つことと、バッファのメモリ容量の肥大化を抑制することを両立させることを可能とする処理方法を採用する。
[Adoption of bit separation]
In the data processing for print output, the number of bits is expanded as described above by taking the γ conversion as an example, and in the halftone processing to be performed later, the error data to be diffused is processed as 12 bits as described above. If the specification is made so as to ensure the above, the memory capacity such as a line buffer (stores error data of each pixel for one line) used for this processing will be enlarged.
Therefore, in this embodiment, in order to suppress the enlargement of the memory capacity used for the error diffusion processing, the upper bits and the lower bits of the error data to be diffused are separated, and different processing is applied to each, followed by A method is adopted in which the line buffer used for reflecting the pixel quantization process is limited to the number of upper bits. In other words, a processing method is adopted that allows the lower-order bits that have been bit-separated to be reflected in the quantization process without being cut off, thereby maintaining both high image quality and suppressing the enlargement of the memory capacity of the buffer.
この実施形態で行うビット分離は、上記の処理方法をとったときに、より有効にメモリ容量の肥大化の抑制効果が働く、次ラインの誤差データを保存するラインバッファを用いる系に採用する。よって、現行ラインへの拡散される誤差データの扱いに関しては、上述の既存の処理方法(図5及び図9、参照)を変更しない。
また、次ラインへ拡散する場合、次ラインの各画素に対し拡散された誤差データを重み加算256iで算出し、出力するまでの処理についても、上述の既存の処理方法(図5及び図9、参照)と変わらない。
The bit separation performed in this embodiment is adopted in a system that uses a line buffer that stores error data of the next line, which works more effectively in suppressing the increase in memory capacity when the above processing method is employed. Therefore, regarding the handling of error data diffused to the current line, the above-described existing processing method (see FIGS. 5 and 9) is not changed.
In addition, when diffusing to the next line, the error data diffused for each pixel of the next line is calculated by
図10は、本発明の実施形態に係る誤差拡散を伴う中間調処理系の構成例を示す図である。
図10に示す中間調処理系は、次ラインへの拡散誤差データを処理する系として、ビット分離256s、累算256a、加算256m、誤差保存・出力(2)256b、レフトシフタ256fの各要素を有する。また、現行ラインへの拡散される誤差データを処理する系として、上述の既存の処理(図5及び図9、参照)と同じ処理をする当該系の要素、即ち、誤差保存・出力(1)256rを有するとともに、量子化の対象画素に対して、現行ラインと次ラインへの拡散によって付与される誤差データを加える加算256nを有する。
FIG. 10 is a diagram showing a configuration example of a halftone processing system with error diffusion according to the embodiment of the present invention.
The halftone processing system shown in FIG. 10 has elements of
また、図11は、中間調処理系(図10)の重み付けから次の画素に付加する誤差を出力する過程の回路構成例を示す図である。
同図において、発生する量子化誤差に重み付けをして、周辺画素に拡散させ、拡散先の各画素で誤差の重み加算をする処理系と動作は、過程は図9等を参照して説明したとおりである。なお、図11に示す重み付け255は、次ラインへの拡散誤差データを処理する系の要素としては、重み加算の処理を含む。よって、重み付け255からの出力は、現行ラインの量子化処理の際に、次ラインの画素に拡散する誤差データの重み加算の処理を経て、画素ごとの誤差として確定し、次ラインの量子化処理に引き継ぐための誤差データである。この誤差データが、ビット分離256sの対象になる。
FIG. 11 is a diagram showing a circuit configuration example in the process of outputting an error to be added to the next pixel from the weighting of the halftone processing system (FIG. 10).
In the figure, the processing system and operation for weighting the generated quantization error and diffusing it to the surrounding pixels and adding the error weight to each diffusion destination pixel have been described with reference to FIG. It is as follows. Note that the
以下、拡散する誤差データの上位ビットと下位ビットを分離するビット分離を採用することで、先の拡散誤差データの処理系と異なる処理となる、ビット分離256sから、量子化処理に周辺画素で発生する誤差を反映させる加算256nまでの処理系の構成及び動作を説明する。
ビット分離256sは、前段で次ラインへ拡散される誤差データを画素ごとに累算する重み加算を経て、得られる12bitの誤差データを、ビット分離により上位8bit(符号ビット含む)と下位4bitに分割する。
分離された上位8bitは加算256mに入力され、下位4bitは累算256aに入力される。
Hereinafter, by employing bit separation that separates the upper and lower bits of the error data to be diffused, the processing is different from the processing system of the previous diffusion error data. The configuration and operation of the processing system up to the
The separated upper 8 bits are input to the
累算256aは、バッファと加算手段を持ち、新たな4bitのデータ入力があると、これまでバッファが保持していたデータに入力データを加算する。累算256aの下位4bitのデータ入力の加算によってバッファが、桁上げした場合は、桁上げ信号を発生させて、この信号を加算256mに入力する。
加算256mは、先に分離した上位8bitデータの入力による上位8bitデータに桁上げ信号による+1を加算する。
この累算256aが発生する桁上げ信号の上位8bitデータへの加算は、下位4bitのデータを切り捨てた場合に失われるデータが保存され、保存されるデータを量子化処理に反映させることを可能にする。
The
The addition of the carry signal generated by the
桁上げ信号の上位8bitデータへ加算され、この加算結果は、次ラインの誤差データを保存し、その出力を管理する誤差保存・出力(2)256bのラインバッファに入力される。
ただ、この桁上げ信号の加算結果を受け取るラインバッファのデータに異常が発生する場合がある。これは、上位8bitデータが0x7F(+127)で、桁上げ信号が+1となると、加算結果の0x80(−127)がラインバッファに格納されてしまう場合である。
The result is added to the upper 8 bit data of the carry signal, and the addition result is input to the line buffer of error storage / output (2) 256b which stores error data of the next line and manages its output.
However, an abnormality may occur in the data of the line buffer that receives the addition result of the carry signal. In this case, when the upper 8 bit data is 0x7F (+127) and the carry signal is +1, 0x80 (-127) as the addition result is stored in the line buffer.
これを防ぐために、以下1.〜3.のいずれかの対応をとることにより解決することができる。
1.ビット分離で、分離する際の上位ビットと、ラインバッファのビットを異なるビット数とし、次の関係を満たすようにする。
ビット分離256sで分離する上位ビット数<ラインバッファでのビット数<ビット分離256sで分離されるデータのビット数
図11の実施形態の場合では、ビット分離256sで分離されるデータのビット数は12bitであるから、例えば、ビット分離256sで分離する上位ビット数を7bitとし、ラインバッファのビット数を8bitとすることで、上記関係を満たすことを可能にする。
2.ビット分離256sで分離された上位8bitデータが0x7F(+127)の場合は、桁上げ信号(+1)を無視する機能を、例えば、加算256mに設けるようにして、加算結果の0x80(−127)がラインバッファに格納されることを防ぐことを可能にする。なお、この方法は、簡単に構成し得るメリットがある反面、誤差拡散に制限を掛けることになり、画質の劣化の可能性がある。
3.ビット分離256sで分離された上位8bitデータが0x7F(+127)の場合は、桁上げ信号(+1)を保留し、後続する処理で当該オーバーフロー条件が不成立になったときに保留を解除し、次の画素へ付加する機能を例えば、加算256mに設けるようにして、加算結果の0x80(−127)がラインバッファに格納されることを防ぐことを可能にする。なお、この方法は、上記3.による桁上げ信号を無視する方法に比べと、画質劣化が生じ難い。
In order to prevent this, the following 1. ~ 3. It can be solved by taking any of the following measures.
1. In the bit separation, the upper bits in the separation and the number of bits in the line buffer are set to different numbers so that the following relationship is satisfied.
Number of upper bits separated by
2. When the upper 8 bits data separated by the
3. When the upper 8bit data separated by
誤差保存・出力(2)256bのラインバッファに格納された8bitの誤差データは、次ラインで用いるので、使用するまで保存され、次ラインに量子化処理が移った時に、処理対象の画素に付加されることとなる。このラインバッファに保存された8bitの誤差データを使用するとき、付加する12bitの入力画素とビット数が合わないため、12bitに戻す必要がある。
レフトシフタ256fは、誤差保存・出力(2)256bのラインバッファから出力される8bitの誤差データを12bit化する手段である。
レフトシフタ256fから12bitで出力される誤差データは、量子化処理が移った後、重み加算256rを経て出力される当該画素の現行ラインの画素への拡散誤差データと加算256nで加算され、入力画素に付加するために出力される。
Error storage / output (2) Since the 8-bit error data stored in the 256b line buffer is used in the next line, it is stored until it is used, and is added to the pixel to be processed when the quantization process moves to the next line. Will be. When the 8-bit error data stored in the line buffer is used, the number of bits does not match that of the 12-bit input pixel to be added, so it is necessary to return to 12 bits.
The
The error data output in 12 bits from the
以上の処理により、次ラインの誤差データを保存する誤差保存・出力(2)256bのラインバッファのビット数を削減することが可能となり、ラインバッファ容量の肥大化の抑制につながる。
また、ビット分離により分離された下位4bitの誤差データについても、画素の配列ライン順に加算し、桁上げ信号を上位8bitの誤差データに加える方法で入力画素の量子化処理に反映しているため、階調性を失うことなく、画質を維持することができる。
With the above processing, it is possible to reduce the number of bits in the line buffer of error storage / output (2) 256b that stores error data of the next line, leading to suppression of enlargement of the line buffer capacity.
Also, since the lower 4 bits of error data separated by bit separation is added to the pixel array line order and the carry signal is added to the upper 8 bits of error data, it is reflected in the quantization process of the input pixel. Image quality can be maintained without losing gradation.
ここで、ビット分離からラインバッファにデータを格納する処理過程をより詳細に説明する。なお、ここでは、ラインバッファのデータの異常発生を防止する上記3.に示した防止手段を設けた例について、説明する。
図12は、図11のビット分離からラインバッファにデータを格納する過程の回路構成例の詳細を示す図である。
図12に示すように、ビット分離256sは、入力された誤差データの12bit信号を、符号ビットを除いた上位8bit、下位4bitに分離する。ここで、元の誤差データ自体は符号付きであるため、上位8bitデータは符号付きとなるが、下位4bitに関しては、符号なし4bitデータとして扱われる。
これは、下位4bitが、
[入力データ]−[上位8bitデータを4bitレフトシフトしたデータ]
を示しており、かつ、常に以下の関係が成り立っているからである。
[上位8bitデータを4bitレフトシフトしたデータ]≦[入力データ]
Here, the process of storing data from the bit separation to the line buffer will be described in more detail. In this case, the above-described 3. An example in which the prevention means shown in FIG.
FIG. 12 is a diagram showing details of a circuit configuration example in the process of storing data from the bit separation of FIG. 11 to the line buffer.
As shown in FIG. 12, the
This is the lower 4 bits
[Input data]-[Data obtained by shifting the upper 8bit data by 4bit left]
This is because the following relationship is always established.
[Data obtained by left-shifting the upper 8-bit data by 4 bits] ≤ [Input data]
累算256aは、上記の関係式で求めた下位ビットの入力をビット分離256sから受け、加算256cにて、それまでにバッファ256dに蓄積された下位ビットデータと加算する。
加算256cは、加算結果が0xF(15)を超える場合、桁上げ信号を発生し、発生した桁上げ信号を遅延256gに出力する。なお、遅延256gは後述するオーバーフロー防止機能を実現する手段の1つである。
加算256cの加算結果として得られるデータのうち、桁上げ部分を除いた部分はバッファ256dに格納されて、次の処理に回される。
なお、バッファ256dに格納されたデータは、ラインの切り替えで次ラインのデータを処理する際に、非図示であるが、バッファ256dをリセットすることで、予期しない誤差の拡散を防ぐことが望ましい。
The
When the addition result exceeds 0xF (15), the
Of the data obtained as the addition result of the
Although the data stored in the buffer 256d is not shown when the next line data is processed by line switching, it is desirable to prevent the unexpected error diffusion by resetting the buffer 256d.
ビット分離256sが出力する上位8bit(符号付き)と加算256cが出力する下位4bit信号の加算結果である桁上げ信号を加算する際には、上位8bitデータの値と桁上げ信号の値に基づいて、加算に制限を持たせる(上記オーバーフロー防止策の3.に相当する)。
即ち、上位8bitデータが0x7F(+127)で、かつ、桁上げ信号が+1の場合には、加算256mがオーバーフローし、この結果、異常データ0x80(−127)がラインバッファ256hに格納されてしまう。この動作を防ぐために判定256eが上位8bitデータの値に基づいてオーバーフローの発生を予知し、遅延256gにこれを知らせる。
遅延256gは、オーバーフローの発生の予知を判定256eから受け、遅延信号を出力して、桁上げ信号の加算を1回分遅延させる。ここでは、遅延256gから符号付き2bitの信号を加算256mに出力することで、この機能を実現する。さらに、同一条件を満たす場合には、条件を満たさなくなるまでこの信号を送り、遅延させる。満たさなくなったときに遅延の解除を符号付き2bitの信号によって知らせる。
When adding the carry signal which is the addition result of the upper 8 bits (signed) output from the
That is, when the upper 8 bit data is 0x7F (+127) and the carry signal is +1, the
The
図13は、図12の回路構成における動作例を、画素単位で順次行われるフローのデータ状態にて示す表である。
図13において、1画素目から4画素目の処理は、ビット分離256sへ入力された誤差データ(入力データ)が正の場合を示しており、5画素目から7画素目は入力データが負の場合を示している。
3画素目の加算256cにおける入力下位ビットデータとバッファ256dに蓄積されたデータとの加算で、加算結果が0xFを超えているため、上位ビット0x78に+1の桁上げの加算を行うので、ラインバッファ256hの格納データは0x79となる。
FIG. 13 is a table showing an operation example in the circuit configuration of FIG. 12 in a data state of a flow sequentially performed for each pixel.
In FIG. 13, the processing from the first pixel to the fourth pixel shows a case where the error data (input data) input to the
In the addition of the lower bit data of the input in the
4画素目の加算256cにおける入力下位ビットデータとバッファ256dに蓄積されたデータとの加算でも、同様に桁上げが発生しているが、上位ビットが0x7F(+127)となっているので、オーバーフローを防止するため、桁上げ信号が1サイクル分遅延されている。
6画素目・7画素目で、入力データが負の場合の条件を示しているが、加算256cにおける下位4bitの加算は入力信号の正/負に関わらず同一の処理である。
また、7画素目では、入力上位ビットデータが0x8F(−1)に対して、桁上げが発生しているため、0x00(0)となっているが、この加算はオーバーフローではないため、通常通り桁上げ信号を加算する。
In the addition of the input lower bit data in the
The conditions when the input data is negative at the sixth pixel and the seventh pixel are shown, but the addition of the lower 4 bits in the
In addition, in the seventh pixel, since the carry is generated with respect to the input upper bit data 0x8F (−1), it is 0x00 (0). However, since this addition is not an overflow, it is normal. Add carry signals.
ところで、この実施形態で示した、入力データのビット数、ビット分離での上位ビットと下位ビットのビット数、及びラインバッファのビット数等は、1実施例としての値を示したものである。
そこで、上述の要素で構成する実施形態で本発明の画像処理装置を実施する場合の適用条件について、次に説明する。
まず、以下の関係を満たしていることが適用条件となる。即ち、
ビット分離256sで分離する上位ビット数≦ラインバッファでのビット数<ビット分離256sで分離されるデータのビット数
この条件を満たせば、上記実施形態の動作を実現することができる。
また、以下の条件によって動作を行わせることで、既存の中間調処理(図5及び図9、参照)と同等の処理にすることができる。
ビット分離256sで分離する上位ビット数=ラインバッファでのビット数=ビット分離256sで分離されるデータのビット数
By the way, the number of bits of input data, the number of bits of upper and lower bits in bit separation, the number of bits of the line buffer, and the like shown in this embodiment show values as one example.
Therefore, application conditions when the image processing apparatus of the present invention is implemented in the embodiment configured by the above-described elements will be described below.
First, the following condition is satisfied. That is,
The number of upper bits separated by
Further, by performing the operation under the following conditions, it is possible to make the processing equivalent to the existing halftone processing (see FIGS. 5 and 9).
Number of upper bits separated by
また、ビット分離256sで分離する上位ビット数、ラインバッファでのビット数、ビット分離256sで分離されるデータのビット数の少なくとも一つのビット数を異なるビット数の間で切り替え可能とし、動的にビット数を切り替えられるような回路とし、かつ適用条件としての上記不等式及び等式が実現できるように構成する方法で実施してもよい。
このように実施することで、既存の中間調処理(図5及び図9、参照)を包括した実施形態とすることができる。
なお、この実施形態において、ビット分離での上位ビット数を小さくすればするほど、誤差の拡散が広範囲に広がりやすく、エッジなどがぼやけてしまう可能性がある。
In addition, it is possible to switch at least one of the number of high-order bits separated by
By carrying out like this, it can be set as embodiment which included the existing halftone process (refer FIG.5 and FIG.9).
In this embodiment, as the number of upper bits in the bit separation is reduced, the error diffusion is likely to spread over a wide range, and the edge or the like may be blurred.
“ラインバッファの実装”
また、上述のラインバッファの実装の仕方について述べると、SRAM(Static Random Access Memory)などの専用メモリを使用する場合と、DRAM(Dynamic Random Access Memory)などのメインメモリの一部を共用し、装置全体の回路規模を小さくする場合が考えられる。
メインメモリを使用する場合は、アクセスの容易性などを考慮すると、8bit(=1Byte)の倍数が最適であり、従来は、16bitを使用していたが、本発明を適用することで、8bitとすることが可能であり、メモリ容量とアクセス時間をそれぞれ半分に抑えることが可能となる。
専用メモリを使用する場合は、一般的にbit数もカスタマイズ可能であるため、サイズに合わせて柔軟に対応することが可能である。専用メモリによると、メインメモリを用いる場合に生じ得るアクセスに時間が長く掛かる、という問題は起きない。
“Implementation of line buffer”
Further, the implementation of the above-described line buffer will be described. When a dedicated memory such as an SRAM (Static Random Access Memory) is used, a part of a main memory such as a DRAM (Dynamic Random Access Memory) is shared. It is conceivable to reduce the overall circuit scale.
When the main memory is used, the multiple of 8 bits (= 1 Byte) is optimal considering the ease of access and the like. Conventionally, 16 bits were used. However, by applying the present invention, 8 bits is used. It is possible to reduce the memory capacity and the access time by half.
When a dedicated memory is used, since the number of bits can generally be customized, it can be flexibly adapted to the size. According to the dedicated memory, there is no problem that it takes a long time to access when the main memory is used.
さらに、ラインバッファは、次ラインの各画素の誤差データを保存するので、1ライン分を用意する必要があり、その合計サイズは1ラインの画素数の影響を受ける。例えば、解像度が上がったり、用紙サイズが大きくなったりするとラインバッファに必要なサイズが増える。
従来では、使用する最大環境に合わせてラインバッファを用意する必要があったが、この実施形態では、上述したように、ビット分離で分離する上位ビット数、ラインバッファでのビット数を動的に切り替え可能としているので、この機能を用いることで、解像度が上がった場合や用紙サイズが大きくなった場合に、それに合わせてラインバッファのビット数を削減することで、ラインバッファのサイズを小さくすることができる。
Further, since the line buffer stores error data of each pixel of the next line, it is necessary to prepare one line, and the total size is affected by the number of pixels of one line. For example, as the resolution increases or the paper size increases, the size required for the line buffer increases.
Conventionally, it has been necessary to prepare a line buffer in accordance with the maximum environment to be used. In this embodiment, as described above, the number of upper bits to be separated by bit separation and the number of bits in the line buffer are dynamically set. Since this function is used, when the resolution is increased or the paper size is increased, the line buffer size is reduced by reducing the number of bits of the line buffer accordingly. Can do.
下記(1)〜(4)は、中間調処理ブロックへの入力データが、10bit、発生誤差のbit数が12bitの場合を例に、設定された解像度及び用紙サイズに基づいて、ビット分離で分離する上位ビット数及びラインバッファでのビット数を動的に切り替え、ラインバッファのサイズを抑制可能とした実施例を示す。なお、下記(1)は、抑制をかけない従来と同等の動作モードになる。
(1) 「A4、600dpi」・・・「ビット分離での上位ビット数:12bit」、「ラインバッファのビット数:12bit」
(2) 「A4、1200dpi」・・・「ビット分離での上位ビット数:6bit」、「ラインバッファのビット数:6bit」
(3) 「A3、600dpi」・・・「ビット分離での上位ビット数:8bit」、「ラインバッファのビット数:8bit」
(4) 「A3、1200dpi」・・・「ビット分離での上位ビット数:4bit」、「ラインバッファのビット数:4bit」
The following (1) to (4) are separated by bit separation based on the set resolution and paper size, taking as an example the case where the input data to the halftone processing block is 10 bits and the number of generated error bits is 12 bits. In this embodiment, the number of upper bits and the number of bits in the line buffer are dynamically switched to suppress the size of the line buffer. Note that (1) below is an operation mode equivalent to the conventional one without any suppression.
(1) "A4, 600dpi" ... "Upper bit number in bit separation: 12bit", "Line buffer bit number: 12bit"
(2) "A4, 1200dpi" ... "Upper bit number in bit separation: 6bit", "Line buffer bit number: 6bit"
(3) "A3, 600dpi" ... "Upper bit number in bit separation: 8bit", "Line buffer bit number: 8bit"
(4) "A3, 1200dpi" ... "Upper bit number in bit separation: 4bit", "Line buffer bit number: 4bit"
1・・MFP(複合機)、2・・コントローラ、3・・スキャナユニット、4・・プロッタユニット、25・・中間調処理、252・・量子化、253・・逆量子化、255・・重み付け、256・・誤差保存・出力、256a・・累算、256r・・誤差保存・出力(1)、256b・・誤差保存・出力(2)、256h・・ラインバッファ、256i・・重み加算、256s・・ビット分離、256d・・バッファ、20・・CPU。
1 .. MFP (multifunction machine) 2 ..
Claims (8)
前記量子化手段によって量子化された少値データと元の多値データを比較することで、量子化による誤差を算出する量子化誤差算出手段と、
前記量子化誤差算出手段によって算出された誤差を拡散させるための重みを、複数の対象周辺画素に付与する重み付与手段と、
現行ラインの量子化誤差拡散処理の際、前記重み付与手段によって付与された重みに従い拡散される誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された誤差データに加算する誤差加算手段と、
前記誤差加算手段によって計算された誤差データを、処理対象画素の前記量子化手段への入力データに付加するために、処理順となる画素配列に従って保存するバッファと
を有する画像処理装置であって、
前記誤差加算手段によって計算された次ラインの誤差データを上位ビットと下位ビットに分離するデータ分離手段と、
現行ラインの量子化誤差拡散処理の際、前記データ分離手段で分離された下位ビットの誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された次ラインの下位ビットの誤差データに加算し、桁上げ信号を出力する下位ビット誤差累算手段と、
前記データ分離手段で分離された上位ビットの誤差データに前記下位ビット誤差累算手段の出力する桁上げ信号を加算する上位ビット誤差データ算出手段と、
前記バッファに設けた、前記上位ビット誤差データ算出手段によって算出された上位ビットの誤差データを保存する次ライン誤差データ保存部と、
前記次ライン誤差データ保存部に保存された誤差データを現行ラインの量子化誤差拡散処理に適用する際に、元のビット数に合わせるためのレフトシフタ
を備え、
前記データ分離手段、前記次ライン誤差データ保存部及び前記誤差加算手段を、次の関係式、即ち、
前記データ分離手段で分離する上位ビット数≦前記次ライン誤差データ保存部で保存する誤差データのビット数<前記データ分離手段で分離される誤差データのビット数
に基づいて構成することを特徴とする画像処理装置。 To the multi-value data of the pixel to be processed in the image composed of pixels of the multi-value data, error data generated in the peripheral pixels and diffused to the pixel to be processed are added, and then compared with the threshold value. Quantization means for outputting value data;
Quantization error calculation means for calculating an error due to quantization by comparing the low-value data quantized by the quantization means and the original multi-value data;
Weighting means for assigning a weight for diffusing the error calculated by the quantization error calculating means to a plurality of target peripheral pixels;
In the quantization error diffusion process of the current line, the error data diffused according to the weight given by the weighting unit is added to the error data accumulated until the quantization error diffusion process of the current line for each pixel. Error adding means;
A buffer for storing the error data calculated by the error adding means in accordance with a pixel arrangement in a processing order in order to add to the input data to the quantization means of the pixel to be processed,
Data separating means for separating the error data of the next line calculated by the error adding means into upper bits and lower bits;
In the quantization error diffusion process of the current line, the error data of the lower bits of the next line accumulated until the quantization error diffusion process of the current line is obtained for each pixel by using the error data of the lower bits separated by the data separation unit. Low-order bit error accumulation means for adding to the data and outputting a carry signal;
Upper bit error data calculating means for adding a carry signal output from the lower bit error accumulating means to the upper bit error data separated by the data separating means;
A next line error data storage unit for storing upper bit error data calculated by the upper bit error data calculation means provided in the buffer;
When the error data stored in the next line error data storage unit is applied to the quantization error diffusion processing of the current line, a left shifter for adjusting to the original number of bits is provided .
The data separation means, the next line error data storage unit, and the error addition means are expressed by the following relational expression:
The number of upper bits separated by the data separation means ≦ the number of error data bits saved by the next line error data storage unit <the number of error data bits separated by the data separation means
An image processing apparatus configured based on the above .
前記量子化手段によって量子化された少値データと元の多値データを比較することで、量子化による誤差を算出する量子化誤差算出手段と、
前記量子化誤差算出手段によって算出された誤差を拡散させるための重みを、複数の対象周辺画素に付与する重み付与手段と、
現行ラインの量子化誤差拡散処理の際、前記重み付与手段によって付与された重みに従い拡散される誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された誤差データに加算する誤差加算手段と、
前記誤差加算手段によって計算された誤差データを、処理対象画素の前記量子化手段への入力データに付加するために、処理順となる画素配列に従って保存するバッファと
を有する画像処理装置であって、
前記誤差加算手段によって計算された次ラインの誤差データを上位ビットと下位ビットに分離するデータ分離手段と、
現行ラインの量子化誤差拡散処理の際、前記データ分離手段で分離された下位ビットの誤差データを、画素ごとに、現行ラインの量子化誤差拡散処理までに累積された次ラインの下位ビットの誤差データに加算し、桁上げ信号を出力する下位ビット誤差累算手段と、
前記データ分離手段で分離された上位ビットの誤差データに前記下位ビット誤差累算手段の出力する桁上げ信号を加算する上位ビット誤差データ算出手段と、
前記バッファに設けた、前記上位ビット誤差データ算出手段によって算出された上位ビットの誤差データを保存する次ライン誤差データ保存部と、
前記次ライン誤差データ保存部に保存された誤差データを現行ラインの量子化誤差拡散処理に適用する際に、元のビット数に合わせるためのレフトシフタ
を備え、
前記データ分離手段、前記次ライン誤差データ保存部及び前記誤差加算手段を、次の関係式、即ち、
前記データ分離手段で分離する上位ビット数<前記次ライン誤差データ保存部で保存する上位ビットの誤差データのビット数<前記データ分離手段で分離される誤差データのビット数
に基づいて構成することを特徴とする画像処理装置。 To the multi-value data of the pixel to be processed in the image composed of pixels of the multi-value data, error data generated in the peripheral pixels and diffused to the pixel to be processed are added, and then compared with the threshold value. Quantization means for outputting value data;
Quantization error calculation means for calculating an error due to quantization by comparing the low-value data quantized by the quantization means and the original multi-value data;
Weighting means for assigning a weight for diffusing the error calculated by the quantization error calculating means to a plurality of target peripheral pixels;
In the quantization error diffusion process of the current line, the error data diffused according to the weight given by the weighting unit is added to the error data accumulated until the quantization error diffusion process of the current line for each pixel. Error adding means;
A buffer for storing the error data calculated by the error adding means in accordance with a pixel arrangement in the processing order in order to add to the input data to the quantization means of the pixel to be processed;
An image processing apparatus comprising:
Data separating means for separating the error data of the next line calculated by the error adding means into upper bits and lower bits;
In the quantization error diffusion process of the current line, the error data of the lower bits of the next line accumulated until the quantization error diffusion process of the current line is obtained for each pixel by using the error data of the lower bits separated by the data separation unit. Low-order bit error accumulation means for adding to the data and outputting a carry signal;
Upper bit error data calculating means for adding a carry signal output from the lower bit error accumulating means to the upper bit error data separated by the data separating means;
A next line error data storage unit for storing upper bit error data calculated by the upper bit error data calculation means provided in the buffer;
When applying the error data stored in the next line error data storage unit to the quantization error diffusion processing of the current line, a left shifter for adjusting to the original number of bits
With
The data separation means, the next line error data storage unit, and the error addition means are expressed by the following relational expression:
The number of upper bits separated by the data separation means <the number of error data bits of the upper bits saved by the next line error data storage unit <the number of error data bits separated by the data separation means. A featured image processing apparatus.
前記データ分離手段で分離する上位ビット数、前記次ライン誤差データ保存部で保存する上位ビットの誤差データのビット数、前記データ分離手段で分離される誤差データのビット数の少なくとも一つのビット数を異なるビット数の間で切り替え可能にしたことを特徴とする画像処理装置。 The image processing apparatus according to claim 1 ,
The number of upper bits separated by the data separation means, the number of bits of error data of the upper bits stored by the next line error data storage unit, and the number of bits of error data separated by the data separation means An image processing apparatus characterized in that it can be switched between different numbers of bits.
前記上位ビット誤差データ算出手段における下位ビットの桁上げ信号の加算により上位ビットがオーバーフローする条件が成り立つとき、入力下位ビットの桁上げ信号を無視する手段を備えたことを特徴とする画像処理装置。 In the image processing device according to claim 1 or 3 ,
An image processing apparatus, comprising: means for ignoring a carry signal of an input low-order bit when a condition for overflowing a high-order bit is satisfied by addition of a carry signal of a low-order bit in the high-order bit error data calculation means.
前記上位ビット誤差データ算出手段における下位ビットの桁上げ信号の加算により上位ビットがオーバーフローする条件が成り立つとき、下位ビットの桁上げ信号の入力を保留し、後続する処理で当該オーバーフロー条件が不成立になったときに保留を解除する手段を備えたことを特徴とする画像処理装置。 In the image processing device according to claim 1 or 3 ,
When the condition that the upper bit overflows by the addition of the lower bit carry signal in the upper bit error data calculation means is satisfied, the input of the lower bit carry signal is suspended and the overflow condition is not satisfied in the subsequent processing. An image processing apparatus comprising means for releasing the hold when the image is held.
前記バッファは、誤差拡散を伴う量子化処理専用のメモリを用いて構成することを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 5 ,
The image processing apparatus is characterized in that the buffer is configured using a memory dedicated to quantization processing accompanied by error diffusion.
前記バッファは、当該画像処理装置全体を制御するシステムで使用するメインメモリを共用して構成することを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 5 ,
The image processing apparatus characterized in that the buffer is configured to share a main memory used in a system that controls the entire image processing apparatus.
前記バッファのビット数を8ビットとしたことを特徴とする画像処理装置。 The image processing device according to claim 7 ,
An image processing apparatus, wherein the number of bits of the buffer is 8 bits.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011028837A JP5750924B2 (en) | 2011-02-14 | 2011-02-14 | Image processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011028837A JP5750924B2 (en) | 2011-02-14 | 2011-02-14 | Image processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2012169840A JP2012169840A (en) | 2012-09-06 |
| JP5750924B2 true JP5750924B2 (en) | 2015-07-22 |
Family
ID=46973549
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011028837A Expired - Fee Related JP5750924B2 (en) | 2011-02-14 | 2011-02-14 | Image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5750924B2 (en) |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3209763B2 (en) * | 1991-09-12 | 2001-09-17 | 株式会社日立製作所 | Image signal processing method |
| US5696601A (en) * | 1994-08-03 | 1997-12-09 | Xerox Corporation | System and method for redistributing error values from an error diffusion process |
| JP2002232713A (en) * | 2001-02-06 | 2002-08-16 | Mitsubishi Electric Corp | Image processing apparatus and image processing method |
| JP4136779B2 (en) * | 2002-07-11 | 2008-08-20 | キヤノン株式会社 | Image processing apparatus and image processing method |
| JP2009260856A (en) * | 2008-04-21 | 2009-11-05 | Kawasaki Microelectronics Inc | Image processor |
-
2011
- 2011-02-14 JP JP2011028837A patent/JP5750924B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2012169840A (en) | 2012-09-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2001313831A (en) | IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM RECORDING PROGRAM FOR CAUSING COMPUTER TO EXECUTE THE METHOD | |
| US8184917B2 (en) | Image processor | |
| US7660017B2 (en) | Image processor, image processing method and image processing program | |
| US8208172B2 (en) | Image forming apparatus and image forming method | |
| JP6403490B2 (en) | Image processing apparatus, image forming apparatus, image processing method, and program. | |
| US7706021B2 (en) | Image processing apparatus and image processing method for suppressing jaggies in the edge portions of image | |
| JP2015156570A (en) | Color processing apparatus, image forming apparatus, and program | |
| CN101241329A (en) | Image processing device, image processing method, and computer-readable recording medium thereof | |
| JP5750924B2 (en) | Image processing device | |
| US8379273B2 (en) | Image processing apparatus and image processing method | |
| JP4908382B2 (en) | Image processing apparatus and image processing method | |
| JP2002185785A (en) | Image processing method and device, recording medium | |
| JP4814162B2 (en) | Image processing apparatus and image processing method | |
| JP6907034B2 (en) | Image processing equipment, image processing methods and programs | |
| US9674398B2 (en) | Processing apparatus which decompresses compressed data, control method thereof, and non-transitory computer readable medium | |
| JP4368280B2 (en) | Image processing device | |
| US20190191055A1 (en) | Image forming apparatus for outputting a halftone image and image forming method | |
| JP4139752B2 (en) | Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium recording the program | |
| JP4962362B2 (en) | Image processing apparatus, image forming apparatus, and program | |
| US20070052982A1 (en) | Color image forming apparatus and image forming method | |
| JP2005057598A (en) | Color image forming device and color image processor | |
| JP4426486B2 (en) | Image processing apparatus and program | |
| JP2000196875A (en) | Image processing device | |
| JP2006086918A (en) | Image processing device | |
| JP5742320B2 (en) | Image forming apparatus, image forming method, program, and recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140116 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141127 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20141202 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150128 |
|
| 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: 20150421 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150504 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5750924 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |