JP2006050300A - Image processing device, and its method - Google Patents

Image processing device, and its method Download PDF

Info

Publication number
JP2006050300A
JP2006050300A JP2004229179A JP2004229179A JP2006050300A JP 2006050300 A JP2006050300 A JP 2006050300A JP 2004229179 A JP2004229179 A JP 2004229179A JP 2004229179 A JP2004229179 A JP 2004229179A JP 2006050300 A JP2006050300 A JP 2006050300A
Authority
JP
Japan
Prior art keywords
processing
image
error diffusion
dither
drawing command
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.)
Withdrawn
Application number
JP2004229179A
Other languages
Japanese (ja)
Inventor
Toshinori Igari
俊紀 猪狩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2004229179A priority Critical patent/JP2006050300A/en
Publication of JP2006050300A publication Critical patent/JP2006050300A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve a problem that, when quantization is performed by changing error diffusion processing and dither processing for each drawing instruction, results of the dither processing and the error diffusion processing must output to different memory areas, and a binary valued result of the dither processing must expand in bits and be composed with the result of the error diffusion processing, since there is the restriction that the dither processing can perform only binary processing. <P>SOLUTION: It becomes possible to directly write out a result of multiple valued error diffusion processing and a binary valued result of the dither processing, without bit expansion for a memory area, by binarizing the output of the dither processing as 0 and the maximum output value of the error diffusion processing. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は画像処理装置およびその方法に関し、特にラスタライズした原稿データ内のオブジェクト情報によって、画像処理方法を切り替える画像処理装置およびその方法に関するものである。   The present invention relates to an image processing apparatus and method, and more particularly to an image processing apparatus and method for switching an image processing method according to object information in rasterized document data.

一般に、ホストコンピュータへプリンタを接続するには、プリンタを制御する印刷制御装置を構成するため、ホストコンピュータにプリンタドライバが搭載される。ホストコンピュータ上で稼働するアプリケーションソフトウェアは、文字、図形などのグラフィクスや写真画像などのイメージ画像を含む画像データを作成する。アプリケーションソフトウェアは、オペレーティングシステム(OS)を介して、印刷出力対象の画像データを描画命令としてプリンタドライバに供給する。プリンタドライバは、供給される画像データに基づく描画命令を解析し、メモリ上に、RGB多階調の画像データを作成し、それをプリンタインクの各色を表すCMYK多値情報に変換する。さらに、プリンタドライバは、CMYK多値情報をインクを吐出するか否かを表すCMYK二値データに変換した後、プリンタが解析できる出力データを生成してプリンタへ転送する。   Generally, in order to connect a printer to a host computer, a printer driver is mounted on the host computer in order to configure a print control apparatus that controls the printer. Application software running on the host computer creates image data including graphics such as characters and graphics and image images such as photographic images. The application software supplies image data to be printed out to the printer driver as a drawing command via the operating system (OS). The printer driver analyzes a drawing command based on the supplied image data, creates RGB multi-gradation image data on the memory, and converts it into CMYK multi-value information representing each color of the printer ink. Further, the printer driver converts the CMYK multi-value information into CMYK binary data indicating whether or not to eject ink, and then generates output data that can be analyzed by the printer and transfers it to the printer.

プリンタにより画像データに基づく画像を良好に出力する場合、出力画像を構成する複数の描画命令のそれぞれに対し、描画命令の種類に応じた色処理である輝度/濃度変換処理、マスキング処理、ガンマ処理および減色処理、並びに、量子化処理などが必要とされる。従って、プリンタドライバは、例えば写真画像部分はイメージ描画命令、テキスト部分はテキスト描画命令、図表などのグラフィクス部分はグラフィクス描画命令というように、出力画像を構成する要素ごとに発行される描画命令の種類ごとに、適切な色処理や量子化処理などを行う。   When a printer outputs an image based on image data satisfactorily, brightness / density conversion processing, masking processing, and gamma processing, which are color processing according to the type of drawing command, for each of a plurality of drawing commands constituting the output image And a color reduction process, a quantization process, and the like are required. Therefore, the printer driver is a type of drawing command issued for each element constituting the output image, for example, an image drawing command for a photographic image part, a text drawing command for a text part, and a graphics drawing command for a graphics part such as a chart. Appropriate color processing and quantization processing are performed for each time.

印刷情報処理に用いられる一般的な色処理としては、グラフィクス描画命令には「鮮やかさ優先の色処理」、テキスト描画命令は「測色的一致」、写真部描画命令は「色味優先の色処理」が行われる。このように描画命令ごとに色処理を切り替えることで、すべての描画命令に対し良好な画像出力を得ることができる。   General color processing used for print information processing is “color processing with priority on vividness” for graphics drawing commands, “colorimetric match” for text drawing commands, and “color with priority on color” for photo drawing commands. Processing "is performed. Thus, by switching the color processing for each drawing command, it is possible to obtain a good image output for all the drawing commands.

また、印刷情報処理に用いられる一般的な量子化手段としては、ディザ法、誤差拡散法などがある。ディザ法は、ディザマトリクスから着目画素の座標に対応した閾値を読み出し、その閾値と入力画素値を比較してドットのオン・オフを決める量子化法であり、高速かつ均一に量子化することが可能で、テキストや図形などの画像の量子化に適している。   Also, general quantization means used for print information processing include a dither method and an error diffusion method. The dither method is a quantization method that reads a threshold value corresponding to the coordinates of the pixel of interest from a dither matrix, compares the threshold value with an input pixel value, and determines whether dots are turned on or off. Yes, it is suitable for quantizing images such as text and graphics.

これに対して、誤差拡散法は、予め定められた閾値と入力画素値を比較して出力値を決め、その出力値と入力画素値の誤差を周辺画素に拡散する量子化法であり、ディザ法よりも処理時間を要するが、微妙な階調表現をすることができ、写真画像などに分類される画像の量子化に適している。   In contrast, the error diffusion method is a quantization method in which an output value is determined by comparing a predetermined threshold value with an input pixel value, and an error between the output value and the input pixel value is diffused to surrounding pixels. Although it requires more processing time than the method, it can express subtle gradations and is suitable for quantization of images classified as photographic images.

尚、量子化処理の出力レベル数は、入力画像データの1画素に対して、インクを吐出するかしないかを決める2値化よりも、多値化の方が、プリンタ本体の持つ複数のインデックスパターンを切り替えたり、ドットのサイズを切り替えたりできるため、階調表現力が優れており、写真などのイメージ画像の印刷に使われることが多い。   It should be noted that the number of output levels of the quantization process is such that the multi-value quantization has a plurality of indexes of the printer body rather than the binarization that determines whether or not to eject ink for one pixel of the input image data. Since the pattern can be switched and the dot size can be switched, the gradation expression is excellent, and it is often used for printing image images such as photographs.

しかしながら、頁内に写真などのイメージ領域や、テキストなどの領域が混在するデータを印刷する際、描画命令ごとに適切な色処理および量子化処理を行うには、一旦、頁内の全ての描画命令を解析した後、その解析内容に基づき描画命令ごとに処理を最適化するので、解析処理に多くの時間を必要とし、一頁分の描画命令の解析結果をメモリへ保存するので多くのメモリを必要とする問題があった。   However, when printing image data such as photographs and data such as text mixed in a page, in order to perform appropriate color processing and quantization processing for each rendering command, all the drawing in the page is temporarily performed. After analyzing the command, the processing is optimized for each drawing command based on the analysis content, so it takes a lot of time for the analysis process, and the analysis result of the drawing command for one page is saved in the memory. There was a problem that required.

そこで、特許文献1には、ページ内に写真などのイメージ領域や、テキストなどの領域が混在するデータを印刷する際、領域ごとに色処理・量子化処理を切り替える方法が提案されている。
特開平2001−144939号公報
Therefore, Patent Document 1 proposes a method of switching color processing / quantization processing for each region when printing data in which an image region such as a photograph or a region such as text is mixed in a page.
JP 2001-144939 A

しかし、上記特許文献1においては2値化についてのみ書かれており、イメージ領域の階調表現力は低い。   However, in the above-mentioned patent document 1, only the binarization is described, and the gradation expression power of the image area is low.

上記特許文献1に省みて、イメージ領域は誤差拡散処理で多値化、その他の領域はディザ処理で2値化し、それらの結果を合成して出力するという手段がある。図12、図13はこの従来技術を説明するための図である。入力ラスタデータ1201は幅32ピクセルあり、2箇所のイメージ領域1202,1203と、イメージ外領域1204,1205,1206が存在する。尚、ここでディザは1ビット2値出力、誤差拡散は2ビット4値出力を例にとって説明する。それぞれの出力ビット数に合わせて、ディザ出力バッファ1308は4バイト、誤差拡散出力バッファ1301は8バイトで予め用意する。   In addition to the above-mentioned patent document 1, there is a means in which the image area is multi-valued by error diffusion processing, the other areas are binarized by dither processing, and the results are synthesized and output. 12 and 13 are diagrams for explaining this prior art. The input raster data 1201 has a width of 32 pixels, and there are two image areas 1202 and 1203 and areas outside the images 1204, 1205, and 1206. Here, the dither will be described by taking a 1-bit binary output and the error diffusion by taking a 2-bit 4-level output as an example. In accordance with the number of output bits, the dither output buffer 1308 is prepared in advance with 4 bytes, and the error diffusion output buffer 1301 is prepared with 8 bytes in advance.

まず、イメージ領域1202,1203を誤差拡散出力バッファ1301の対応する領域1302,1303に1画素あたり2ビット4値化する。同様にイメージ以外の領域1204,1205,1206をディザ出力バッファ1308の対応する領域1309,1310,1311に1ビット2値化する。   First, the image areas 1202 and 1203 are binarized into 2 bits per pixel into corresponding areas 1302 and 1303 of the error diffusion output buffer 1301. Similarly, the areas 1204, 1205, and 1206 other than the image are binarized into 1 bit into corresponding areas 1309, 1310, and 1311 of the dither output buffer 1308, respectively.

次に、ディザ出力バッファ1308に記録されたイメージ外領域の1ビット2値化結果1309,1310,1311を、イメージ領域の出力ビット数・レベル数に合わせてビット拡張をして、誤差拡散出力バッファ1301の対応する領域1304,1305,1306に書き込み、プリンタへデータ1308を送出する。   Next, the 1-bit binarization results 1309, 1310, and 1311 recorded in the dither output buffer 1308 are bit-expanded in accordance with the number of output bits / level of the image area, and the error diffusion output buffer Data is written in the corresponding areas 1304, 1305, 1306 of 1301, and data 1308 is sent to the printer.

ディザ出力バッファ1308の先頭画素1312を例にとって、ビット拡張の方法を具体的に説明すると、先頭画素1312の値が「0(2進数)」の場合は「00(2進数)」を、「1(2進数)」の場合は誤差拡散の最大出力値である「11(2進数)」を誤差拡散出力バッファ1301の先頭画素1307へ書き出す。   The bit expansion method will be described specifically by taking the first pixel 1312 of the dither output buffer 1308 as an example. When the value of the first pixel 1312 is “0 (binary number)”, “00 (binary number)” is changed to “1”. In the case of “(binary number)”, “11 (binary number)” which is the maximum error diffusion output value is written to the first pixel 1307 of the error diffusion output buffer 1301.

上述した従来技術では、出力バッファは2つ用意しなければならず、またディザ出力結果をビット拡張するのに時間がかかるという問題があった。   In the above-described prior art, two output buffers must be prepared, and there is a problem that it takes time to bit-extend the dither output result.

そこで、イメージ以外の領域はディザ法ではなく多値ディザ法によって多値化することで、イメージ領域とその他の領域の多値化レベル数を合わせて量子化処理を行う手段があるが、イメージ以外の領域は文字や背景などの領域であるため、階調再現性よりも高速な処理を求められる事が多い。   Therefore, there is a means to perform quantization processing by combining the number of multi-value levels in the image area and other areas by multi-valued areas other than the image by multi-value dither method instead of dither method. Since these areas are areas such as characters and backgrounds, high-speed processing is often required rather than gradation reproducibility.

本発明は、上述の問題を解決するためのものであり、イメージ領域を階調再現性に優れた誤差拡散法で多値化し、その他の領域をディザ法で2値化しつつ、無駄な出力バッファやビット拡張の必要ない画像処理装置およびその方法を提供することを目的とする。   The present invention is for solving the above-mentioned problem, and multi-valued an image area by an error diffusion method excellent in gradation reproducibility, and binarized by a dither method while wasteful output buffer. Another object is to provide an image processing apparatus and method that do not require bit extension.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明にかかる画像処理装置は、一頁を複数に分割したバンド単位に入力される描画命令を解析して特定の描画命令を判別する判別手段と、前記特定の描画命令に基づく描画領域の数および位置を示す情報を抽出する抽出手段と、前記バンドのライン単位に、前記特定の描画命令に基づく描画領域数、並びに、開始点および終了点を示す情報を抽出する抽出手段と、前記バンドのライン単位に前記入力描画命令に基づき描画された画像に、抽出される情報に基づいて画像処理を施す画像処理手段とを有し、
前記画像処理手段における量子化手段は、ディザ手段と誤差拡散手段とを有し、前記ディザ手段と前記誤差拡散手段の出力ビット数は同一であり、前記誤差拡散手段の出力レベル数は3値以上であり、前記ディザ手段の出力レベル数は2値であり、かつ、その出力値は0と前記誤差拡散手段の最大出力値のいずれかである事を特徴とする。
An image processing apparatus according to the present invention includes: a discriminating unit that analyzes a drawing command input in units of bands obtained by dividing one page into a plurality of units to determine a specific drawing command; and a number of drawing regions based on the specific drawing command Extraction means for extracting information indicating the position, extraction means for extracting the number of drawing areas based on the specific drawing command and information indicating the start point and end point for each band line unit, Image processing means for performing image processing based on the extracted information on the image drawn based on the input drawing command in units of lines;
The quantization means in the image processing means has a dither means and an error diffusion means, the number of output bits of the dither means and the error diffusion means is the same, and the number of output levels of the error diffusion means is three or more. The number of output levels of the dither means is binary, and the output value is either 0 or the maximum output value of the error diffusion means.

本発明によれば、従来技術の誤差拡散とディザを共に2値出力としたために発生していた、階調再現性が乏しかった欠点を改善し、ディザと誤差拡散の出力バッファを別に持ってディザの出力をビット拡張していたため発生していた、メモリの無駄や処理時間が長くなっていた欠点をも改善することを可能とした。   According to the present invention, it is possible to improve the disadvantage that the gray scale reproducibility is poor because both error diffusion and dither in the prior art are made to be binary output, and the dither and error diffusion output buffers are provided separately. It was possible to remedy the disadvantages of memory wasting and processing time that were caused by bit expansion of the output.

以下、本発明にかかる一実施形態の画像処理装置を図面を参照して詳細に説明する。   Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.

[構成]
図1は本実施形態におけるシステムの概略構成例を示すブロック図である。コンピュータ101には、例えばインクジェットプリンタなどのプリンタ102が接続されている。コンピュータ101は、ワードプロセッサ、表計算、インターネットブラウザなどのアプリケーションソフトウェア104、並びに、アプリケーションソフトウェア104からOS103に対して発行される出力画像を描画するための各種描画命令群(イメージ描画命令、テキスト描画命令およびグラフィクス描画命令)を処理して印刷データを作成するプリンタドライバ105を有する。なお、図1に示される実施形態として、例えば一般に普及しているIBM ATコンパチブルのパーソナルコンピュータに、OS103としてMicrosoft社のWindows(登録商標)XP、および、印刷機能を有する任意のアプリケーションソフトウェアをインストールして、プリンタ102を接続した形態が考えられる。
[Constitution]
FIG. 1 is a block diagram showing a schematic configuration example of a system in the present embodiment. For example, a printer 102 such as an ink jet printer is connected to the computer 101. The computer 101 includes application software 104 such as a word processor, spreadsheet, and Internet browser, and various drawing command groups (image drawing commands, text drawing commands, and the like) for drawing output images issued from the application software 104 to the OS 103. A printer driver 105 that processes the graphics rendering command and generates print data. As an embodiment shown in FIG. 1, for example, a Windows (registered trademark) XP of Microsoft Corporation and any application software having a printing function are installed as an OS 103 in a widely used IBM AT compatible personal computer. Thus, a form in which the printer 102 is connected can be considered.

次に、コンピュータ101とプリンタ102のハードウェア構成について図3を参照して説明する。   Next, the hardware configuration of the computer 101 and the printer 102 will be described with reference to FIG.

コンピュータ301は処理部303と、操作者にグラフィック情報等を表示する表示装置313(この例ではCRT)、プログラムやデータが格納された大容量記憶装置であるHDD(ハードディスクドライブ)314、キーボード315を含めてコンピュータ全体を構成している。また、プリンタ302は、記録ヘッド325、記録ヘッド325を搬送するキャリアを駆動するキャリア(CR)モータ326、用紙を搬送する搬送(LF)モータ327などの駆動部と、制御回路部304とから構成されている。   The computer 301 includes a processing unit 303, a display device 313 (CRT in this example) for displaying graphic information and the like to an operator, an HDD (hard disk drive) 314 that is a mass storage device storing programs and data, and a keyboard 315. Including the entire computer. The printer 302 includes a drive unit such as a recording head 325, a carrier (CR) motor 326 that drives a carrier that conveys the recording head 325, a conveyance (LF) motor 327 that conveys paper, and a control circuit unit 304. Has been.

コンピュータ301の処理部303は、制御プログラムに従ってホスト装置の全体制御を司るMPU305、システム構成要素を互いに接続するバス308、MPU305が実行するプログラムやデータ等を一時記憶するDRAM307、システムバスとメモリバス、MPU305を接続するブリッジ306を含んでいる。   The processing unit 303 of the computer 301 includes an MPU 305 that controls the entire host device according to a control program, a bus 308 that connects system components to each other, a DRAM 307 that temporarily stores programs and data executed by the MPU 305, a system bus and a memory bus, A bridge 306 for connecting the MPU 305 is included.

さらに、処理部303は表示装置313とのインタフェースを司るグラフィックアダプタ309、HDD314とのインタフェースを司るHDDコントローラ310、キーボード315とのインタフェースを司るキーボードコントローラ311、USB1.1規格に従ってプリンタ302との間の通信を司る、通信I/F312を備えている。   Further, the processing unit 303 communicates between the graphic adapter 309 that controls the interface with the display device 313, the HDD controller 310 that controls the interface with the HDD 314, the keyboard controller 311 that controls the interface with the keyboard 315, and the printer 302 according to the USB 1.1 standard. A communication I / F 312 that controls communication is provided.

一方、プリンタ302は本実施形態ではインクジェット方式のシリアルプリンタである。プリンタ302の制御回路部304は、制御プログラム実行機能と周辺装置制御機能とを兼ね備えた、プリンタ302の全体制御を司るMCU318、制御回路部内部の各構成要素を接続するシステムバス316、記録データの記録ヘッド325への供給やメモリアドレスデコーディングやキャリアモータへの制御パルス発生機構等を制御回路として内部に納めたゲートアレイ(G.A.)317を備えている。   On the other hand, the printer 302 is an inkjet serial printer in this embodiment. The control circuit unit 304 of the printer 302 has a control program execution function and a peripheral device control function, which controls the overall control of the printer 302, a system bus 316 that connects each component in the control circuit unit, and a recording data A gate array (GA) 317 is provided in which supply to the recording head 325, memory address decoding, a control pulse generation mechanism for a carrier motor, and the like are housed as a control circuit.

また、制御回路部304は、MCU318が実行する制御プログラムやホスト印刷情報等を格納するROM320、各種データ(画像記録情報やヘッドに供給される記録データ等)を保存するDRAM321、USB1.1規格に従いホスト装置301との間の通信を司る通信I/F319、ゲートアレイ317から出力されたヘッド記録信号に基づき、記録ヘッド325を駆動する電気信号に変換するヘッドドライバ322を備えている。   In addition, the control circuit unit 304 conforms to a ROM 320 that stores a control program executed by the MCU 318, host print information, and the like, a DRAM 321 that stores various data (image recording information, recording data supplied to the head, and the like), and a USB 1.1 standard. A communication I / F 319 that controls communication with the host device 301 and a head driver 322 that converts the head recording signal output from the gate array 317 into an electric signal for driving the recording head 325 are provided.

さらに、制御回路部304は、ゲートアレイ317から出力されるキャリアモータ制御パルスを実際にキャリア(CR)モータ326を駆動する電気信号に変換するCRモータドライバ323、MCU318から出力された搬送モータ制御パルスを、実際に搬送モータを駆動する電気信号に変換するLFモータドライバ324を備えている。   Further, the control circuit unit 304 converts the carrier motor control pulse output from the gate array 317 into an electric signal for actually driving the carrier (CR) motor 326, and the carrier motor control pulse output from the MCU 318. Is converted to an electric signal for actually driving the transport motor.

図1に示すシステムの各ブロックは、図3のコンピュータにおいて、後述する図2の手順のプログラムを初めとするプログラムを実行することで実現されている。   Each block of the system shown in FIG. 1 is realized by executing a program including a program in the procedure of FIG. 2 described later in the computer of FIG.

[処理例]
図2はバンディング方式のプリンタドライバ105およびOS103の処理例を示す図である。アプリケーションソフトウェア104は、文字などのテキストに分類されるテキストデータや、図形などのグラフィクスに分類されるグラフィクスデータや、写真画像などに分類されるイメージ画像データなどを出力画像データとして作成する。作成された出力画像データを印刷出力する場合、アプリケーションソフトウェア104は、OS103に対して印刷出力を要求し、テキストデータ部分はテキスト描画命令、グラフィクスデータ部分はグラフィクス描画命令、イメージ画像データ部分はイメージ描画命令で構成される出力画像を示す描画命令群をOS103に発行する。
[Example]
FIG. 2 is a diagram illustrating a processing example of the banding type printer driver 105 and the OS 103. The application software 104 creates text data classified into text such as characters, graphics data classified into graphics such as graphics, image image data classified into photographic images, and the like as output image data. When the created output image data is printed out, the application software 104 requests the OS 103 to print out, the text data portion is a text drawing command, the graphics data portion is a graphics drawing command, and the image image data portion is an image drawing. A drawing command group indicating an output image composed of commands is issued to the OS 103.

アプリケーションソフトウェア104から印刷出力の要求を受けたOS103は、プリンタ102に対応するプリンタドライバ105に印刷開始命令を発行する。プリンタドライバ105は、OS103から印刷開始命令を受信すると、バンディング処理用の作業領域(以下「バンドメモリ」と呼ぶ場合がある)をDRAM307上に確保し、確保した作業領域の座標データ(バンドサイズのデータ)をOS103に送る。OS103は、受信される座標データによって表されるバンド内に存在する描画命令群をプリンタドライバ105に発行する。   The OS 103 that has received the print output request from the application software 104 issues a print start command to the printer driver 105 corresponding to the printer 102. When the printer driver 105 receives a print start command from the OS 103, the printer driver 105 secures a work area for banding processing (hereinafter also referred to as “band memory”) on the DRAM 307, and coordinates data (band size of the secured work area). Data) to the OS 103. The OS 103 issues a drawing command group existing in the band represented by the received coordinate data to the printer driver 105.

本実施形態に示すようなページ記述言語を展開してイメージを描画する機能をもたないラスタプリンタにおいては、コンピュータ101上のプリンタドライバ105によりイメージの描画処理が行われる。しかし、コンピュータ101は、一頁分すべての描画命令を展開しイメージを描画するのに必要な充分なメモリを搭載されていないことが多い。そこで、一頁を縦に分割したバンドと呼ばれる単位ごとに、描画命令を展開してイメージをメモリ上に描画するために、バンディング処理用の作業領域が確保される。   In a raster printer that does not have a function for rendering an image by developing a page description language as shown in the present embodiment, image rendering processing is performed by the printer driver 105 on the computer 101. However, in many cases, the computer 101 is not equipped with sufficient memory necessary for developing all drawing commands for one page and drawing an image. Therefore, a work area for banding processing is secured in order to develop a drawing command and draw an image on a memory for each unit called a band obtained by dividing one page vertically.

プリンタドライバ105は、OS103から供給される描画命令群を、順次、RGB24ビット形式でバンドメモリにラスタライズ(描画)し、供給されたすべての描画命令をラスタライズした後にバンドメモリの内容をCMYKデータに変換し、プリンタ102が印刷可能なデータ形式に変換してプリンタ102へ送る。   The printer driver 105 sequentially rasterizes (draws) the drawing commands supplied from the OS 103 in the band memory in RGB 24-bit format, and after rasterizing all the supplied drawing commands, converts the contents of the band memory into CMYK data. Then, the data is converted into a data format printable by the printer 102 and sent to the printer 102.

OS103は、アプリケーションソフトウェア104から供給される、頁内に存在するすべての描画命令群の発行をバンドごとに繰り返すことで、プリンタドライバ105およびプリンタ102に一頁分の印刷を実行させる。   The OS 103 causes the printer driver 105 and the printer 102 to execute printing for one page by repeating issuance of all drawing command groups existing in the page supplied from the application software 104 for each band.

[印刷処理]
図4はプリンタドライバ105による印刷処理の一例を示すフローチャートである。
[Print processing]
FIG. 4 is a flowchart illustrating an example of print processing by the printer driver 105.

バンディング方式のプリンタドライバ105の全体的な処理の流れは図2に示したように、バンドメモリを確保して(S401)、すべての印刷処理をバンドごとに行い(S402からS409)、すべてのバンドの処理が終った後にバンドメモリを解放する(S410)。プリンタドライバ105によるバンドごとの印刷処理は、大きく分けると三つのステップに分かれる。   As shown in FIG. 2, the overall processing flow of the banding printer driver 105 is to secure a band memory (S401), perform all printing processes for each band (S402 to S409), and perform all band processing. After the process is finished, the band memory is released (S410). The print processing for each band by the printer driver 105 is roughly divided into three steps.

第一のステップにおいてプリンタドライバ105は、OS103からバンドメモリに描画すべき描画命令を一つずつ受け取り、この描画命令の実行時に後述する描画命令解析処理を行いながら図10に示すイメージ領域情報テーブル1001(AreaInfoTBL)を作成して(S402)、プリンタ102の解像度に応じて予め確保したRGB24ビットのバンドメモリに、順次、画像をラスタライズしてRGB画像データを生成する(S403)。   In the first step, the printer driver 105 receives drawing commands to be drawn in the band memory one by one from the OS 103, and performs image drawing information analysis processing (to be described later) at the time of executing the drawing command, and the image area information table 1001 shown in FIG. (AreaInfoTBL) is created (S402), and RGB image data is generated by sequentially rasterizing the image in an RGB 24-bit band memory secured in advance according to the resolution of the printer 102 (S403).

第二のステップにおいてプリンタドライバ105は、バンド内のスキャンラインを示すカウンタScanLineを零に初期化し(S404)、バンドメモリに生成されたRGB画像データの1スキャンラインごとに、AreaInfoTBL1001に基づき後述するイメージ領域生成処理を実行して、図11に示すイメージ位置情報テーブル1101(ImageAreaTBL)を形成する(S405)。   In the second step, the printer driver 105 initializes a counter ScanLine indicating a scan line in the band to zero (S404), and an image to be described later based on the AreaInfoTBL 1001 for each scan line of the RGB image data generated in the band memory. The area generation process is executed to form the image position information table 1101 (ImageAreaTBL) shown in FIG. 11 (S405).

第三のステップにおいてプリンタドライバ105は、生成されたImageAreaTBL1101を基に、バンド内の1スキャンラインごとに、そのスキャンラインの先端から終端まで、イメージ領域およびその他の領域に、それぞれの領域の特性に応じた色処理(輝度/濃度変換、マスキング、ガンマ補正、減色)、並びに、量子化処理を施した後、バンド内の画像データを印刷データに変換してプリンタ102に出力する画像処理を実行する(S406)。   In the third step, the printer driver 105 sets the characteristics of each area in the image area and other areas from the leading edge to the trailing edge of the scan line for each scan line in the band based on the generated ImageAreaTBL 1101. After performing corresponding color processing (brightness / density conversion, masking, gamma correction, color reduction) and quantization processing, image processing within the band is converted into print data and output to the printer 102 is executed. (S406).

次に、ScanLineとバンドの高さHyとを比較して、バンド内の全てのスキャンラインの画像処理が終了したか否かを判定する(S407)。そして、ScanLine<HyであればS405へ戻って次のスキャンラインの処理を実行し、ScanLine=HyであればAreaInfoTBL1001のメモリ領域を解放する(S408)。   Next, ScanLine is compared with the band height Hy to determine whether or not the image processing for all the scan lines in the band has been completed (S407). If ScanLine <Hy, the process returns to S405 to execute the next scan line, and if ScanLine = Hy, the memory area of AreaInfoTBL 1001 is released (S408).

次に、すべてのバンドの処理が終了したか否かを判定し(S409)、終了していればバンドメモリを解放して印刷処理を終了する(S410)。また、処理が未了のバンドがあればS402へ戻る。   Next, it is determined whether or not the processing for all the bands has been completed (S409). If the processing has been completed, the band memory is released and the printing process is terminated (S410). If there is a band that has not been processed, the process returns to S402.

以下では、上述した三つのステップについて詳しく説明する。   Hereinafter, the three steps described above will be described in detail.

[描画命令解析処理]
図5はS402の描画命令解析処理の一例を示すフローチャートである。描画命令解析処理は、OS103から渡される描画命令を解析することにより、バンド内に存在しているイメージ領域の数を示す情報(ImageCount)と、バンド内に存在しているイメージに外接する矩形領域を示す情報であるAreaInfoTBL1001とをDRAM307上に生成するものである。以下、図5に従って描画命令解析処理のフローを説明する。
[Drawing command analysis processing]
FIG. 5 is a flowchart showing an example of the drawing command analysis process in S402. The drawing command analysis process analyzes information (ImageCount) indicating the number of image areas existing in the band and a rectangular area circumscribing the image existing in the band by analyzing the drawing command passed from the OS 103. AreaInfoTBL1001 which is information indicating the above is generated on the DRAM 307. Hereinafter, the flow of the drawing command analysis process will be described with reference to FIG.

まず、ImageCountを零に初期化し(S501)、OS103から描画命令を取得し(S502)、取得した描画命令がイメージ描画命令であるか否かを判定する(S503)。イメージ描画命令であれば描画命令が示すオブジェクトが写真画像か否かを判定する(S504)。なお、一般に写真画像などの画像データは24ビットRGBや8ビットパレットであることが多く、それよりビット深さが浅い画像データは写真画像ではない場合が多いので、イメージ描画命令の関数のヘッダを参照して、例えば画像データのビット深さが24ビット以上または8ビットパレットである場合に写真画像と判定すればよい。   First, ImageCount is initialized to zero (S501), a drawing command is acquired from the OS 103 (S502), and it is determined whether or not the acquired drawing command is an image drawing command (S503). If it is an image drawing command, it is determined whether or not the object indicated by the drawing command is a photographic image (S504). In general, image data such as a photographic image is often a 24-bit RGB or 8-bit palette, and image data having a bit depth smaller than that is often not a photographic image. Referring to, for example, when the bit depth of image data is 24 bits or more or an 8-bit palette, it may be determined as a photographic image.

描画命令が示すオブジェクトが写真画像の場合、DRAM307に割り当てられたAreaInfoTBL1001にエントリを一つ作成し、そのエントリにイメージ描画命令に含まれる描画位置情報である矩形領域の左上座標(Left,Top)と右下座標(Right,Bottom)を保存し(S505)、ImageCountをインクリメントする(S506)。   When the object indicated by the drawing command is a photographic image, one entry is created in the AreaInfoTBL 1001 assigned to the DRAM 307, and the upper left coordinate (Left, Top) of the rectangular area, which is the drawing position information included in the image drawing command, is set in the entry. The lower right coordinates (Right, Bottom) are saved (S505), and ImageCount is incremented (S506).

この描画命令解析処理は、バンド内で実行されるすべての描画命令に対して実行される処理であるから、S507の判断により、バンド内に未処理の描画命令が存在する場合はS502へ戻る。   Since this drawing command analysis processing is executed for all drawing commands executed in the band, if there is an unprocessed drawing command in the band based on the determination in S507, the processing returns to S502.

すべての描画命令の解析を終え、AreaInfoTBL1001が作成された場合は、そのレコードの並びを左端(Left)値、上端(Top)値、右端(Right)値および下端(Bottom)値のソート優先順位により昇順にソートして処理を終了する。   When AreaInfoTBL 1001 is created after all drawing commands have been analyzed, the record order is determined by the sorting priority of the leftmost (Left) value, the uppermost (Top) value, the rightmost (Right) value, and the lowermost (Bottom) value. Sort in ascending order and end processing.

[イメージ領域生成処理]
図6はS405のイメージ領域生成処理の一例を示すブローチャートである。イメージ領域生成処理は、バンド内の1スキャンラインの副走査方向(Y方向)の位置情報を基に、そのスキャンライン上に存在するイメージ領域の数を示す情報(ImageCountPerLine)と、そのスキャンライン上における各イメージ領域の主走査方向(X方向)の始点および終点を示すImageAreaTBL1101とをDRAM307上に生成する。以下、図6に従ってイメージ領域生成処理のフローを説明する。
[Image area generation processing]
FIG. 6 is a flowchart showing an example of the image area generation processing in S405. The image area generation processing is based on position information in the sub-scanning direction (Y direction) of one scan line in the band, information indicating the number of image areas existing on the scan line (ImageCountPerLine), and on the scan line ImageAreaTBL 1101 indicating the start point and end point of each image area in the main scanning direction (X direction) is generated on the DRAM 307. Hereinafter, the flow of the image area generation processing will be described with reference to FIG.

カウンタCountおよびImageCountPerLineを零に初期化する(S601)。続いて、バンド内に存在するイメージ領域の数を示すImageCountとカウンタCountとを比較する(S602)。もし、Count=ImageCountであればバンド内のすべてのイメージ領域を生成したことになるので処理を終了する。勿論、バンド内にイメージ領域がない(ImageCount=0)の場合も処理を終了する。   The counter Count and ImageCountPerLine are initialized to zero (S601). Subsequently, the image count indicating the number of image areas existing in the band is compared with the counter count (S602). If Count = ImageCount, all the image areas in the band have been generated, and the process is terminated. Of course, the process is also terminated when there is no image area in the band (ImageCount = 0).

次に、AreaInfoTBL1001のレコードAreaInfoTBL[Count]を参照して(S603)、その上端(Top)値および下端(Bottom)値から、現スキャンライン(ScanLine)上にイメージ領域が存在するか否かを判定する(S604)。イメージ領域が存在する場合は、そのイメージ領域に対応するレコードAreaInfoTBL[Count]から左端(Left)および右端(Right)の値を取り出す(S605)。また、スキャンライン上にイメージ領域が存在しない場合はS611へ進む。   Next, with reference to the record AreaInfoTBL [Count] of the AreaInfoTBL 1001 (S603), it is determined from the upper end (Top) value and the lower end (Bottom) value whether an image area exists on the current scan line (ScanLine). (S604). If the image area exists, the values of the left end (Left) and the right end (Right) are extracted from the record AreaInfoTBL [Count] corresponding to the image area (S605). If there is no image area on the scan line, the process advances to step S611.

次に、ImageAreaTBL1101が未作成の場合、ImageAreaTBL1101およびエントリを一つ作成する(S607)。そして、作成したエントリに取り出した左端(Left)および右端(Right)の値をそれぞれ始点および終点として保存し、ImageCountPerLineをインクリメントして(S608)、S611へ進む。   Next, when the ImageArea TBL 1101 has not been created, the ImageArea TBL 1101 and one entry are created (S607). Then, the values of the left end (Left) and the right end (Right) taken out in the created entry are saved as the start point and the end point, respectively, ImageCountPerLine is incremented (S608), and the process proceeds to S611.

一方、ImageAreaTBL1101が作成済みの場合は、最終エントリに保存された終点(PreRight)の値と、S605で取り出した左端(Left)の値とを比較して、イメージ領域が重なるか否かを判定する(S606)。そして、イメージ領域が重ならない(PreRight<Left)場合は、ImageAreaTBL1101にエントリを一つ追加する(S607)。そして、そのエントリに取り出した左端(Left)および右端(Right)の値をそれぞれ始点および終点として保存し、ImageCountPerLineをインクリメントして(S608)、S611へ進む。   On the other hand, if the ImageArea TBL 1101 has been created, the end point (PreRight) value stored in the last entry is compared with the left end (Left) value extracted in S605 to determine whether the image areas overlap. (S606). If the image areas do not overlap (PreRight <Left), one entry is added to the ImageArea TBL 1101 (S607). Then, the values of the left end (Left) and the right end (Right) extracted in the entry are stored as the start point and the end point, respectively, and ImageCountPerLine is incremented (S608), and the process proceeds to S611.

また、S606の判定でイメージ領域が重なると判定された場合は、終点(PreRight)の値と、S605で取り出した右端(Right)の値とを比較して(S609)、PreRight<Rightの場合、最終レコードの終点(PreRight)値を右端(Right)値に更新して(S610)、S611へ進む。なお、イメージ領域が重なる場合は一つのイメージ領域とみなすことからImageCountPerLineはインクリメントしない。また、始点(PreLeft)および左端(Left)に関しては、常にPreLeft≦Leftになるように、描画命令解析処理においてイメージ領域情報のレコードがソートされているので比較する必要はない。   If it is determined in S606 that the image areas overlap, the value of the end point (PreRight) is compared with the value of the right end (Right) extracted in S605 (S609). If PreRight <Right, The end point (PreRight) value of the last record is updated to the right end (Right) value (S610), and the process proceeds to S611. Note that if the image areas overlap, the image count per line is not incremented because it is regarded as one image area. In addition, regarding the start point (PreLeft) and the left end (Left), since the records of the image area information are sorted in the rendering command analysis process so that PreLeft ≦ Left is always satisfied, there is no need to compare them.

S611はカウンタCountがインクリメントした後、処理はS602へ戻る。   In S611, after the counter Count is incremented, the process returns to S602.

このような処理の結果、生成されるImageAreaTBL1101内のイメージ位置情報は自動的にスキャンラインの先端位置(左端)から順にソートされる。そして、バンド内に存在するすべてのイメージ領域情報に対して前述した処理が繰り返された後、イメージ領域生成処理は終了する。   As a result of such processing, the image position information in the generated ImageArea TBL 1101 is automatically sorted in order from the front end position (left end) of the scan line. Then, after the above-described processing is repeated for all the image area information existing in the band, the image area generation processing ends.

[画像処理]
図7はS406の画像処理の一例を示すフローチャートである。尚、本実施例では、イメージ領域は色味優先の色処理と誤差拡散による量子化処理を行い、その他の領域は鮮やかさ優先の色処理とディザによる量子化を行う。
[Image processing]
FIG. 7 is a flowchart illustrating an example of the image processing in S406. In this embodiment, the image area is subjected to color processing with priority on color and quantization processing by error diffusion, and the other areas are subjected to color processing with priority on vividness and quantization with dither.

まず、画像処理を初期化する(S701)。誤差拡散処理、ディザ処理に対して出力ビット数に2、出力レベル数に4が指定される。   First, image processing is initialized (S701). For error diffusion processing and dither processing, 2 is specified as the number of output bits and 4 is specified as the number of output levels.

ここで、本実施例における誤差拡散処理・ディザ処理の概要を簡単に説明する。   Here, the outline of the error diffusion processing / dither processing in the present embodiment will be briefly described.

誤差拡散処理は、着目画素値inValを周辺画素からの誤差で誤差補正し、得られた値lValueによって、出力値outHt、誤差errHtを以下の式から得る。   In the error diffusion process, the target pixel value inVal is corrected with an error from surrounding pixels, and an output value outHt and an error errHt are obtained from the following formulas using the obtained value lValue.

lValue< 43 の時、outHt=0,errHt=lValue ・・・ 式1
43 <= lValue<128 の時、outHt=1,errHt=lValue-85 ・・・ 式2
128 <= lValue<213 の時、outHt=2,errHt=lValue-170 ・・・ 式3
213 <= lValue の時、outHt=3,errHt=lValue-255 ・・・ 式4
ここで得られた誤差errHtを周辺画素に拡散して、次の画素へ処理は移る。
When lValue <43, outHt = 0, errHt = lValue ・ ・ ・ Equation 1
43 <= lValue <128, outHt = 1, errHt = lValue-85 ・ ・ ・ Equation 2
When 128 <= lValue <213, outHt = 2, errHt = lValue-170 Equation 3
When 213 <= lValue, outHt = 3, errHt = lValue-255 Equation 4
The error errHt obtained here is diffused to the peripheral pixels, and the process moves to the next pixel.

一方、ディザ処理は、ディザマトリクス(幅m×高さn)の閾値をD(x,y)とすると(0<=x<m,0<=y<n)、座標(X,Y)の着目画素(画素値inVal)と出力値outHtの関係は以下のようになる。
inVal<D(X%m,Y%n) の時、 outHt=0 ・・・ 式5
D(X%m,Y%n)<=inVal の時、 outHt=3 ・・・ 式6
式6のoutHtは「出力レベル数−1」によって決定する。
On the other hand, in the dither processing, assuming that the threshold value of the dither matrix (width m × height n) is D (x, y) (0 <= x <m, 0 <= y <n), the coordinates (X, Y) The relationship between the pixel of interest (pixel value inVal) and the output value outHt is as follows.
When inVal <D (X% m, Y% n), outHt = 0 ... Formula 5
When D (X% m, Y% n) <= inVal, outHt = 3 Equation 6
The outHt in Expression 6 is determined by “number of output levels−1”.

このような誤差拡散処理、ディザ処理を行うための初期設定がS701で行われる。同時にイメージ領域で行う色味優先の色処理、その他の領域で行う鮮やかさ優先の色処理の初期化も行われる。   Initial settings for performing such error diffusion processing and dither processing are performed in S701. At the same time, color processing with priority on color in the image area and color processing with priority on vividness in other areas are initialized.

次に、カウンタCountを零に初期化し、変数StartPosおよびEndPosにスキャンライン805の先端位置および後端位置を示す情報をそれぞれセットする(S702)。   Next, the counter Count is initialized to zero, and information indicating the front end position and the rear end position of the scan line 805 is set in the variables StartPos and EndPos, respectively (S702).

続いて、イメージ領域生成処理でセットされた、スキャンライン805のイメージ領域の数を示すImageCountPerLineを参照して、スキャンライン805にイメージ領域が存在するか否かを判定する(S703)。   Subsequently, with reference to ImageCountPerLine indicating the number of image areas of the scan line 805 set in the image area generation process, it is determined whether or not there is an image area in the scan line 805 (S703).

ここで、イメージ領域とその他の領域の色処理・量子化処理について説明する。イメージ領域は、まずスキャンライン805の該当領域のRGB各色8ビットの画像データを色味優先の色処理を行ってCMYK各色8ビットの画像データに変換して、CMYK各色の色処理出力バッファ901の該当領域にそれぞれ出力する。続けて、CMYK各色の色処理出力バッファ901の該当領域のCMYK各色8ビットの画像データを、S701で初期化した誤差拡散処理で2ビット4値化してCMYK各色の量子化出力バッファ902に出力する。一方、イメージ以外の領域は、まずスキャンライン805の該当領域のRGB各色8ビットの画像データを鮮やかさ優先の色処理を行ってCMYK各色8ビットの画像データに変換して、CMYK各色の色処理出力バッファ901の該当領域にそれぞれ出力する。続けて、CMYK各色の色処理出力バッファ901の該当領域のCMYK各色8ビットの画像データを、S701で初期化したディザ処理で2ビット2値化してCMYK各色の量子化出力バッファ902に出力する。   Here, color processing / quantization processing of the image region and other regions will be described. In the image area, first, the RGB color 8-bit image data in the corresponding area of the scan line 805 is converted to 8-bit CMYK color image data by performing color-priority color processing. Output to each corresponding area. Subsequently, the 8-bit image data of CMYK colors in the corresponding area of the color processing output buffer 901 for each color of CMYK is binarized into 4 bits by the error diffusion process initialized in S701, and is output to the quantization output buffer 902 for each color of CMYK. . On the other hand, for the area other than the image, first, 8-bit image data for each RGB color in the corresponding area of the scan line 805 is converted to 8-bit image data for each color of CMYK by performing color processing with priority on vividness, and color processing for each color of CMYK. The data is output to the corresponding area of the output buffer 901. Subsequently, the 8-bit image data of each CMYK color in the corresponding area of the color processing output buffer 901 for each color of CMYK is binarized into 2 bits by the dither processing initialized in S701, and is output to the quantization output buffer 902 for each color of CMYK.

もし、ImageCountPerLine=0の場合は、スキャンライン805全体に亘ってイメージ以外の領域とみなし、鮮やかさ優先の色処理を行い(S704)、ディザ処理で量子化を行う(S705)。次に、量子化後の画像データを印刷データに変換してプリンタ102に送信する(S706)。そして、ScanLineをインクリメントし(S707)、イメージ位置情報テーブル(ImageAreaTBL)のメモリ領域を解放して画像処理を終了する(S708)。   If ImageCountPerLine = 0, the entire scan line 805 is regarded as an area other than an image, vividness priority color processing is performed (S704), and quantization is performed by dither processing (S705). Next, the quantized image data is converted into print data and transmitted to the printer 102 (S706). Then, ScanLine is incremented (S707), the memory area of the image position information table (ImageAreaTBL) is released, and the image processing is ended (S708).

一方、ImageCountPerLine>0で、スキャンライン805にイメージ領域が存在する場合、イメージ領域生成処理で生成されたイメージ位置情報テーブルのレコードImageAreaTBL[Count]からイメージ領域の始点(X1)および終点(X2)の値を得る。そして、スキャンライン805上のStartPosからX1(始点)までの領域をイメージ以外の領域として鮮やかさ優先の色処理を行い(S709)、ディザ処理で量子化を行う(S710)。   On the other hand, if ImageCountPerLine> 0 and an image area exists on the scan line 805, the start point (X1) and end point (X2) of the image area from the record ImageAreaTBL [Count] of the image position information table generated by the image area generation process. Get the value. Then, color processing with priority on vividness is performed with the region from StartPos to X1 (start point) on the scan line 805 as a region other than an image (S709), and quantization is performed by dither processing (S710).

続けて、X1(始点)からX2(終点)までのイメージ領域に色味優先の色処理を行い(S711)、誤差拡散処理で量子化を行う(S712)。次に、StartPosにX2(終点)の値をセットし、ImageCountPerLineをデクリメント、Countをインクリメントし(S713)、S703へ戻る。   Subsequently, color processing with priority on color is performed on the image area from X1 (start point) to X2 (end point) (S711), and quantization is performed by error diffusion processing (S712). Next, the value of X2 (end point) is set in StartPos, ImageCountPerLine is decremented, Count is incremented (S713), and the process returns to S703.

従って、ImageCountPerLineが零になるまで、つまりスキャンライン805上のImageAreaTBL1101がすべて参照されるまで、S709からS713が繰り返される。そして、ImageAreaTBL1101の参照が終了すると、StartPosにはスキャンライン上の最後イメージ領域の終点がセットされているので、上述したステップS704からS706において、StartPosからEndPosまでのテキストまたはグラフィクス領域に鮮やかさ優先の色処理およびディザによる量子化処理が施され、ScanLineがインクリメントされ(S707)、ImageAreaTBL1101のメモリ領域が解放されて画像処理が終了する(S708)。   Therefore, S709 to S713 are repeated until ImageCountPerLine becomes zero, that is, until all of the ImageAreaTBL 1101 on the scan line 805 are referenced. When the reference to ImageAreaTBL1101 is completed, the end point of the last image area on the scan line is set in StartPos. Therefore, in steps S704 to S706, the text or graphics area from StartPos to EndPos has priority for vividness. Color processing and dither quantization processing are performed, ScanLine is incremented (S707), the memory area of ImageAreaTBL1101 is released, and image processing ends (S708).

図8、図9は描画命令解析処理、イメージ領域生成処理および画像処理による処理結果を詳細に説明する図である。バンド801には三つのイメージ領域802,803,804が存在する。描画命令解析処理により、バンド内に存在するイメージ領域の数を示すImageCountは「3」になり、AreaInfoTBL1001には、
AreaInfoTBL[0]={5,12,11,16}
AreaInfoTBL[1]={8,10,16,16}
AreaInfoTBL[2]={20,8,24,15}
が登録される。
8 and 9 are diagrams for explaining in detail the processing results of the drawing command analysis process, the image area generation process, and the image process. In the band 801, there are three image regions 802, 803, and 804. As a result of the drawing command analysis process, ImageCount indicating the number of image areas existing in the band is “3”. In AreaInfoTBL 1001,
AreaInfoTBL [0] = {5, 12, 11, 16}
AreaInfoTBL [1] = {8, 10, 16, 16}
AreaInfoTBL [2] = {20, 8, 24, 15}
Is registered.

次にバンド内のスキャンライン805でイメージ領域生成処理を実行すると、スキャンライン805上に存在するイメージ領域の数を示すImageCountPerLineは「2」になり、ImageAreaTBLには
ImageAreaTBL[0]={5,16}
ImageAreaTBL[1]={20,24}
が登録される。
Next, when the image area generation processing is executed on the scan line 805 in the band, ImageCountPerLine indicating the number of image areas existing on the scan line 805 becomes “2”, and ImageAreaTBL has ImageAreaTBL [0] = {5, 16 }
ImageAreaTBL [1] = {20, 24}
Is registered.

続けて、画像処理の詳細を図7のフローチャートに従って説明する。まず、色処理・量子化処理を初期化し(S701)、StartPos,EndPos,Countにそれぞれ0,31,0を設定する(S702)。   Next, details of the image processing will be described with reference to the flowchart of FIG. First, color processing / quantization processing is initialized (S701), and 0, 31, 0 are set in StartPos, EndPos, and Count, respectively (S702).

ImageCountPerLineは2であるのでS703はYesになり、ImageAreaTBL[0(=Count)]を参照して、スキャンライン805の0(=StartPos)から5(=X1)までの領域についてイメージ以外領域の色処理・量子化を行う(S709,S710)。CMYK各色8ビットデータの鮮やかさ優先色処理結果をCMYK各色の色処理出力バッファ901の0から4バイト目までの領域903にそれぞれ書き込む(S709)。続けてCMYK各色の色処理結果を1画素あたり2ビット2値でそれぞれ量子化して、CMYK各色の量子化出力バッファ902の0バイト目全体と1バイト目の上位2ビットの領域904に書き込む(S710)。ディザ処理は式5、式6に従って00(2進数)か11(2進数)のいずれかを出力する。次に、5(=X1)から16(=X2)までの領域をイメージ領域の色処理・量子化を行う(S711,S712)。CMYK各色8ビットデータの色味優先色処理結果をCMYK各色の色処理出力バッファ901の5バイト目から15バイト目までの領域905にそれぞれ書き込む(S711)。続けて、CMYK各色の色処理結果を1画素あたり2ビット4値でそれぞれ量子化して、CMYK各色の量子化出力バッファ902の1バイト目の下位6ビットと2バイト目の上位6ビットの領域906にそれぞれ書き込む(S712)。続けてCountをインクリメントし(=1)、ImageCountPerLineをデクリメントし(=1)、StartPosにX2(=16)を設定して(S713)、S703へ戻る。   Since ImageCountPerLine is 2, S703 is Yes, and referring to ImageAreaTBL [0 (= Count)], color processing of areas other than the image for the area from 0 (= StartPos) to 5 (= X1) of the scan line 805 Quantization is performed (S709, S710). The vividness priority color processing result of 8-bit data of each color of CMYK is written in the area 903 from 0 to the 4th byte of the color processing output buffer 901 for each color of CMYK (S709). Subsequently, the color processing result of each color of CMYK is quantized with 2 bits and 2 values per pixel, and is written in the entire 0th byte and the upper 2 bits area 904 of the first byte of the quantization output buffer 902 for each color of CMYK (S710). ). In the dither processing, either 00 (binary number) or 11 (binary number) is output according to Equations 5 and 6. Next, color processing / quantization of the image area is performed on the area from 5 (= X1) to 16 (= X2) (S711, S712). The color priority color processing result of 8-bit data for each color of CMYK is written in the area 905 from the 5th byte to the 15th byte of the color processing output buffer 901 for each color of CMYK (S711). Subsequently, the color processing result of each color of CMYK is quantized with 2 bits and 4 values per pixel, and the lower 6 bits of the first byte and the upper 6 bits of the second byte of the quantized output buffer 902 of each color of CMYK 906 are obtained. Each is written (S712). Subsequently, Count is incremented (= 1), ImageCountPerLine is decremented (= 1), X2 (= 16) is set in StartPos (S713), and the process returns to S703.

ImageCountPerLineは1であるのでS703はYesになり、ImageAreaTBL[1(=Count)]を参照して、スキャンライン805の16(=StartPos)から20(=X1)までをイメージ以外領域の色処理・量子化を行い(S709,S710)、20(=X1)から24(=X2)までをイメージ領域の色処理・量子化を行う(S711,S712)。ここで同様にCountのインクリメント(=2)とImageCountPerLineのデクリメント(=0)、StartPosに24(=X2)を設定し(S713)、S703へ戻る。   Since ImageCountPerLine is 1, S703 is Yes, and referring to ImageAreaTBL [1 (= Count)], color processing / quantum of regions other than the image from 16 (= StartPos) to 20 (= X1) of scan line 805 is performed. (S709, S710), and color processing / quantization of the image area from 20 (= X1) to 24 (= X2) is performed (S711, S712). Similarly, the increment of Count (= 2), the decrement of ImageCountPerLine (= 0), and StartPos is set to 24 (= X2) (S713), and the process returns to S703.

この時点でImageCountPerLineは0となるのでS703はNoになり、24(=StartPos)から31(=EndPos)までをイメージ以外領域の色処理・量子化を行い(S704,S705)、量子化出力バッファ902の内容をプリンタへ送信して(S706)、次のラスタへ処理は移る。   At this time, since ImageCountPerLine becomes 0, S703 becomes No, color processing / quantization of regions other than the image is performed from 24 (= StartPos) to 31 (= EndPos) (S704, S705), and the quantization output buffer 902 Is transmitted to the printer (S706), and the process proceeds to the next raster.

このように本実施形態によれば、ラスタデータを描画命令解析処理で解析した結果得られるイメージ領域の情報に基づき、イメージ領域とそれ以外の領域で量子化方法を誤差拡散とディザで切り替える画像処理において、ディザの出力を0と誤差拡散の出力最大値とした。その結果、従来技術の誤差拡散とディザを共に2値出力としたために発生していた、階調再現性が乏しかった欠点を改善し、ディザと誤差拡散の出力バッファを別に持ってディザの出力をビット拡張していたため発生していた、メモリの無駄や処理時間が長くなっていた欠点を改善した。   As described above, according to the present embodiment, based on the information of the image area obtained as a result of analyzing the raster data by the rendering command analysis process, the image process for switching the quantization method between the image area and other areas by error diffusion and dithering The dither output was set to 0 and the error diffusion maximum output value. As a result, the problem of poor gradation reproducibility that occurred because both error diffusion and dither of the prior art were made to be binary output was improved, and dither output was separately provided with dither and error diffusion output buffers. Improved the shortage of memory and processing time that occurred due to bit expansion.

本実施形態におけるシステムの概略構成例を示すブロック図The block diagram which shows the schematic structural example of the system in this embodiment バンディング方式のプリンタドライバおよびOSの処理例を示す図A diagram showing a processing example of a banding printer driver and OS 本実施形態におけるコンピュータ及びプリンタのブロック図Block diagram of computer and printer in this embodiment プリンタドライバによる印刷処理の一例を示すフローチャートA flowchart showing an example of printing processing by a printer driver 描画命令解析処理の一例を示すフローチャートFlow chart showing an example of drawing command analysis processing イメージ領域生成処理の一例を示すフローチャートFlow chart showing an example of image area generation processing 画像処理の一例を示すフローチャートFlow chart showing an example of image processing 描画命令解析処理、イメージ領域生成処理を説明する図Diagram explaining drawing command analysis processing and image area generation processing イメージ領域生成処理、画像処理を説明する図The figure explaining image area generation processing and image processing イメージ領域情報テーブルを示す図Image area information table イメージ位置情報テーブルを示す図Image position information table 従来技術の入力ラスタデータを示す図The figure which shows the input raster data of the prior art 従来技術の出力バッファを示す図Figure showing a prior art output buffer

符号の説明Explanation of symbols

101,301 コンピュータ
102,302 プリンタ
103 オペレーティングシステム
104 アプリケーションソフトウェア
105 プリンタドライバ
303 処理部
304 制御回路部
308 バス
316 システムバス
801 バンド
802,803,804 イメージ領域
805 スキャンライン
901 色処理出力バッファ
902 量子化出力バッファ
1001 イメージ領域情報テーブル
1101 イメージ位置情報テーブル
1201 入力ラスタデータ
1301 誤差拡散出力バッファ
1308 ディザ出力バッファ
101, 301 Computer 102, 302 Printer 103 Operating system 104 Application software 105 Printer driver 303 Processing unit 304 Control circuit unit 308 Bus 316 System bus 801 Band 802, 803, 804 Image area 805 Scan line 901 Color processing output buffer 902 Quantization output Buffer 1001 Image area information table 1101 Image position information table 1201 Input raster data 1301 Error diffusion output buffer 1308 Dither output buffer

Claims (5)

一頁を複数に分割したバンド単位に入力される描画命令を解析して特定の描画命令を判別する判別手段と、前記特定の描画命令に基づく描画領域の数および位置を示す情報を検出する検出手段と、前記バンドのライン単位に、前記特定の描画命令に基づく描画領域数、並びに、開始点および終了点を示す情報を抽出する抽出手段と、前記バンドのライン単位に前記入力描画命令に基づき描画された画像に、抽出される情報に基づいて画像処理を施す画像処理手段とを有し、
前記画像処理手段における量子化手段は、ディザ手段と誤差拡散手段とを有し、前記ディザ手段と前記誤差拡散手段の出力ビット数は同一であり、前記誤差拡散手段の出力レベル数は3値以上であり、前記ディザ手段の出力レベル数は2値であり、かつ、その出力値は0と前記誤差拡散手段の最大出力値のいずれかである事を特徴とする画像処理装置。
A discriminating means for discriminating a specific drawing command by analyzing a drawing command inputted in a band unit obtained by dividing a page into a plurality of pieces, and a detection for detecting information indicating the number and position of drawing regions based on the specific drawing command Means for extracting information indicating the number of drawing areas based on the specific drawing command and the start point and end point for the line unit of the band, and based on the input drawing command for the line unit of the band. Image processing means for performing image processing on the drawn image based on the extracted information;
The quantization means in the image processing means has a dither means and an error diffusion means, the number of output bits of the dither means and the error diffusion means is the same, and the number of output levels of the error diffusion means is three or more. The number of output levels of the dither means is binary, and the output value is either 0 or the maximum output value of the error diffusion means.
前記特定の描画命令とはイメージ描画命令であることを特徴とする請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, wherein the specific drawing command is an image drawing command. 前記イメージ描画命令により描画される領域に対しては前記誤差拡散手段によって、その他の描画命令により描画される領域に対しては前記ディザ手段によって量子化処理を行う事を特徴とする請求項2に記載の画像処理装置。   3. The quantization process is performed by the error diffusion unit for a region rendered by the image rendering command and by the dither unit for a region rendered by another rendering command. The image processing apparatus described. 前記出力ビット数は色ごとに異なる事を特徴とする請求項1または請求項2または請求項3いずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the number of output bits is different for each color. 一頁を複数に分割したバンド単位に入力される描画命令を判別し、前記特定の描画命令に基づく描画領域の数および位置を示す情報を検出し、検出される情報に基づき、前記バンドのライン単位に、前記特定の描画命令に基づく描画領域数、並びに、開始点および終了点を示す情報を抽出し、前記バンドのライン単位に前記入力描画命令に基づき描画された画像に、抽出される情報に基づく画像処理を施し、
前記画像処理における量子化処理は、ディザ処理と誤差拡散処理とを行い、前記ディザ処理と前記誤差拡散処理の出力ビット数は同一であり、前記誤差拡散処理の出力レベル数は3値以上であり、前記ディザ処理の出力レベル数は2値であり、かつ、その出力値は0と前記誤差拡散処理の最大出力値のいずれかである事を特徴とする画像処理方法。
A drawing command input in units of bands obtained by dividing one page into a plurality of pieces is determined, information indicating the number and position of drawing regions based on the specific drawing command is detected, and the line of the band is detected based on the detected information. Information extracted in the unit of the drawing area number based on the specific drawing command, and information indicating the start point and the end point, and extracted in the image drawn based on the input drawing command in the line unit of the band Image processing based on
The quantization processing in the image processing includes dither processing and error diffusion processing, the number of output bits of the dither processing and the error diffusion processing is the same, and the number of output levels of the error diffusion processing is three or more. The number of output levels of the dither processing is binary, and the output value is either 0 or the maximum output value of the error diffusion processing.
JP2004229179A 2004-08-05 2004-08-05 Image processing device, and its method Withdrawn JP2006050300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004229179A JP2006050300A (en) 2004-08-05 2004-08-05 Image processing device, and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004229179A JP2006050300A (en) 2004-08-05 2004-08-05 Image processing device, and its method

Publications (1)

Publication Number Publication Date
JP2006050300A true JP2006050300A (en) 2006-02-16

Family

ID=36028328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004229179A Withdrawn JP2006050300A (en) 2004-08-05 2004-08-05 Image processing device, and its method

Country Status (1)

Country Link
JP (1) JP2006050300A (en)

Similar Documents

Publication Publication Date Title
US7692813B2 (en) Image processing apparatus and method, and storage medium
US6512595B1 (en) Data processing apparatus, data processing method, and medium
US5727137A (en) Printer driver architecture for reducing band memory
EP0654759A2 (en) Printing apparatus
US6184997B1 (en) Variable-length reversible image data compression process
US6429950B1 (en) Method and apparatus for applying object characterization pixel tags to image data in a digital imaging device
CN101146166A (en) Image processing apparatus and method, image forming apparatus, and recording medium
US7477265B2 (en) System and method for optimising halftoning printer performance
JPH0421473A (en) Printer
US6430321B1 (en) Text enhancement
US8054499B2 (en) Resolution doubling for printer apparatus
US7236268B2 (en) Adaptive screening in raster image processing of complex pages
JP4109785B2 (en) Image processing apparatus and method, and computer-readable memory
US7061645B2 (en) Non-segmentation, individual pixel-by-pixel-based image rendering system
EP0697783A1 (en) Dot printing for improved graphics
JP2006050300A (en) Image processing device, and its method
US6339654B1 (en) Apparatus and method for efficiently processing color and monochrome images
EP2876543A1 (en) Printer driver device, printer, and printer system
JP3573035B2 (en) Color printing system and drawing command generation method used therefor
US6903842B2 (en) Method for generating full-page print data
JP4464313B2 (en) Print control apparatus, print control method, and print control program
JPH10329363A (en) Device and method for image forming, and printer
JP4072403B2 (en) Information processing apparatus, information processing method, and program
US20140368888A1 (en) Image forming apparatus, image processing method, and medium
JP2006019931A (en) Apparatus and method for image processing, computer program, and storage medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071106