JP2012054842A - Image processing device and processing method thereof - Google Patents

Image processing device and processing method thereof Download PDF

Info

Publication number
JP2012054842A
JP2012054842A JP2010197141A JP2010197141A JP2012054842A JP 2012054842 A JP2012054842 A JP 2012054842A JP 2010197141 A JP2010197141 A JP 2010197141A JP 2010197141 A JP2010197141 A JP 2010197141A JP 2012054842 A JP2012054842 A JP 2012054842A
Authority
JP
Japan
Prior art keywords
color
colors
data
information
image
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.)
Granted
Application number
JP2010197141A
Other languages
Japanese (ja)
Other versions
JP5606223B2 (en
Inventor
Takeshi Mima
毅 美馬
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 JP2010197141A priority Critical patent/JP5606223B2/en
Publication of JP2012054842A publication Critical patent/JP2012054842A/en
Application granted granted Critical
Publication of JP5606223B2 publication Critical patent/JP5606223B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve a compression ratio in image compression.SOLUTION: For a tile image composed of a predetermined number of pixels that is determined to have three or less colors in the tile image and to have two or less colors in all blocks of 2×2 pixel size composing the tile image, an image processing device generates first packet data including color data information of a first color indicating color data of a pixel at a predetermined position in each block, color data information of the three or less colors existing in the tile image, first pattern information for specifying the arrangement pattern of color data in the each block, and selection information for selecting color data information of a second color different from the color data information of the first color in each of the blocks from among the color data information of the three or less colors.

Description

本発明は、画像を所定のブロック単位に圧縮する技術に関する。   The present invention relates to a technique for compressing an image into predetermined block units.

従来、高解像度のカラー画像への需要は高く、それらの高画質化への要望へ応えるべくデジタル複合機では1200dpiやそれを超える解像度の画像を扱うことが多くなってきている。画像の高解像度化に伴い、画像処理を必要とする画素数が飛躍的に増え、その処理負荷が増大しているという課題がある。例えば、600dpiから1200dpiに解像度が倍になることで処理すべき画素数は4倍になる。このデジタル複合機に限らず、デジタルカメラやファクシミリ装置などの画像処理装置では、メモリやハードディスクの容量節約やそれらへの書き込み時間を短縮するために、カラー画像データの圧縮を行い、低コスト化や高速化を実現している。   Conventionally, there is a high demand for high-resolution color images, and digital multifunction peripherals are increasingly handling images with a resolution of 1200 dpi or higher in order to meet the demand for higher image quality. As the resolution of an image increases, there is a problem that the number of pixels that require image processing increases dramatically and the processing load increases. For example, when the resolution is doubled from 600 dpi to 1200 dpi, the number of pixels to be processed is quadrupled. In addition to this digital multi-function peripheral, image processing apparatuses such as digital cameras and facsimile machines compress color image data in order to save memory and hard disk capacity and reduce the time required for writing them. High speed is realized.

カラー静止画像の圧縮方式には、離散コサイン変換を利用したJPEG方式やウェーブレット変換を利用した方式が多く使われている。この種の符号化方式は、一般的に画像を所定のブロック(例えば8×8や16×16画素単位)に符号化し、離散コサイン変換、量子化及びエントロピー符号化を行うことで高い圧縮効率を達成している。この種の符号化方式は、可変長符号化方式であるので、符号化対象の画像毎に符号量が変化するものである。   As a color still image compression method, a JPEG method using discrete cosine transform and a method using wavelet transform are often used. In this type of encoding method, generally, an image is encoded into a predetermined block (for example, 8 × 8 or 16 × 16 pixel unit), and high compression efficiency is achieved by performing discrete cosine transform, quantization, and entropy encoding. Have achieved. Since this type of encoding method is a variable-length encoding method, the code amount changes for each image to be encoded.

上述した画像圧縮を用いた場合、その画素データを参照し、その画素データを変換するには、圧縮データの復号処理が必要になってくる。つまり、圧縮データのままで画像処理を行うことはできず、必ず復号処理が必要になり、高解像度データの全ての画素に対して画素単位に処理を行う必要があり、処理時間の増大を招く。   When the above-described image compression is used, in order to refer to the pixel data and convert the pixel data, it is necessary to decode the compressed data. In other words, image processing cannot be performed with the compressed data as it is, and decoding processing is necessarily required, and it is necessary to perform processing on every pixel of all pixels of the high resolution data, resulting in an increase in processing time. .

画素データの符号化を行わずに圧縮処理を行う技術としては、画素データとその連続数を記憶する公知のランレングス圧縮方式やブロック単位でエッジを検出し、そのエッジの持つ2色を記憶することで圧縮する技術が開示されている(例えば、特許文献1)。   As a technique for performing compression processing without encoding pixel data, a known run-length compression method for storing pixel data and its continuous number or an edge is detected for each block, and two colors of the edge are stored. Thus, a technique for compressing is disclosed (for example, Patent Document 1).

特開2008−271046号公報JP 2008-271046 A

上記特許文献1においては、ブロック内を2色化し、その2色の配置に関する形状情報と2色の色情報を記憶している。   In the above-mentioned Patent Document 1, the inside of a block is made into two colors, and shape information relating to the arrangement of the two colors and color information of the two colors are stored.

一方、更なる高画質化、処理高速化を図るために、本出願人は特願2009−221444で次のような提案をしている。この提案技術は、まず画像データを2×2画素サイズのブロック毎に分割し、ブロック内の各画素の色データを比較することにより、注目ブロックに含まれる色データの配置パターン情報と、注目ブロックに含まれる色数分の色データ情報とを出力する。そして、色データ情報を、ブロックにおける予め決められた位置の画素に対応する第1の色データ情報と、それ以外の色データ情報(第2〜4の色データ情報(補間データ情報))とに分け、配置パターン情報と共にそれぞれ異なるメモリ領域に纏めて格納する。   On the other hand, in order to further improve image quality and processing speed, the present applicant has made the following proposal in Japanese Patent Application No. 2009-212444. In this proposed technique, image data is first divided into blocks each having a size of 2 × 2 pixels, and the color data of each pixel in the block is compared, so that the arrangement pattern information of the color data included in the block of interest and the block of interest And color data information for the number of colors included in the. The color data information is converted into first color data information corresponding to a pixel at a predetermined position in the block and other color data information (second to fourth color data information (interpolation data information)). The information is divided and stored together with the arrangement pattern information in different memory areas.

これにより、2色より多い色数を持つブロックの画質を落とさずに高画質化を実現する。また、特定位置の間引き画像データを第1の色データ情報として連続メモリ領域に置いておくことにより、高解像度画像を復号化することなく低解像度画像を扱えるようにすることで、処理高速化を実現しようとしている。   As a result, high image quality is achieved without degrading the image quality of blocks having more than two colors. In addition, by placing the thinned image data at a specific position in the continuous memory area as the first color data information, it is possible to handle the low resolution image without decoding the high resolution image, thereby increasing the processing speed. Trying to realize.

一方、本出願人が特願2009-221444で提案している技術の場合、多数の色から構成されている画像に対する符号化処理を行うことも想定しているため、ブロック単位(例えば2×2画素)で、上記補間データ情報を保持している。   On the other hand, in the case of the technique proposed by the present applicant in Japanese Patent Application No. 2009-221444, it is assumed that an encoding process is performed on an image composed of a large number of colors. The pixel) holds the interpolation data information.

そのため、比較的色数が少ない画像の場合、同様の補間データ情報を有するブロックが多数生成されてしまい効率が良くない。特に、デジタル複合機が利用されるオフィス環境では文書画像の印刷が主用途であり、色数が少ない画像を扱うことが殆どである。   Therefore, in the case of an image having a relatively small number of colors, a large number of blocks having similar interpolation data information are generated, which is not efficient. In particular, in an office environment where a digital multi-function peripheral is used, printing of document images is the main use, and most of the images are handled with a small number of colors.

また、バスインターフェース間で使用される転送単位として、もう少し大きなブロック(タイル)単位(例えば64×64画素)を用いる場合、各タイル内の画素は2色或いは3色の色で構成されることが大半である。   When a slightly larger block (tile) unit (for example, 64 × 64 pixels) is used as a transfer unit used between bus interfaces, the pixels in each tile may be configured with two or three colors. The majority.

そこで、本発明では、2〜3色の少数の色で構成される画像を符号化する場合に、補間データに必要なメモリ容量を節約できるようにする。   Therefore, in the present invention, when an image composed of a small number of two to three colors is encoded, the memory capacity necessary for the interpolation data can be saved.

本発明は、画像圧縮時の圧縮率を向上させることを目的とする。   An object of the present invention is to improve the compression rate during image compression.

本発明の画像処理装置は、予め定められた画素数で構成されるタイル画像を処理する画像処理装置であって、前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であるか否かを判定する判定手段と、前記判定手段で前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であると判定されるタイル画像に対して、前記各ブロックにおける予め決められた位置の画素の色データを示す第1色の色データ情報と、前記タイル画像内に存在する前記3色以内の色データ情報と、前記2色以下の各ブロックにおける色データの配置パターンを特定するための第1のパターン情報と、前記3色以内の色データ情報の中から前記2色以下の各ブロックにおける前記第1色の色データ情報と異なる第2色の色データ情報を選択するための選択情報とを含む第1のパケットデータを生成する生成手段と、を有することを特徴とする。   An image processing apparatus according to the present invention is an image processing apparatus that processes a tile image having a predetermined number of pixels, and the tile image has 3 colors or less and 2 × 2 pixels that constitute the tile image Determining means for determining whether or not all of the blocks of size are 2 colors or less, and all of the blocks of 2 × 2 pixels in which the tile image is within three colors and which constitutes the tile image by the determining means For a tile image determined to be 2 colors or less, color data information of a first color indicating color data of a pixel at a predetermined position in each block, and the 3 existing in the tile image Color data information within two colors, first pattern information for specifying an arrangement pattern of color data in each block of two or less colors, and each of two or less colors among the color data information within three colors Bro Generating means for generating first packet data including selection information for selecting color data information of a second color different from the color data information of the first color in the first color data.

本発明によれば、画像圧縮時の圧縮率を向上させることが可能となり、データ量の増大を抑制してシステム効率の低下を低減することができる。更に、メモリなどの容量の増大によるコストアップ、高解像度化による画像処理システムの処理速度の低下を抑えることができる。   According to the present invention, it is possible to improve the compression ratio at the time of image compression, and it is possible to suppress a decrease in system efficiency by suppressing an increase in data amount. Furthermore, it is possible to suppress an increase in cost due to an increase in the capacity of a memory or the like and a decrease in processing speed of the image processing system due to an increase in resolution.

デジタル複合機(MFP)の構成の一例を示す図。1 is a diagram illustrating an example of a configuration of a digital multifunction peripheral (MFP). 図1に示すコントローラの構成例を示す図。The figure which shows the structural example of the controller shown in FIG. 2×2画素のブロックにおける4色のパターンの取り得る組み合わせの場合の数を示す図。The figure which shows the number in the case of the combination which the pattern of 4 colors can take in the block of 2x2 pixels. 図3に示すパターンとパターンフラグの関係を示す図。The figure which shows the relationship between the pattern shown in FIG. 3, and a pattern flag. (A)は2×2画素ブロックが取り得る色パターンの一例、(B)は代表色と補間色との関係、(C)は補間色選択ビットを使用して表現される色パターンの一例、を示す図。(A) is an example of a color pattern that can be taken by a 2 × 2 pixel block, (B) is a relationship between a representative color and an interpolation color, (C) is an example of a color pattern expressed using an interpolation color selection bit, FIG. 圧縮部で実行される圧縮方法の詳細を示すフローチャート。The flowchart which shows the detail of the compression method performed in a compression part. ページとタイルとブロックとの関係を示す図。The figure which shows the relationship between a page, a tile, and a block. パッキングされたデータのデータ構造を示す図。The figure which shows the data structure of the packed data. パケット管理テーブルの構成の一例を示す図。The figure which shows an example of a structure of a packet management table. メモリ空間に書き込まれた各パケットのアドレスを示す図。The figure which shows the address of each packet written in the memory space. 圧縮処理における色数判定処理を示すフローチャート。10 is a flowchart showing color number determination processing in compression processing. 圧縮部の構成を示すブロック図。The block diagram which shows the structure of a compression part. パケットデータ修正処理を示すフローチャート。The flowchart which shows a packet data correction process. 置換補間色バッファ空きフラグテーブル。Replacement interpolation color buffer empty flag table. 置換補間色バッファに格納されている色と、生成する補間色選択ビットの関係図。FIG. 6 is a diagram showing the relationship between colors stored in a replacement interpolation color buffer and generated interpolation color selection bits. 修正前後のパケットデータのデータ構造とヘッダ情報の例。An example of data structure and header information of packet data before and after modification. 補間色置換処理後の第2、3、4色格納部における3色の補間色の格納位置を示す図。The figure which shows the storage position of the three interpolation colors in the 2nd, 3rd, 4th color storage part after an interpolation color replacement process. 展開部の内部構成を示すブロック図。The block diagram which shows the internal structure of an expansion | deployment part. パケットデータの展開処理のフローチャート。The flowchart of the expansion | deployment process of packet data.

以下、図面を参照しながら発明を実施するための形態について詳細に説明する。本実施形態では、画像処理装置として、スキャン、プリント、コピーなどの複数の機能を有するデジタル複合機(MFP)を例に説明する。   Hereinafter, embodiments for carrying out the invention will be described in detail with reference to the drawings. In this embodiment, a digital multi-function peripheral (MFP) having a plurality of functions such as scanning, printing, and copying will be described as an example of the image processing apparatus.

[デジタル複合機(MFP)の構成]
図1に示すように、コントローラ101は、画像入力機器であるスキャナ102や画像出力機器であるプリンタ103と接続される。また、コントローラ101はLANや公衆回線(WAN)などのネットワーク104と接続することで、画像情報やデバイス情報の入出力、PDLデータのイメージ展開を行う。
[Configuration of digital multifunction peripheral (MFP)]
As shown in FIG. 1, the controller 101 is connected to a scanner 102 as an image input device and a printer 103 as an image output device. Further, the controller 101 is connected to a network 104 such as a LAN or a public line (WAN) to input / output image information and device information and develop an image of PDL data.

CPU105は、後述するHDD記憶部107に格納されたプログラムに従ってMFP全体を制御するプロセッサである。メモリ106は、CPU105が動作するためのシステムワークメモリであり、画像データを一時記憶するための画像メモリでもある。HDD記憶部107は、ハードディスクドライブであり、システムソフトウェアやプログラム、画像データなどを格納する。   A CPU 105 is a processor that controls the entire MFP in accordance with a program stored in an HDD storage unit 107 described later. The memory 106 is a system work memory for operating the CPU 105, and is also an image memory for temporarily storing image data. The HDD storage unit 107 is a hard disk drive, and stores system software, programs, image data, and the like.

次に、図2に示すコントローラ101の構成例を参照してコントローラ101の各部の詳細な処理を説明する。まず、スキャナ102によってスキャンされた画像データを読み込む場合を説明する。スキャナ102で読み取られたRGB(レッド、グリーン、ブルー)3色の画像データをスキャナ用画像処理部201が受け取り、その画像データに対してシェーディング処理やフィルタ処理等の画像処理を行い、圧縮部202が画像圧縮処理を行う。そして、圧縮されたデータ(圧縮データ)をDMAC(ダイレクトメモリアクセスコントローラ)203が画像メモリバスを介してメモリ106に格納する。   Next, detailed processing of each unit of the controller 101 will be described with reference to a configuration example of the controller 101 shown in FIG. First, a case where image data scanned by the scanner 102 is read will be described. The scanner image processing unit 201 receives RGB (red, green, blue) three-color image data read by the scanner 102, performs image processing such as shading processing and filter processing on the image data, and compresses the data. Performs image compression processing. Then, the compressed data (compressed data) is stored in the memory 106 by the DMAC (direct memory access controller) 203 via the image memory bus.

次に、スキャンされた画像データをプリントする場合、メモリ106に格納された圧縮データをDMAC211が画像メモリバスを介して色処理部212へ転送する。そして、色処理部212がCMYK(シアン、マゼンタ、イエロー、ブラック)色空間へ変換する。その後、更に色処理部212がCMYKの各値に対して濃度調整やプリンタガンマ補正などの色処理を行った後、該色処理後のデータをDMAC211が画像メモリバスを介して再度メモリ106に格納する。その後、プリント用の画像処理を行うために、DMAC221が画像メモリバスを介してメモリ106に格納されている圧縮データを読み込み、展開部222がラスタ画像データに展開する。そして、ラスタのCMYK画像データをプリント用画像処理部223が入力し、ディザ法や誤差拡散法による面積階調処理を行い、プリンタ103へ出力する。   Next, when printing scanned image data, the DMAC 211 transfers the compressed data stored in the memory 106 to the color processing unit 212 via the image memory bus. Then, the color processing unit 212 converts into a CMYK (cyan, magenta, yellow, black) color space. Thereafter, the color processing unit 212 further performs color processing such as density adjustment and printer gamma correction on each value of CMYK, and then the data after the color processing is stored again in the memory 106 by the DMAC 211 via the image memory bus. To do. Thereafter, in order to perform image processing for printing, the DMAC 221 reads the compressed data stored in the memory 106 via the image memory bus, and the expansion unit 222 expands the raster image data. The raster CMYK image data is input to the print image processing unit 223, performs area gradation processing by a dither method or an error diffusion method, and outputs the result to the printer 103.

また、スキャンされた画像データをネットワークへ送信する場合、メモリ106に格納されている圧縮データをDMAC211が画像メモリバスを介して色処理部212へ転送する。そして、色処理部212がディスプレイガンマ調整や用紙地色調整等を行った後、YCbCr(輝度、BLUE色差、RED色差)色空間へ変換する。そして、当該色処理部212で処理されたデータを再度DMAC211が画像メモリバスを介してメモリ106に格納する。その後、送信用の画像処理を行うために、DMAC231が画像メモリバスを介してメモリ106に格納されている圧縮データを展開部232へ転送する。そして、展開部232が圧縮データをラスタ画像データに展開する。その後、ラスタのYCbCr画像データに対して送信処理部233がカラー画像送信であればJPEG圧縮処理を行い、モノクロ2値画像送信であればYデータに対して2値化を行い、JBIG圧縮等を行い、ネットワーク104へ出力する。   When the scanned image data is transmitted to the network, the DMAC 211 transfers the compressed data stored in the memory 106 to the color processing unit 212 via the image memory bus. After the color processing unit 212 performs display gamma adjustment, paper background color adjustment, and the like, the color processing unit 212 performs conversion to a YCbCr (luminance, BLUE color difference, RED color difference) color space. Then, the DMAC 211 stores the data processed by the color processing unit 212 in the memory 106 again via the image memory bus. Thereafter, in order to perform image processing for transmission, the DMAC 231 transfers the compressed data stored in the memory 106 to the expansion unit 232 via the image memory bus. Then, the expansion unit 232 expands the compressed data into raster image data. After that, if the transmission processing unit 233 performs color image transmission on the raster YCbCr image data, JPEG compression processing is performed. If the monochrome binary image transmission is performed, binarization is performed on the Y data, and JBIG compression or the like is performed. And output to the network 104.

また、スキャンされた画像データを保存する場合、メモリ106に格納されている圧縮データをDMAC241が画像メモリバスを介してディスクスプール高圧縮/展開部242へ転送する。ディスクスプール高圧縮/展開部242では、HDDの書き込みスピードがメモリに対して遅いため、更に高圧縮のJPEG圧縮を施す。その後ディスクアクセスコントローラ243を介してHDD記憶部107へ圧縮データを保存する。また、HDD記憶部107に保存されている圧縮データを再度メモリ106に転送する場合には、上述した処理を逆に行えば良い。   When saving scanned image data, the DMAC 241 transfers the compressed data stored in the memory 106 to the disk spool high compression / decompression unit 242 via the image memory bus. In the disk spool high compression / decompression unit 242, the writing speed of the HDD is slower than that of the memory. Thereafter, the compressed data is stored in the HDD storage unit 107 via the disk access controller 243. In addition, when the compressed data stored in the HDD storage unit 107 is transferred again to the memory 106, the above-described processing may be performed in reverse.

ここで、図1に示すネットワーク104を介して接続された他の装置から送られてきたPDLデータをメモリ106へ書き込む場合を説明する。図2にはPDL解釈部が図示されていないが、PDL解釈部として機能するCPU105がPDLデータを解釈し、その結果のディスプレイリストをメモリ106に出力する。その後、メモリ106に格納されているディスプレイリストをレンダリング部251がラスタのRGB画像データへレンダリングを行い、圧縮部252が画像圧縮処理を行う。そして、圧縮データをDMAC253が画像メモリバスを介してメモリ106に格納する。   Here, a case where PDL data sent from another device connected via the network 104 shown in FIG. Although the PDL interpretation unit is not shown in FIG. 2, the CPU 105 functioning as the PDL interpretation unit interprets the PDL data and outputs the display list as a result to the memory 106. Thereafter, the rendering unit 251 renders the display list stored in the memory 106 into raster RGB image data, and the compression unit 252 performs image compression processing. Then, the DMAC 253 stores the compressed data in the memory 106 via the image memory bus.

尚、PDLデータをプリント、ネットワークへ送信、保存する処理は、スキャンされた画像データの場合と同様の処理を行うことで実現可能である。   It should be noted that the process of printing, transmitting to a network, and storing the PDL data can be realized by performing the same process as in the case of scanned image data.

次に、本発明の特徴であるラスタ画像データの圧縮処理を詳細に説明する。尚、本実施形態において、圧縮部252ではPDLデータから生成されたラスタ画像を圧縮し、圧縮部202ではスキャンで得たラスタ画像を圧縮するものとするが、このような構成に限るものではない。例えば、図2のように圧縮部202、252を個別に設けるのではなく、共通の圧縮部を設けるように構成しても構わない。   Next, raster image data compression processing, which is a feature of the present invention, will be described in detail. In this embodiment, the compression unit 252 compresses a raster image generated from PDL data, and the compression unit 202 compresses a raster image obtained by scanning. However, the present invention is not limited to this configuration. . For example, instead of separately providing the compression units 202 and 252 as shown in FIG. 2, a common compression unit may be provided.

本実施形態では、まずページ単位のラスタ画像データを、2×2画素単位のブロック毎に分割し、分割して抽出されたブロックを単位にデータの圧縮処理を行う。ここで、圧縮処理を説明する前に、2×2の4画素データの中に占める色数に応じて、その組み合わせの場合の数を考える。この場合、画素数が4画素なので、そこに占める色数は最大4色になり、ブロック内で高々1色〜4色の組み合わせしか存在しない。その4色のパターンの取り得る組み合わせの場合の数を図3に示す。   In this embodiment, first, raster image data in units of pages is divided into blocks of 2 × 2 pixels, and data compression processing is performed in units of blocks extracted by division. Here, before explaining the compression processing, the number of combinations is considered according to the number of colors occupied in 2 × 2 4-pixel data. In this case, since the number of pixels is four, the number of colors occupied therein is a maximum of four colors, and there are at most combinations of one to four colors in the block. FIG. 3 shows the number of combinations of the four color patterns.

まず、ブロック内が1色の場合、4画素が同色で構成されていることになるので、その組み合わせは1通りである。次に、ブロック内が2色の場合を考える。図3に示すように、2色が4画素内にレイアウトされる場合の組み合わせの数は、所定位置の画素(本実施例では左上の画素とする)の色を第1色(代表色)とし、その第1色と異なる色を第2色として考える。すると、左上画素以外の残りの3画素へ第1色もしくは第2色が入るので、4画素同色の場合を除くと、全部で7通りの組み合わせが考えられる。   First, in the case of one color in the block, four pixels are configured in the same color, so there are only one combination. Next, consider the case where the block has two colors. As shown in FIG. 3, the number of combinations when two colors are laid out in four pixels is that the color of a pixel at a predetermined position (in this embodiment, the upper left pixel) is the first color (representative color). A color different from the first color is considered as the second color. Then, since the first color or the second color enters the remaining three pixels other than the upper left pixel, a total of seven combinations can be considered except for the case where the four pixels have the same color.

次に、ブロック内が3色の場合を考える。3色が4画素内にレイアウトされる場合の数は、3色のうち1色だけ2度使われる場合の数と言い換えることが可能であり、4画素の座標のうち、2画素が同じ色になる場合の数を求めれば良い。つまり、3色の場合の数は、4つの座から2つの座標を取る組み合わせとなり、全部で6通りとなる。そして最後に、ブロック内が4色で構成される場合は1通りしか存在しない。   Next, consider the case where the block has three colors. The number of three colors laid out in four pixels can be rephrased as the number of only one of the three colors used twice. Of the four pixel coordinates, two pixels have the same color. What is necessary is just to obtain | require the number of cases. That is, the number in the case of three colors is a combination of taking two coordinates from four seats, and there are six ways in total. Finally, when the block is composed of four colors, there is only one.

1色〜4色の全ての場合の数を合計すると、全部で15通りのパターンが考えられる。また、これら全てのパターンを識別するためにフラグ(識別子)を付与することを考えると、フラグのデータ量としては4ビット必要となる。この15通りのパターンとフラグとの関係を図4に示すように定義し、以下、このフラグを「パターンフラグ」と呼ぶ。   When the numbers in all cases of 1 to 4 colors are summed, a total of 15 patterns can be considered. Further, considering that a flag (identifier) is added to identify all these patterns, 4 bits are required as the data amount of the flag. The relationship between these 15 patterns and flags is defined as shown in FIG. 4, and this flag is hereinafter referred to as a “pattern flag”.

前述したように、特願2009−221444で提案している技術では、画像データを2×2画素サイズのブロックに分割し、当該分割された各ブロックに含まれる色データの配置パターン情報をこの15通りのパターンフラグ(4bit)を用いて出力する。更に各ブロックに含まれる色数分の色データ情報を、ブロックにおける予め決められた位置の画素(例えば左上の画素)に対応する色の情報(第1の色データ情報)と、それ以外の色データ情報(第2〜4の色データ情報(補間データ情報))とに分けて出力する。そして、画像データ内の各ブロックから出力された配置パターン情報と、第1の色データ情報と、第2〜4の色データ情報とをそれぞれ異なるメモリ領域に纏めて格納する。   As described above, in the technique proposed in Japanese Patent Application No. 2009-212444, the image data is divided into blocks of 2 × 2 pixel size, and the arrangement pattern information of the color data included in each of the divided blocks is the 15 Output using a street pattern flag (4 bits). Further, the color data information for the number of colors included in each block includes color information (first color data information) corresponding to a pixel at a predetermined position in the block (for example, the upper left pixel), and other colors. The data information (second to fourth color data information (interpolation data information)) is output separately. Then, the arrangement pattern information output from each block in the image data, the first color data information, and the second to fourth color data information are stored together in different memory areas.

一方、MFPが実際に扱うことの多い文書画像などの場合、2×2画素ブロック単位では、殆どのブロックが2色以内で構成されることが多い。そこで、本実施形態では、タイル(64×64画素)内が3色以内で且つその中の2×2画素ブロック全てが2色以内で構成されているタイルに適した圧縮方法について説明する。尚、画像データを64×64画素サイズのタイルに分割し、当該分割されたタイルごとに、当該タイル内が3色以内で且つその中の2×2画素ブロック全てが2色以内で構成されているか判別する。その判別結果に応じてタイル毎に圧縮処理を切り替えるように構成するのが望ましい。すなわち、タイル内が3色以内で且つその中の2×2画素ブロック全てが2色以内で構成されている場合は後述する圧縮手法で圧縮し、そうでなければ、上述した特願2009−221444で提案している圧縮手法で圧縮するよう構成するのが望ましい。   On the other hand, in the case of a document image or the like that is often handled by the MFP, most blocks are often composed of two colors or less in a 2 × 2 pixel block unit. Therefore, in the present embodiment, a compression method suitable for tiles in which tiles (64 × 64 pixels) are within 3 colors and all 2 × 2 pixel blocks in the tiles are within 2 colors will be described. Note that the image data is divided into 64 × 64 pixel size tiles, and for each of the divided tiles, the tile is composed of 3 colors or less and all 2 × 2 pixel blocks in the tile are composed of 2 colors or less. Determine if it is. It is desirable that the compression process is switched for each tile according to the determination result. That is, if the tile has 3 colors or less and all 2 × 2 pixel blocks in the tile are composed of 2 colors or less, the tile is compressed by the compression method described later. Otherwise, the above-mentioned Japanese Patent Application No. 2009-212444 is described. It is desirable to perform the compression using the compression method proposed in the above.

次に、タイル内が3色以内で且つその中の2×2画素ブロックの全てが2色以内で構成されている場合に適した本実施形態の圧縮方式について説明する。2×2画素ブロックにおいて、色数が2色までのパターンで取り得る組み合わせは、図3に示す全画素同色の1通りと、2色の7通りの合計8通りである。これら8通りの配置パターンを表現するパターンフラグは、図4に示すように0〜7までの8種類のみであるため、3ビットのフラグ識別することが可能である。   Next, a description will be given of a compression method according to the present embodiment, which is suitable when a tile has three colors or less and all 2 × 2 pixel blocks in the tile are configured by two colors or less. In the 2 × 2 pixel block, there are eight possible combinations of patterns of up to two colors, one for all pixels of the same color shown in FIG. 3 and seven for two colors. Since there are only 8 types of pattern flags representing 0 to 7 as shown in FIG. 4, the 8-bit pattern patterns can be identified as 3-bit flags.

ここで、2色までで構成される2×2画素ブロックが取り得る色の配置パターンの一部を図5の(A)に示す。図5の(A)において、各イメージに対するパターンフラグ、代表色(第1色)、補間色(第2色)の関係を示している。図5の(A)において、黒丸印の位置(左上の画素)の色が代表色(第1色)を示している。   Here, FIG. 5A shows a part of an arrangement pattern of colors that can be taken by a 2 × 2 pixel block composed of up to two colors. FIG. 5A shows the relationship among the pattern flag, representative color (first color), and interpolation color (second color) for each image. In FIG. 5A, the color of the black circle position (the upper left pixel) indicates the representative color (first color).

本実施形態では、画像メモリバスへ転送する際に、予め定められた画素数(64×64画素)のブロックを単位(以下「タイル単位」と呼ぶ。)とし、タイル単位において構成される色数は3色までとする。この例の代表色と補間色との関係を図5の(B)に示す。すなわち、64×64のタイル内に存在する色数が3色以内、且つ、2×2のブロック内に存在する色数が2色以内であったとする。このとき、図5の(B)に示すように、代表色がタイル内の3色のうちのいずれかであるので、代表色以外で取り得る補間色は残りの2色のうちのいずれかである。したがって、2×2画素のブロック内における代表色を特定できれば、補間色が残り2色のいずれであるかを識別するための補間色選択ビット(1bit)を設けることで、当該2×2画素のブロック内における補間色を選択することが可能である。   In the present embodiment, when transferring to the image memory bus, a block having a predetermined number of pixels (64 × 64 pixels) is used as a unit (hereinafter referred to as “tile unit”), and the number of colors configured in the tile unit. Is limited to 3 colors. The relationship between the representative color and the interpolation color in this example is shown in FIG. That is, it is assumed that the number of colors existing in the 64 × 64 tile is within 3 colors and the number of colors existing in the 2 × 2 block is within 2 colors. At this time, as shown in FIG. 5B, since the representative color is one of the three colors in the tile, interpolation colors other than the representative color can be any one of the remaining two colors. is there. Therefore, if a representative color in a block of 2 × 2 pixels can be specified, an interpolation color selection bit (1 bit) for identifying which of the remaining two interpolation colors is provided, so that the 2 × 2 pixel can be identified. It is possible to select the interpolation color within the block.

3ビットのパターンフラグ(2色以内の配置パターンを特定するための第1のパターン情報)と、1ビットの補間色選択ビット(選択情報)と、各ブロックの代表色と、タイル内の3色とを使用して表現される色パターンの一部を図5の(C)に示す。このように、タイル内の色数が3色で且つ2×2画素ブロック内の色数が2色以内の場合、3ビットのパターンフラグと補間色選択ビットと各ブロックの代表色の色データと当該タイル内の3色の色データとを保持すれば、各ブロックの色の配置を特定できる。すなわち、ブロック毎に補間色(第2色)の色データを保持しておかなくても、補間色選択ビットを参照することにより、タイル内の3色の色データ中から補間色を特定することができるようになる。補間色選択ビットの詳細については図15を用いて後述する。   A 3-bit pattern flag (first pattern information for specifying an arrangement pattern within two colors), a 1-bit interpolation color selection bit (selection information), a representative color of each block, and the three colors in the tile A part of the color pattern expressed by using and is shown in FIG. As described above, when the number of colors in the tile is 3 colors and the number of colors in the 2 × 2 pixel block is within 2 colors, the 3-bit pattern flag, the interpolation color selection bit, the color data of the representative color of each block, If the color data of the three colors in the tile is held, the color arrangement of each block can be specified. That is, even if the color data of the interpolation color (second color) is not held for each block, the interpolation color is specified from the color data of the three colors in the tile by referring to the interpolation color selection bit. Will be able to. Details of the interpolation color selection bit will be described later with reference to FIG.

[パケット生成]
本実施形態における画像処理装置は、ラスタ画像データの圧縮処理のランダムアクセスを高めるために、ラスタ画像データを64×64画素サイズのタイル単位で切り出し、圧縮して画像メモリバスへ転送する。
[Packet generation]
The image processing apparatus according to the present embodiment cuts raster image data in units of 64 × 64 pixel size tiles, compresses them, and transfers them to the image memory bus in order to enhance random access in raster image data compression processing.

圧縮部202、252で実行されるパケット生成方法の詳細を、図6を用いて説明する。まず、図7に示すページ単位にラスタ画像データを入力する(S601)。そして、画像データのページ単位に1画素のページ背景画素を設定する(S602)。これは、圧縮処理時の初期記憶ブロックとして用いるための画素データで、通常は白(RGB各色8ビット画像であれば255、CMYK画像であれば0)が用いられる。次に、圧縮部202、252の入力となる画像データを所定の大きさ(64×64画素)のタイル単位に分割し、未処理のタイルの1つを処理対象にする(S603)。この例では、1つのタイルの中には、2×2画素ブロックが32×32個存在することになる。図7は、1ページと64×64画素のタイルと2×2画素のブロックとの関係を示す図である。   Details of the packet generation method executed by the compression units 202 and 252 will be described with reference to FIG. First, raster image data is input for each page shown in FIG. 7 (S601). Then, one page background pixel is set for each page of image data (S602). This is pixel data to be used as an initial storage block at the time of compression processing, and normally white (255 for 8-bit RGB color images and 0 for CMYK images) is normally used. Next, the image data to be input to the compression units 202 and 252 is divided into tile units of a predetermined size (64 × 64 pixels), and one unprocessed tile is set as a processing target (S603). In this example, there are 32 × 32 2 × 2 pixel blocks in one tile. FIG. 7 is a diagram illustrating the relationship between one page, a 64 × 64 pixel tile, and a 2 × 2 pixel block.

次に、処理対象のタイルに所定の固定長のヘッダ情報を付与する(S604)。このヘッダ情報は、ページID、タイル座標、色空間、画素データのビット数、タイルのデータサイズ、属性情報の有無、圧縮フラグ等の情報である。ここで、ページIDは、ページ単位に付与されるユニークなID番号である。タイル座標は、このタイルがページ単位のラスタ画像上どの位置にあるかを示す座標情報である。図7に示すようにタイル座標は、X座標及びY座標を用いて記述される。色空間は、このタイルが、RGB画像なのかCMYK画像なのかGRAY−SCALE画像なのかを識別するための識別子を示す情報である。画素データのビット数は、タイル内の1画素当たりのビット長を示す情報である。データサイズは、このタイルの第1色のデータサイズと第2、3、4色のデータのデータサイズとを示すバイト単位の情報である。属性情報の有無は、画像データに文字や写真といった属性情報が画素単位で付与されているか否かを示す情報である。圧縮フラグは、このタイルが圧縮されたデータか、非圧縮のデータかを示すフラグの情報であり、後述するS607,S609で設定される。   Next, predetermined fixed-length header information is added to the tile to be processed (S604). This header information is information such as page ID, tile coordinates, color space, number of bits of pixel data, tile data size, presence / absence of attribute information, and compression flag. Here, the page ID is a unique ID number assigned to each page. The tile coordinate is coordinate information indicating where the tile is located on the raster image in page units. As shown in FIG. 7, the tile coordinates are described using X coordinates and Y coordinates. The color space is information indicating an identifier for identifying whether the tile is an RGB image, a CMYK image, or a GRAY-SCALE image. The number of bits of pixel data is information indicating the bit length per pixel in the tile. The data size is information in byte units indicating the data size of the first color of the tile and the data size of the second, third, and fourth color data. The presence / absence of attribute information is information indicating whether or not attribute information such as characters and photographs is added to the image data in units of pixels. The compression flag is flag information indicating whether the tile is compressed data or non-compressed data, and is set in S607 and S609 described later.

次に、上述のタイル単位に圧縮処理を適用する(S605)。この圧縮処理の詳細は後述する。   Next, the compression process is applied to each tile described above (S605). Details of this compression processing will be described later.

次に、圧縮処理されたタイルデータのデータサイズを算出する。これはパターンフラグサイズ、第1色データサイズ、第2、3、4色データサイズの合計になる。パターンフラグを必ず付与するので、必ずしもオリジナルの画像データよりデータサイズが圧縮される保証はない。そのため、もし圧縮処理後のタイルデータのデータサイズがオリジナルのタイルデータのデータサイズを超えてしまった場合には、オリジナルの画像データを出力する方がトータルとしてメモリ効率が良い。従って、圧縮処理後のデータサイズとオリジナルのデータサイズとを比較し(S606)、オリジナルのデータサイズを超えていれば、ヘッダの圧縮フラグを“0”にセットし(S607)、超えていなければ圧縮フラグを“1”にセットする(S609)。   Next, the data size of the compressed tile data is calculated. This is the sum of the pattern flag size, the first color data size, the second, third, and fourth color data sizes. Since the pattern flag is always given, there is no guarantee that the data size is compressed compared to the original image data. For this reason, if the data size of the tile data after the compression processing exceeds the data size of the original tile data, it is better to output the original image data in terms of overall memory efficiency. Therefore, the data size after the compression process is compared with the original data size (S606), and if the original data size is exceeded, the header compression flag is set to “0” (S607). The compression flag is set to “1” (S609).

そして、上述の比較の結果を受けて圧縮されたタイルデータ若しくはオリジナルのタイルデータを、当該タイルのヘッダ情報と一緒に1つのデータにパッキングする(S608、S610)。このパッキングされたデータのデータ構造を図8に示す。これ以降、上述のヘッダを含むデータの単位を「パケット」と呼ぶ。このようなパケットにするには、タイル単位で圧縮処理が終了し、データサイズが確定した後、第1色格納部と第2、3、4色格納部の間を詰めた状態でデータをパッキングする。その後、DMACを経由してメモリ上へ出力する(S611)。次に、このパケットの座標とサイズとをリストとして列挙し、パケット管理テーブルとして作成する(S612)。このパケット管理テーブルの一例を図9に示す。上述の処理を最後のタイルまで繰り返すことで(S613でYES)、ページ単位のラスタ画像の圧縮処理を終了する。   Then, the tile data compressed in response to the result of the comparison or the original tile data is packed into one data together with the header information of the tile (S608, S610). The data structure of the packed data is shown in FIG. Hereinafter, a unit of data including the above-described header is referred to as a “packet”. In order to make such a packet, after the compression process is completed for each tile and the data size is determined, the data is packed with the space between the first color storage unit and the second, third, and fourth color storage units packed. To do. Thereafter, the data is output to the memory via the DMAC (S611). Next, the coordinates and sizes of the packets are listed as a list and created as a packet management table (S612). An example of this packet management table is shown in FIG. By repeating the above-described processing up to the last tile (YES in S613), the compression processing of the raster image for each page is completed.

尚、上述のタイル単位でパケットデータをメモリへ書き出すと、図10に示すように、パケット毎にサイズが異なり、それぞれのパケットの先頭アドレスが飛び飛びになる。そのため、図9に示すパケット管理テーブルを用いて任意の座標のパケットの先頭アドレスを探索する。従って、先頭パケットの書き込みアドレスが既知であれば、パケット管理テーブルに記載されている座標までのデータサイズをオフセットとして任意のパケットの先頭アドレスを求めることが可能になる。例えば、図10に示す第3パケットを読み込む場合は、第1、第2パケットのサイズ合計をパケット管理テーブルより求め、先頭パケットのアドレスに対してオフセットをかけることで第3パケットアドレスを算出する。そして、そこからデータを読み込むことで第3パケットのデータを取得することが可能になる。   When packet data is written to the memory in units of tiles as described above, as shown in FIG. 10, the size differs for each packet, and the leading address of each packet is skipped. Therefore, the start address of a packet at an arbitrary coordinate is searched using the packet management table shown in FIG. Therefore, if the write address of the head packet is known, the head address of an arbitrary packet can be obtained using the data size up to the coordinates described in the packet management table as an offset. For example, when the third packet shown in FIG. 10 is read, the total size of the first and second packets is obtained from the packet management table, and the third packet address is calculated by applying an offset to the address of the head packet. And it becomes possible to acquire the data of a 3rd packet by reading data from there.

このように、タイル単位に任意のデータへのアクセスが可能になるので、画像の部分的な処理が可能になる。例えば、画像の一部の領域を抽出して処理したい場合は、当該領域に対応するパケットのデータを取得して処理すれば良い。   As described above, since arbitrary data can be accessed in tile units, partial processing of an image becomes possible. For example, when it is desired to extract and process a partial area of an image, it is only necessary to acquire and process packet data corresponding to the area.

上述した圧縮処理に対して、展開部222、232で実行される展開処理は、パケット毎にヘッダが付与されているので、各ヘッダに記載されている情報を用いて処理される。まず、圧縮フラグが非圧縮を示している場合には、ヘッダを取り除いたデータを出力し、圧縮を示している場合には、展開処理を行う。展開処理では、ヘッダよりパターンフラグ格納位置、第1色のデータ格納位置、及び第2、3、4色格納位置を求め、後は順次前述した実施形態と同様に、タイルの画像データへ展開する。   In contrast to the compression processing described above, the decompression processing executed by the decompression units 222 and 232 is processed using information described in each header because a header is assigned to each packet. First, when the compression flag indicates non-compression, the data from which the header has been removed is output, and when the compression flag indicates compression, decompression processing is performed. In the expansion process, the pattern flag storage position, the first color data storage position, and the second, third, and fourth color storage positions are obtained from the header, and the subsequent processing is sequentially expanded into tile image data as in the above-described embodiment. .

例えば、パターンフラグの位置は固定長のヘッダなので、オフセットすることで求めることができる。第1色のデータは、タイルのサイズが64×64画素であれば、パターンフラグのサイズが64×64ビットで固定になり、パターンフラグ位置からオフセットを掛けることで求める。第2、3、4色のデータは、ヘッダに記載されている第1色サイズを参照し、第1色のデータ位置からオフセットを掛けることで求める。   For example, since the position of the pattern flag is a fixed-length header, it can be obtained by offsetting. If the tile size is 64 × 64 pixels, the size of the pattern flag is fixed at 64 × 64 bits, and the first color data is obtained by applying an offset from the pattern flag position. The second, third, and fourth color data are obtained by referring to the first color size described in the header and applying an offset from the data position of the first color.

[圧縮処理]
次に、上述したステップS605の圧縮処理の詳細について、図11〜図13を用いて説明する。図12は、ステップS605の圧縮処理を実行する圧縮部202(又は252)内の構成を示すブロック図である。
[Compression processing]
Next, details of the compression processing in step S605 described above will be described with reference to FIGS. FIG. 12 is a block diagram illustrating a configuration in the compression unit 202 (or 252) that executes the compression processing in step S605.

圧縮部202、252は、まず入力された64×64画素サイズのタイル画像をタイルバッファ1201に格納する。ピース抽出部1202がタイルバッファ1201に格納されたタイル画像から、2×2画素単位のブロック画像(以下、2×2画素のブロックをピースと呼ぶ)を切り出す。そして、インデックス生成部1203が、切り出された各ピース内の各画素の色データを比較することにより、図4を用いて説明したように、当該各ピースに含まれる色データの配置パターンを示すパターンフラグ(4ビット)を特定する。ここで、パターンフラグ(4ビット)を第2のパターン情報とも呼ぶ。   The compression units 202 and 252 first store the input tile image of 64 × 64 pixel size in the tile buffer 1201. The piece extracting unit 1202 cuts out a 2 × 2 pixel unit block image (hereinafter, a 2 × 2 pixel block is referred to as a piece) from the tile image stored in the tile buffer 1201. Then, the index generation unit 1203 compares the color data of each pixel in each cut out piece, and as described with reference to FIG. 4, the pattern indicating the arrangement pattern of the color data included in each piece Specify the flag (4 bits). Here, the pattern flag (4 bits) is also referred to as second pattern information.

パターンフラグ(4ビット)は、図4に示す全部で15通りのパターンが存在し、それぞれのパターンと比較することにより特定される。そして、ピースの予め決められた位置(例えば左上)の画素に対応する色データを第1色の色データ情報として抽出する。更に、当該ピースに含まれる色数が2〜4のいずれかであると判断した場合は、当該特定されたパターンフラグで定義されている配置パターンに対応する第2色の色データ情報〜第4色の色データ情報を抽出する。   The pattern flag (4 bits) has a total of 15 patterns shown in FIG. 4, and is specified by comparing with each pattern. Then, color data corresponding to a pixel at a predetermined position (for example, upper left) of the piece is extracted as color data information of the first color. Further, when it is determined that the number of colors included in the piece is any one of 2 to 4, the second color data information to the fourth color corresponding to the arrangement pattern defined by the specified pattern flag. Extract color data information of the color.

このようにして抽出された各ピースに含まれる色数分の色データ情報を、ブロックにおける予め決められた位置(例えば左上)の画素に対応する第1色の色データ情報と、それ以外の第2色〜第4色の色データ情報とに分けて出力する。第1色の色データ情報を代表色と呼び、また第2色の色データ情報〜第4色の色データ情報を補間色と呼ぶ。   The color data information corresponding to the number of colors included in each piece extracted in this way is used as color data information of the first color corresponding to the pixel at a predetermined position (for example, upper left) in the block, and the other color data information. The data is output separately for the color data information of the second color to the fourth color. The color data information of the first color is called a representative color, and the color data information of the second color to the color data of the fourth color is called an interpolation color.

尚、本実施形態において、各ピースにおける色データの配置を特定するための情報をインデックスと呼ぶこととし、インデックス生成部1203は、この時点では上述したように4ビットのパターンフラグをインデックスとして出力するものとする。   In this embodiment, information for specifying the arrangement of color data in each piece is called an index, and the index generation unit 1203 outputs a 4-bit pattern flag as an index at this point as described above. Shall.

インデックス生成部1203で生成されたインデックス、代表色、及び補間色のデータは、パケット生成部1208と、構成色数判定手段1204とに読み込まれる。パケット生成部1208では、インデックス生成部1203で各ピースから出力されるインデックス、代表色、補間色の情報とを、パケットバッファ1209内のそれぞれ異なるメモリ領域に纏めて格納する。更に、ページID、タイル座標、タイル/パケットのデータサイズ、圧縮フラグ等の情報を含むヘッダ情報を付加することにより、パケットデータを生成する。一方、構成色数判定部1204では、インデックス、代表色、補間色の情報の情報に基づいて、処理対象のタイル画像内が3色以内で且つ当該タイル画像を構成するピース(2×2画素ブロック)全てが2色以内で構成されているか判定する。そして、構成色数判定部1204でそのように構成されていると判定した場合は、ヘッダ修正部1210と補間色置換部1211とインデックス書換部1212が、パケット生成部1208で生成したパケットデータを修正する。詳細は後述する。   The index, representative color, and interpolation color data generated by the index generation unit 1203 is read by the packet generation unit 1208 and the constituent color number determination unit 1204. The packet generation unit 1208 collectively stores the index, representative color, and interpolation color information output from each piece by the index generation unit 1203 in different memory areas in the packet buffer 1209. Furthermore, packet data is generated by adding header information including information such as page ID, tile coordinates, tile / packet data size, and compression flag. On the other hand, the constituent color number determination unit 1204 has a tile (2 × 2 pixel block) within three tiles within the tile image to be processed based on the information on the index, representative color, and interpolation color information, and constituting the tile image. ) It is determined whether or not everything is composed of two colors or less. If the configuration color number determination unit 1204 determines that such a configuration is made, the header correction unit 1210, the interpolation color replacement unit 1211, and the index rewrite unit 1212 correct the packet data generated by the packet generation unit 1208. To do. Details will be described later.

次に、構成色数判定部1204において実行される構成色数判定処理について、図11を用いて説明する。構成色数判定処理では、前述の構成色数(タイル内3色以下、且つブロック全てが2色以内)のタイル画像であるか否かの判定及び当該タイル画像を構成する3色分以下の色データをバッファに格納する処理を行う。この判定において、該当しないタイルの場合は、構成色オーバー検出信号“1”を生成する。   Next, the configuration color number determination process executed in the configuration color number determination unit 1204 will be described with reference to FIG. In the component color number determination process, it is determined whether the tile image has the above-described number of component colors (three colors or less in the tile and all the blocks are within two colors) and the color corresponding to three or less colors constituting the tile image. Performs processing to store data in the buffer. In this determination, if the tile does not correspond, the component color over detection signal “1” is generated.

まず、前述したように、構成色数判定部1204は、インデックス生成部1203で生成されたインデックス、代表色、及び補間色のデータを読み込む(S1101)。次に、構成色数判定部1204が2×2画素ブロック(ピース)の1つを着目ピースとし、読み込んだインデックスを参照して、当該着目したピースを構成する色の配置情報を解析し、色数を調べる(S1102)。インデックスは図4に示されるパターンフラグ(4ビット)値で表現されるので、パターンフラグ値が“0”の場合は、構成色数は1色であり、パターンフラグ値が“1〜7のいずれか”の場合は、構成色数は2色である。またパターンフラグ値が“8〜Dのいずれか”の場合は、構成色数は3色であり、パターンフラグ値が“E”の場合は、構成色数は4色であることを示している。   First, as described above, the constituent color number determination unit 1204 reads the index, representative color, and interpolation color data generated by the index generation unit 1203 (S1101). Next, the constituent color number determination unit 1204 uses one of the 2 × 2 pixel blocks (pieces) as a target piece, refers to the read index, analyzes the arrangement information of the colors constituting the target piece, The number is checked (S1102). Since the index is represented by the pattern flag (4 bits) value shown in FIG. 4, when the pattern flag value is “0”, the number of constituent colors is one and the pattern flag value is any of “1-7”. In the case of "", the number of constituent colors is two. When the pattern flag value is “any of 8 to D”, the number of constituent colors is three, and when the pattern flag value is “E”, the number of constituent colors is four. .

まず構成色数が1色であるか否かを判定する(S1103)。判定の結果、1色の場合(パターンフラグ値が“0”)、代表色の1色のみで2×2画素ブロックが表現され補間データは無いので、置換補間色バッファ1205〜1207への書き込みを行わずに、S1116へ進み、それ以外の場合はS1104へ進む。   First, it is determined whether or not the number of constituent colors is one (S1103). As a result of the determination, in the case of one color (the pattern flag value is “0”), the 2 × 2 pixel block is represented by only one representative color and there is no interpolation data, so writing to the replacement interpolation color buffers 1205 to 1207 is performed. If not, the process proceeds to S1116. Otherwise, the process proceeds to S1104.

次に、構成色数が2色であるか3〜4色であるかを判定する(S1104)。ここで、2色の場合(パターンフラグ値が“1”〜“7”の場合)はS1105へ進み、2×2画素ブロックを構成する色数が3又は4色である場合(パターンフラグ値が8〜Eの場合)は、S1117へ進む。2色と判定された場合には、2色の色データを格納するために、置換補間色バッファ1205〜1207に空きが2つ以上あるか否かを判定する(S1105)。置換補間色バッファ1205〜1207の空き情報は、図14に示されるような置換補間色バッファ1〜3空きフラグテーブルによって管理される。デフォルト時、各置換補間色バッファ1205〜1207は、全て空き状態である為、置換補間色バッファ1〜3空きフラグには、空き状態を示す“1”がセットされる。S1105において、置換補間色バッファ1〜3空きフラグが“1”である数を計数し、合計が2以上であれば、バッファ空き数が2以上あると判断して、S1106へ進み、それ以外の場合にはS1107へ進む。そして、2つ分の空きが存在する場合、代表色と補間色を置換補間色バッファ1205〜1207の空いているバッファにそれぞれ書き込む。そして書き込んだバッファに対応する空きフラグに“0”をセットする。(S1106)。   Next, it is determined whether the number of constituent colors is 2 or 3 to 4 (S1104). Here, in the case of two colors (when the pattern flag value is “1” to “7”), the process proceeds to S1105, and when the number of colors constituting the 2 × 2 pixel block is three or four (the pattern flag value is In the case of 8 to E), the process proceeds to S1117. If it is determined that there are two colors, it is determined whether or not there are two or more empty spaces in the replacement interpolation color buffers 1205 to 1207 in order to store the color data of the two colors (S1105). The empty information of the replacement interpolation color buffers 1205 to 1207 is managed by a replacement interpolation color buffer 1 to 3 empty flag table as shown in FIG. Since the replacement interpolation color buffers 1205 to 1207 are all empty at the time of default, “1” indicating the empty state is set in the replacement interpolation color buffers 1 to 3 empty flags. In S1105, the number of replacement interpolation color buffer 1 to 3 empty flags being “1” is counted. If the total is 2 or more, it is determined that the buffer empty number is 2 or more, and the process proceeds to S1106. In the case, the process proceeds to S1107. If there are two empty spaces, the representative color and the interpolation color are written in the empty buffers of the replacement interpolation color buffers 1205 to 1207, respectively. Then, “0” is set in the empty flag corresponding to the written buffer. (S1106).

また、2つ以上の空きが存在しない場合には、1つ分の空きがあるか否かを判定する(S1107)。S1105における置換補間色バッファ1〜3空きフラグが“1”である数を計数した合計が1であれば、1つ分の空きがあると判断してS1108へ進み、それ以外の場合にはS1113へ進む。1つ分の空きが存在する場合には、バッファ済みの2つの補間色データを置換補間色バッファ1205〜1207より読み出す(S1108)。次に、読み出した2つの補間色データの画素値と、着目中ブロックの2色のデータ(代表色と補間色)の画素値とを比較する(S1109)。そして、2色とも読み出した補間色データと一致しているか否かを判定する(S1110)。一致している場合には、既に2色ともバッファに書き込み済みであるため、空きバッファへの書き込みは不要と判断してS1116へ進み、一致していない場合にはS1111へ進む。   If two or more vacancies do not exist, it is determined whether there is one vacancy (S1107). If the total obtained by counting the number of replacement interpolation color buffers 1 to 3 in the S1105 empty flag being “1” is 1, it is determined that there is one empty space, and the process proceeds to S1108. Otherwise, S1113 is performed. Proceed to If there is one free space, two buffered interpolation color data are read from the replacement interpolation color buffers 1205 to 1207 (S1108). Next, the pixel values of the read two interpolation color data are compared with the pixel values of the two color data (representative color and interpolation color) of the block of interest (S1109). Then, it is determined whether or not the two colors match the read interpolation color data (S1110). If they match, since both colors have already been written to the buffer, it is determined that writing to the empty buffer is unnecessary, and the process proceeds to S1116. If they do not match, the process proceeds to S1111.

また、2色とも一致していない場合には、どちらか1色のみ一致しているか否かを判定する(S1111)。1色のみ一致している場合には、一致していない方の色データを空いているバッファへ書き込む(S1112)。そして書き込んだバッファに対応する空きフラグに“0”をセットする。一方、1色も一致していない場合には、置換補間色バッファ1205〜1207に格納されている2色分のデータ以外の色が、着目している2×2画素ブロック内に2色存在していることを示している。つまりタイルの構成色数が4色以上であり、補間色置き換え処理の対象外のタイルであることを示している為、S1117へ進む。   If the two colors do not match, it is determined whether only one of the colors matches (S1111). If only one color matches, the color data that does not match is written to an empty buffer (S1112). Then, “0” is set in the empty flag corresponding to the written buffer. On the other hand, if none of the colors match, there are two colors other than the data for the two colors stored in the replacement interpolation color buffers 1205 to 1207 in the 2 × 2 pixel block of interest. It shows that. That is, since the number of constituent colors of the tile is four or more and indicates that the tile is not subject to interpolation color replacement processing, the process advances to step S1117.

S1107で、置換補間色バッファの空きが全くない場合には、バッファ済みの3つの補間色データを置換補間色バッファ1205〜1207より読み出す(S1113)。そして、読み出した3つの補間色データの画素値と、着目中ブロックの2色のデータ(代表色と補間色)の画素値とを比較する(S1114)。ブロックの2色ともが、読み出した補間色データのいずれかと一致しているか否かを判定する(S1115)。判定した結果、一致している場合には、既に2色ともバッファに書き込み済みであるため、バッファへの書き込みは不要と判断してS1116へ進む。一方、一致していない場合には、置換補間色バッファ1205〜1207に格納されている3色分のデータ以外の色が、着目している2×2画素ブロック内に存在していることを示している。つまり、タイルの構成色数が4色以上であり、補間色置き換え処理の対象外のタイルであることを示しているため、S1117へ進む。S1117では、着目する2×2画素ブロックの構成色数が3色もしくは4色(S1304で“NO”)、もしくは着目するタイルの構成色数が4色以上(S1111又はS1115で“NO”)と前ステップで判定される。つまり、補間色置き換え処理の対象外のタイルであるとの判断を行う。この場合、構成色数判定手段1204は、構成色数オーバーと判定してヘッダ修正部1210、補間色置換部1211、インデックス変換部1212に通知する(S1117)。   If there is no free space for the replacement interpolation color buffer in S1107, the buffered three pieces of interpolation color data are read from the replacement interpolation color buffers 1205-1207 (S1113). Then, the read pixel values of the three interpolation color data are compared with the pixel values of the two color data (representative color and interpolation color) of the block of interest (S1114). It is determined whether or not the two colors of the block match any of the read interpolation color data (S1115). As a result of the determination, if they match, since both colors have already been written to the buffer, it is determined that writing to the buffer is unnecessary, and the process proceeds to S1116. On the other hand, if they do not match, it indicates that colors other than the data for the three colors stored in the replacement interpolation color buffers 1205 to 1207 exist in the focused 2 × 2 pixel block. ing. That is, since the number of constituent colors of the tile is four or more and indicates that the tile is not subject to interpolation color replacement processing, the process advances to step S1117. In S1117, the number of constituent colors of the 2 × 2 pixel block of interest is 3 or 4 (“NO” in S1304), or the number of constituent colors of the tile of interest is 4 or more (“NO” in S1111 or S1115). Determined in the previous step. That is, it is determined that the tile is not subject to interpolation color replacement processing. In this case, the configuration color number determination unit 1204 determines that the configuration color number is over and notifies the header correction unit 1210, the interpolation color replacement unit 1211, and the index conversion unit 1212 (S1117).

上述の処理をタイル内の最後のピースまで繰り返し行ったか判定し(S1116)、まだ着目していないピースがあれば、当該ピースを処理対象としてS1102の処理に戻る。一方、全ピースに対する判定が終了したと判定した場合は、補間色置換処理対象のタイルであると判定する。すなわち、タイル画像内が3色以内で且つその中のピース(2×2画素ブロック)全てが2色以内で構成されていれば、S1116でYESと判定されることになる。尚、ページ画像を構成する各タイルごとに図11の処理が行われる。   It is determined whether the above-described processing has been repeated up to the last piece in the tile (S1116), and if there is a piece that has not been focused on yet, the processing returns to S1102 with the piece as a processing target. On the other hand, when it is determined that the determination for all pieces has been completed, it is determined that the tile is the interpolation color replacement target tile. That is, if the tile image is within 3 colors and all of the pieces (2 × 2 pixel blocks) are within 2 colors, YES is determined in S1116. The process shown in FIG. 11 is performed for each tile constituting the page image.

尚、タイル画像内のピース全てが2色以内で構成され、且つ2色のピース全てにおける色の種類がタイル内で3色以内である場合もS1116でYESと判定される。これは、1色で構成されているピースの代表色が2色で構成されているピースの色と異なっていてもよいことになる。そのような条件を満たす画像の場合も本発明を適用することは可能である。但し、その異なる色の画素の位置が1色のピースの位置に合致している必要があるため、そのような条件を満たす画像が出現することは稀である。したがって、S1116でYESと判定される大抵のタイル画像は、タイル画像内が3色以内で且つその中のピース全てが2色以内で構成されているものになる。   Note that if all pieces in the tile image are configured with two or less colors and the color types of all the two color pieces are within three colors in the tile, YES is determined in S1116. This means that the representative color of a piece composed of one color may be different from the color of a piece composed of two colors. The present invention can also be applied to an image that satisfies such conditions. However, since the position of the pixel of the different color needs to match the position of the piece of one color, an image satisfying such a condition rarely appears. Therefore, most tile images determined as YES in S1116 are those in which the tile image is composed of three colors or less and all the pieces in the tile image are composed of two colors or less.

次に、タイル内が3色以内で且つその中の2×2画素ブロック全てが2色以内で構成されていると構成色数判定部1204で判定した場合に、当該タイル画像に対して実行する補間色データ置換処理、インデックス書換処理について、図13を用いて説明する。   Next, when the configuration color number determination unit 1204 determines that the tile has 3 colors or less and all 2 × 2 pixel blocks in the tile are configured with 2 colors or less, the process is executed on the tile image. Interpolation color data replacement processing and index rewriting processing will be described with reference to FIG.

すなわち、前述の構成色数判定処理で補間色置換処理対象のタイルと判定された場合、次の処理を実行する。補間色置換部1211が、パケットバッファに格納されている補間色データ(第2〜4色データ)を置換補間色バッファ1205〜1207に保持されている色データで置き換える処理を実行する。そしてインデックス書換部1212が、2×2画素ブロック単位での補間色選択ビットを生成してインデックスを書き換える処理(各ピースのパターンフラグ(4ビット)→パターンフラグ(3ビット)+補間色選択ビット(1ビット))とを行う。   That is, when it is determined in the above-described constituent color number determination process that the tile is the interpolation color replacement process target, the following process is executed. The interpolation color replacement unit 1211 executes processing for replacing the interpolation color data (second to fourth color data) stored in the packet buffer with the color data held in the replacement interpolation color buffers 1205 to 1207. Then, the index rewriting unit 1212 generates an interpolation color selection bit for each 2 × 2 pixel block and rewrites the index (pattern flag of each piece (4 bits) → pattern flag (3 bits) + interpolation color selection bit ( 1 bit)).

まず構成色数判定部1204から構成色数をオーバーしているという通知を受けたかを判定する(S1301)。前述の構成色数判定処理のS1117において、構成色数オーバーと判定されている場合には、着目タイルの処理は終了して、次のタイルの処理に移行する。オーバーしていない場合にはインデックス生成部1203が、ピース単位での画像データのインデックス、代表色、補間色の読み込みを行う(S1302)。そして、読み込んだインデックス値より、当該読み込んだピースの構成色数が2色であるか否かの判定を行う(S1303)。S1303において、2色でないと判定された場合には、補間色データがないので、補間色データの置き換え処理の対象外のピースと判断し、S1312へ進む。この場合は、3色以上の場合はS1301でYESと判定されているので、ここでは1色(パターンフラグ値が“0”)と判定された場合である。また、インデックス(4ビットパターンフラグ)値が“0”なので、展開時は3ビットパターンフラグが“0”で且つ補間色選択ビットが“0”と見なして展開できるので、インデックス値を書き換える必要はない。   First, it is determined whether a notification that the number of configuration colors has been exceeded is received from the configuration color number determination unit 1204 (S1301). If it is determined in S1117 of the above-described constituent color number determination process that the constituent color number is exceeded, the process for the target tile is terminated, and the process proceeds to the next tile process. If not, the index generation unit 1203 reads the index, representative color, and interpolation color of the image data in piece units (S1302). Then, based on the read index value, it is determined whether or not the number of constituent colors of the read piece is two colors (S1303). If it is determined in step S1303 that there are not two colors, there is no interpolation color data, so it is determined that the piece is not a target of interpolation color data replacement processing, and the flow advances to step S1312. In this case, if there are three or more colors, it is determined as YES in S1301, and here, it is determined that one color (the pattern flag value is “0”). In addition, since the index (4-bit pattern flag) value is “0”, the expansion can be performed by assuming that the 3-bit pattern flag is “0” and the interpolation color selection bit is “0”, so it is necessary to rewrite the index value. Absent.

一方、S1303において構成色数が2色と判定された場合(パターンフラグ値が1〜7のいずれか)、補間色データの置換処理対象のピースと判断して、S1304に進み、補間色データを置き換えるために、補間色選択ビットを生成する処理に移る。   On the other hand, when it is determined in S1303 that the number of constituent colors is two (the pattern flag value is any one of 1 to 7), it is determined as a piece to be subjected to replacement processing of interpolation color data, and the process proceeds to S1304, where the interpolation color data is converted. In order to replace it, the process proceeds to a process of generating an interpolation color selection bit.

S1304では、置換補間色バッファ1205、1206、1207に格納されている色と、代表色及び補間色との画素値をそれぞれ比較する(S1304)。図15に置換補間色バッファ1205、1206、1207に格納されている色と、生成する補間色選択ビットの関係図を示す。参照している着目中ピースの代表色、補間色が、置換補間色バッファ1205、1206、1207(以降バッファ1、2、3)のうち、どのバッファに格納されている色と一致しているかによって、補間色選択ビットを切り換える。補間色選択ビットを1ビットのみで表現させる為に、補間色が代表色が格納されているバッファ以外の残り2つのバッファのうち、どちらのバッファに格納されているかにより、“0”、“1”を割り当てるよう動作する。図15に示す通り、代表色と異なる色が格納されている残り2つのバッファのうち、小さい番号のバッファに補間色データが格納されている場合には、補間色選択ビットとして“0”を生成する。大きい番号のバッファに補間色データが格納されている場合には、補間色選択ビットとして“1”を生成する。以降詳細について説明する。   In step S1304, the pixel values of the colors stored in the replacement interpolation color buffers 1205, 1206, and 1207 are compared with the representative color and the interpolation color (S1304). FIG. 15 shows the relationship between the colors stored in the replacement interpolation color buffers 1205, 1206, and 1207 and the interpolation color selection bits to be generated. Depending on which buffer stored in the replacement interpolation color buffer 1205, 1206, 1207 (hereinafter referred to as buffers 1, 2, 3) matches the representative color and interpolation color of the current piece of interest being referred to The interpolation color selection bit is switched. In order to express the interpolation color selection bit by only 1 bit, “0”, “1” is selected depending on which buffer among the remaining two buffers other than the buffer in which the interpolation color is stored. "To work. As shown in FIG. 15, when interpolation color data is stored in a smaller numbered buffer among the remaining two buffers storing colors different from the representative color, “0” is generated as the interpolation color selection bit. To do. When interpolation color data is stored in a larger numbered buffer, “1” is generated as the interpolation color selection bit. Details will be described below.

まず置換補間色バッファ1205(バッファ1)に格納されている色が前記着目中ピースの代表色と一致するか否かを判定する(S1305)。一致する場合にはS1306へ進み、一致していない場合にはS1309へ進む。   First, it is determined whether or not the color stored in the replacement interpolation color buffer 1205 (buffer 1) matches the representative color of the focused piece (S1305). If they match, the process proceeds to S1306, and if they do not match, the process proceeds to S1309.

S1306では、置換補間色バッファ1206(バッファ2)に格納されている色が前記着目中ピースの補間色と一致するか否かを判定する。一致する場合にはS1307へ進み、一致していない場合には、補間色が置換補間色バッファ1207(バッファ3)に格納されていると判断してS1308へ進む。   In step S1306, it is determined whether the color stored in the replacement interpolation color buffer 1206 (buffer 2) matches the interpolation color of the focused piece. If they match, the process proceeds to S1307. If they do not match, it is determined that the interpolation color is stored in the replacement interpolation color buffer 1207 (buffer 3), and the process proceeds to S1308.

S1309では、置換補間色バッファ1206(バッファ2)に格納されている色が前記着目中ピースの代表色と一致するか否かを判定する(S1309)。一致する場合にはS1310へ進み、一致していない場合には代表色が置換補間色バッファ1207(バッファ3)に格納されていると判断してS1311へ進む。   In S1309, it is determined whether or not the color stored in the replacement interpolation color buffer 1206 (buffer 2) matches the representative color of the focused piece (S1309). If they match, the process proceeds to S1310. If they do not match, it is determined that the representative color is stored in the replacement interpolation color buffer 1207 (buffer 3), and the process proceeds to S1311.

S1310では、置換補間色バッファ1205(バッファ1)に格納されている色が前記着目中ピースの補間色と一致するか否かを判定する。一致する場合にはS1307へ進み、一致していない場合には補間色は置換補間色バッファ1207(バッファ3)に格納されていると判断してS1308へ進む。   In step S1310, it is determined whether the color stored in the replacement interpolation color buffer 1205 (buffer 1) matches the interpolation color of the focused piece. If they match, the process proceeds to S1307. If they do not match, it is determined that the interpolation color is stored in the replacement interpolation color buffer 1207 (buffer 3), and the process proceeds to S1308.

S1311では、置換補間色バッファ1205(バッファ1)に格納されている色が前記着目中ピースの補間色と一致するか否かを判定する。一致する場合にはS1307へ進み、一致していない場合には補間色は置換補間色バッファ1206(バッファ2)に格納されていると判断してS1308へ進む。   In step S1311, it is determined whether the color stored in the replacement interpolation color buffer 1205 (buffer 1) matches the interpolation color of the focused piece. If they match, the process proceeds to S1307. If they do not match, it is determined that the interpolation color is stored in the replacement interpolation color buffer 1206 (buffer 2), and the process proceeds to S1308.

S1307では、前記着目中ピースの補間色が、代表色が格納されているバッファ以外の残り2つのバッファのうち、小さい番号のバッファに格納されているので、補間色選択ビットとして“0”を生成する。一方、S1308では前記着目中ピースの補間色が、代表色が格納されているバッファ以外の残り2つのバッファのうち、大きい番号のバッファに格納されているので、補間色選択ビットとして“1”を生成する。   In S1307, since the interpolation color of the current piece of interest is stored in the smaller numbered buffer of the remaining two buffers other than the buffer storing the representative color, “0” is generated as the interpolation color selection bit. To do. On the other hand, in S1308, since the interpolation color of the current piece of interest is stored in the larger numbered buffer of the remaining two buffers other than the buffer storing the representative color, “1” is set as the interpolation color selection bit. Generate.

S1312では、タイル内の最後のピースまで補間色選択ビットの生成が終了したか否かを判定する。まだ最後のピースではない場合には、S1302に戻り、次のピースを処理対象の着目ピースとして、前述した処理を繰り返す。一方、最後のピースである場合には、S1313へ進む。   In S1312, it is determined whether or not generation of the interpolation color selection bit has been completed up to the last piece in the tile. If it is not the last piece yet, the process returns to S1302, and the above-described processing is repeated with the next piece as the target piece to be processed. On the other hand, if it is the last piece, the process proceeds to S1313.

S1313では、パケット生成部1208によってパケットバッファ1209に格納されたパケットデータの修正を行う(パケットデータ修正処理)。パケットデータ修正処理では、補間色置換部1211が補間色データを置き換え、インデックス書換部1212がインデックスを書き換え、ヘッダ修正部1210がヘッダ情報を修正する。   In step S1313, the packet generation unit 1208 corrects the packet data stored in the packet buffer 1209 (packet data correction process). In the packet data correction process, the interpolation color replacement unit 1211 replaces the interpolation color data, the index rewriting unit 1212 rewrites the index, and the header correction unit 1210 corrects the header information.

尚、パケット生成部1208は、パケットデータをパケットバッファ1209に格納したときに、ヘッダ修正部1210と補間色置換部1211とインデックス書換部1212へ、当該生成したパケットデータの格納アドレスを通知するものとする。ヘッダ修正部1210と補間色置換部1211とインデックス書換部1212は、この通知された格納アドレスに基づいて、当該格納されているパケットデータの修正を行う。   When packet data is stored in the packet buffer 1209, the packet generation unit 1208 notifies the header correction unit 1210, the interpolation color replacement unit 1211, and the index rewriting unit 1212 of the storage address of the generated packet data. To do. The header correcting unit 1210, the interpolation color replacing unit 1211, and the index rewriting unit 1212 correct the stored packet data based on the notified storage address.

補間色置換部1211は、当該タイル画像に関するパケットデータの第2、3、4色格納部に格納されている補間色を、置換補間色バッファ1205、1206、1207(バッファ1、2、3)に格納されている3色分のデータで置換する。   The interpolation color replacement unit 1211 stores the interpolation colors stored in the second, third, and fourth color storage units of the packet data related to the tile image in the replacement interpolation color buffers 1205, 1206, and 1207 (buffers 1, 2, and 3). Replace with the stored data for three colors.

インデックス書換部1212は、各ピースに対してインデックス生成部1203で生成された4ビットのパターンフラグ値(0〜7)を、3ビットのパターンフラグ値(0〜7)に書き換える。この書き換えと共に、S1307とS1308で設定された補間色選択ビット(1ビット)を設定する。すなわち、各ピースに対する4ビットのパターンフラグ値を、1ビットの補間色選択ビットと3ビットのパターンフラグ値とで書き換える。   The index rewriting unit 1212 rewrites the 4-bit pattern flag value (0 to 7) generated by the index generation unit 1203 for each piece to a 3-bit pattern flag value (0 to 7). Along with this rewriting, the interpolation color selection bit (1 bit) set in S1307 and S1308 is set. That is, the 4-bit pattern flag value for each piece is rewritten with a 1-bit interpolation color selection bit and a 3-bit pattern flag value.

ヘッダ修正部1210は、ヘッダ情報に保持されている第2、3、4色格納部のデータサイズ情報を9バイトに修正し、補間色データ置換フラグに、置き換えが行われたことを示す“1”をセットする。   The header correction unit 1210 corrects the data size information of the second, third, and fourth color storage units held in the header information to 9 bytes, and “1” indicating that the replacement has been performed in the interpolation color data replacement flag. ”Is set.

図16は、本発明によるパケットデータ修正前の第1のパケットデータ(図16(a))と修正後の第2のパケットデータ(図16(b))それぞれのデータ構造とヘッダ情報の例である。図16は、色空間がRGBで、画素データのビット数が8ビットの場合の一例を示している。図16(a)に示すように、パケットデータ修正前の第2、3、4色格納部に必要な領域は、64×64画素タイル内の全ピース(1024ピース)が、各ピース内の4画素全て異なる色(4色)で構成されていると想定すれば、最大9216バイト必要になる。また、全てのピースについて、各ピース内の4画素が全て同じ色であれば、各ピースに第2色〜第4色は存在しないことになるので、第2、3、4色格納部は最小0バイトである。すなわち、パケットデータ修正前の第2、3、4色格納部は0〜9216バイトのサイズとなっている。   FIG. 16 shows an example of the data structure and header information of the first packet data (FIG. 16 (a)) before modification of the packet data and the second packet data after modification (FIG. 16 (b)) according to the present invention. is there. FIG. 16 shows an example where the color space is RGB and the number of bits of pixel data is 8 bits. As shown in FIG. 16 (a), the area required for the second, third, and fourth color storage parts before the packet data correction is all pieces (1024 pieces) in the 64 × 64 pixel tile. Assuming that all pixels are composed of different colors (four colors), a maximum of 9216 bytes are required. In addition, for all pieces, if all four pixels in each piece have the same color, the second to fourth colors do not exist in each piece, so the second, third, and fourth color storage units are minimum. 0 bytes. That is, the second, third, and fourth color storage units before the packet data correction are 0 to 9216 bytes in size.

一方、図16(b)に示すように、補間色データの置き換え対象のタイル画像(タイル画像が3色以下で且つ各ピースは2色以下)に対してパケットデータ修正処理を行った後では、次にようになる。第2,3,4色格納部には3色分の補間色データを格納するので、9バイト分のデータが格納されることになる。そして、ヘッダ情報の修正としては、第2、3、4色格納部のデータサイズ情報を9バイトに変換する修正と、補間色データ置換フラグに置き換えが行われたことを示す設定とが行われる。   On the other hand, as shown in FIG. 16B, after performing the packet data correction processing on the tile image to be replaced with the interpolation color data (the tile image is 3 colors or less and each piece is 2 colors or less), Then: Since the interpolation color data for three colors are stored in the second, third, and fourth color storage units, data for 9 bytes is stored. The header information is corrected by converting the data size information of the second, third, and fourth color storage units into 9 bytes and setting indicating that the interpolation color data replacement flag has been replaced. .

図17に、S1313で補間色置換処理を行った後の、パケットデータの第2、3、4色格納部における3色の補間色の割り当ての関係を示す。図17に示すように、補間色置換部1211は、置換補間色バッファ1205〜1207に格納されている補間色データを順に読み出し、パケットデータの第2、3、4色格納部ベースアドレスのアドレス位置から始まる第2、3、4色格納部に格納する。   FIG. 17 shows the relationship of allocation of the three interpolation colors in the second, third, and fourth color storage units of the packet data after the interpolation color replacement process is performed in S1313. As shown in FIG. 17, the interpolation color replacement unit 1211 sequentially reads out the interpolation color data stored in the replacement interpolation color buffers 1205 to 1207, and the address position of the second, third, and fourth color storage unit base addresses of the packet data. Are stored in the second, third, and fourth color storage units starting from.

インデックス書換処理では、図5の(A)に示すような4ビットのパターンフラグを、図5の(C)に示すような3ビットのパターンフラグと1ビットの補間色選択ビットとで表されるインデックスで書き換える。前述のS1307及びS1308で生成された補間色選択ビットは、4ビットのパターンフラグの下位3ビットの情報と一緒に不図示の内部バッファの各ピース座標に対応するアドレスに格納される。ここで、上位1ビットの情報は、構成色が2色以下の場合には使用しない。つまり、インデックス書換部1212は、内部バッファより各ピースに対応する書き換え後のインデックス値(パターンフラグ(3ビット)+補間色選択ビット(1ビット))を読み出し、パケットバッファ1209のパターンフラグ格納部に書き込む処理を行う。   In the index rewriting process, a 4-bit pattern flag as shown in FIG. 5A is represented by a 3-bit pattern flag and a 1-bit interpolation color selection bit as shown in FIG. Rewrite with index. The interpolation color selection bits generated in S1307 and S1308 are stored at addresses corresponding to the piece coordinates of the internal buffer (not shown) together with the lower 3 bits of information of the 4-bit pattern flag. Here, the information of the upper 1 bit is not used when the constituent colors are two colors or less. That is, the index rewriting unit 1212 reads the rewritten index value (pattern flag (3 bits) + interpolation color selection bit (1 bit)) corresponding to each piece from the internal buffer, and stores it in the pattern flag storage unit of the packet buffer 1209. Perform the writing process.

上述のパケットデータの修正が終了すると、パケットバッファ1209に格納されているパケットデータは、画像メモリバスを介してメモリ106に格納される。以降、残りのタイル画像についても同様にパケットデータの生成、及び補間データの置き換え処理を行い、全タイルに対して上述した処理を繰り返す。   When the modification of the packet data is completed, the packet data stored in the packet buffer 1209 is stored in the memory 106 via the image memory bus. Thereafter, packet data generation and interpolation data replacement processing are similarly performed for the remaining tile images, and the above-described processing is repeated for all tiles.

[展開処理]
最後に、パケットデータをタイル画像に展開する手法について、図18、19を用いて説明する。図18は、展開部222、232の内部構成を示すブロック図である。
[Deployment processing]
Finally, a method for developing packet data into tile images will be described with reference to FIGS. FIG. 18 is a block diagram illustrating an internal configuration of the expansion units 222 and 232.

展開対象のパケットデータをパケットバッファ1901に格納し、ヘッダ解析部1902は当該格納したパケットデータのヘッダ情報の補間色データ置換フラグを解析して、補間色の置き換えが行われたパケットデータであるか判定する。補間色の置き換えが行われたパケットデータの場合、置換済みパケットデータ展開部1903は、各ピースに関して、インデックスと代表色と3色の補間色データとに基づいて第2色を特定し、各ピースの配色を再現する。ここで、インデックスは3ビットのパターンフラグと補間色選択ビットである。   The packet data to be expanded is stored in the packet buffer 1901, and the header analysis unit 1902 analyzes the interpolation color data replacement flag in the header information of the stored packet data to determine whether the packet data has undergone interpolation color replacement. judge. In the case of packet data in which interpolation color replacement has been performed, the replaced packet data expansion unit 1903 specifies the second color for each piece based on the index, the representative color, and the three colors of interpolation color data, and each piece. Reproduce the color scheme. Here, the index is a 3-bit pattern flag and an interpolation color selection bit.

また、補間色の置き換えが行われていないパケットデータの場合、非置換パケットデータ展開部1904は、各ピースに関して、インデックスと代表色(第1色の色データ情報)と補間色(第2〜4色の色データ情報)とを読み出し、各ピースの配色を再現する。インデックスは4ビットのパターンフラグである。再現された各ピースは、ピース書き込み部1905によってタイルバッファ1906に順次書き込まれる。当該パケットデータに含まれる全てのピースが再現されると、タイルバッファに格納された画像データはタイル画像として出力される。尚、ページ画像を再現する場合は、全てのパケットデータに対して順番にタイル画像の展開処理が行われるようにすればよい。   Further, in the case of packet data in which interpolation color replacement has not been performed, the non-replacement packet data expansion unit 1904, for each piece, an index, a representative color (first color color data information), and an interpolation color (second to fourth). Color data information), and reproduce the color arrangement of each piece. The index is a 4-bit pattern flag. Each reproduced piece is sequentially written into the tile buffer 1906 by the piece writing unit 1905. When all pieces included in the packet data are reproduced, the image data stored in the tile buffer is output as a tile image. When reproducing the page image, the tile image development process may be performed in order for all the packet data.

図19は、パケットデータの展開処理の詳細を示すフローチャートである。   FIG. 19 is a flowchart showing details of the packet data expansion processing.

S2001において、展開部222(又は232)は、メモリ106に格納されているパケットデータの中から、展開対象のパケットデータをパケットバッファ1901に読み込む。   In step S2001, the expansion unit 222 (or 232) reads the expansion target packet data from the packet data stored in the memory 106 into the packet buffer 1901.

ヘッダ解析部1902は、当該読み込んだパケットデータのヘッダ情報を解析し(S2002)、補間色データ置換フラグが1であるか否か判定する(S2003)。   The header analysis unit 1902 analyzes the header information of the read packet data (S2002), and determines whether the interpolation color data replacement flag is 1 (S2003).

補間色データ置換フラグが1(すなわち置換済みパケットデータである)と判定した場合は、S2004に進み、置換済みパケットデータ展開部1903は、最初のピースに関してインデックスデータを読み出す。更に、置換済みパケットデータ展開部1903は、パケットデータの第1色格納部から当該ピースの代表色を読み出し(S2005)、第2,3,4色格納部から3色の補間色データを読み出す(S2006)。そして、当該読み出した3色の補間色データと当該ピースの代表色とを比較し、代表色に一致する補間色データと、代表色に一致しない2色の補間色データを特定する(S2007)。次に、読み出したインデックスデータに含まれる当該ピースの補間色選択ビットが0か1か判定する(S2008)。当該ピースの補間色選択ビットが0であると判定した場合は、当該ピースの代表色に一致しない2色の補間色データのうち、ベースアドレスに近い方の補間色データを、当該ピースにおける第2色の色データとして特定する(S2009)。   If it is determined that the interpolation color data replacement flag is 1 (that is, replaced packet data), the process advances to step S2004, and the replaced packet data expansion unit 1903 reads index data for the first piece. Further, the replaced packet data expansion unit 1903 reads the representative color of the piece from the first color storage unit of the packet data (S2005), and reads out the interpolated color data of the three colors from the second, third, and fourth color storage units ( S2006). Then, the read three color interpolation color data and the representative color of the piece are compared, and the interpolation color data matching the representative color and the two color interpolation color data not matching the representative color are specified (S2007). Next, it is determined whether the interpolation color selection bit of the piece included in the read index data is 0 or 1 (S2008). If it is determined that the interpolation color selection bit of the piece is 0, the interpolation color data closer to the base address among the two interpolation color data that does not match the representative color of the piece is the second color in the piece. The color data is specified as color data (S2009).

一方、当該ピースの補間色選択ビットが1であると判定した場合は、当該ピースの代表色に一致しない2色の補間色データのうち、ベースアドレスから遠い方の補間色データを、当該ピースにおける第2色の色データとして特定する(S2010)。この結果、置換済みパケットデータ展開部1903は、当該処理対象のピースに関してインデックスデータに含まれる3ビットのパターンフラグ、代表色(第1色の色データ情報)、補間色(第2色の色データ情報)を特定でき、当該ピースの配色を再現する。ピース書き込み部1905は、当該ピースの再現された配色をタイルバッファ1906に書き込む(S2011)。当該パケットデータに含まれる全てのピースについて処理したか判定し(S2012)、未処理のピースがあると判定した場合は、次のピースを処理対象としてS2004に戻る。一方、全てのピースについて処理したと判定した場合は、S2013に進み、タイルバッファ1906に書き込まれたタイル画像を出力する。   On the other hand, when it is determined that the interpolation color selection bit of the piece is 1, the interpolation color data that is far from the base address among the interpolation color data of two colors that do not match the representative color of the piece is displayed in the piece. The second color data is specified (S2010). As a result, the replaced packet data expansion unit 1903 obtains the 3-bit pattern flag, the representative color (first color data information), and the interpolation color (second color data) included in the index data for the processing target piece. Information) can be specified and the color scheme of the piece is reproduced. The piece writing unit 1905 writes the reproduced color scheme of the piece in the tile buffer 1906 (S2011). It is determined whether all pieces included in the packet data have been processed (S2012). If it is determined that there is an unprocessed piece, the process returns to S2004 with the next piece as a processing target. On the other hand, if it is determined that all pieces have been processed, the process proceeds to S2013, and the tile image written in the tile buffer 1906 is output.

尚、補間色置換済みパケットデータは、図16(b)や図17で示したように、第2,3,4色格納部には、置換補間色バッファ1205〜1207(図15のバッファ1〜3に相当)に格納されていた色データが順番に格納されている。したがって、図15を参照すれば分かるように、S2009では、第2,3,4色格納部のベースアドレスに近い方の補間色データが第2色として選択され、S2010ではベースアドレスから遠い方の補間色データが第2色として選択されることになる。   As shown in FIGS. 16B and 17, the interpolation color replaced packet data is stored in the second, third, and fourth color storage units as replacement interpolation color buffers 1205 to 1207 (buffers 1 to 1 in FIG. 15). (Corresponding to 3) is stored in order. Therefore, as can be seen from FIG. 15, in S2009, the interpolated color data closer to the base address of the second, third, and fourth color storage units is selected as the second color, and in S2010, the farther from the base address. The interpolated color data is selected as the second color.

一方、S2003において、補間色データ置換フラグが0(すなわち非置換パケットデータである)と判定した場合は、S2014に進み、非置換パケットデータ展開部1903は、最初の処理対象ピースに関するインデックスデータを読み出す。更に、非置換パケットデータ展開部1904は、パケットデータの第1色格納部から当該処理対象ピースの代表色を読み出す(S2015)。更に、当該処理対象のピースのインデックス(4ビットのパターンフラグ)が示す色数が2〜4色の場合、非置換パケットデータ展開部1904は第2,3,4色格納部から当該ピースに関する補間色データ(第2〜4色の色データ)を読み出す(S2016)。その結果、非置換パケットデータ展開部1904は、当該処理対象のピースに関して、インデックスデータに含まれる4ビットのパターンフラグ、代表色(第1色の色データ情報)、補間色(第2〜4色の色データ情報)を特定でき、当該ピースの配色を再現する。ピース書き込み部1905は、当該ピースの再現された配色をタイルバッファ1906に書き込む(S2017)。当該パケットデータに含まれる全てのピースについて処理したか判定し(S2018)、未処理のピースがあると判定した場合は、次のピースを処理対象としてS2014に戻る。一方、全てのピースについて処理したと判定した場合は、S2013に進み、タイルバッファ1906に書き込まれたタイル画像を出力する。   On the other hand, if it is determined in S2003 that the interpolation color data replacement flag is 0 (that is, non-replacement packet data), the process proceeds to S2014, and the non-replacement packet data expansion unit 1903 reads the index data regarding the first processing target piece. . Further, the non-replacement packet data expansion unit 1904 reads the representative color of the processing target piece from the first color storage unit of the packet data (S2015). Further, when the number of colors indicated by the index (4-bit pattern flag) of the processing target piece is 2 to 4 colors, the non-replacement packet data expansion unit 1904 interpolates the piece from the second, third, and fourth color storage units. Color data (color data of the second to fourth colors) is read (S2016). As a result, the non-replacement packet data expansion unit 1904, with respect to the processing target piece, includes a 4-bit pattern flag, representative color (first color data information), and interpolation color (second to fourth colors) included in the index data. Color data information) can be specified, and the color arrangement of the piece is reproduced. The piece writing unit 1905 writes the reproduced color scheme of the piece in the tile buffer 1906 (S2017). It is determined whether all pieces included in the packet data have been processed (S2018). If it is determined that there is an unprocessed piece, the process returns to S2014 with the next piece as a processing target. On the other hand, if it is determined that all pieces have been processed, the process proceeds to S2013, and the tile image written in the tile buffer 1906 is output.

尚、上述した展開処理は元の解像度の画像を得るための処理であるが、半分の解像度の画像データ得たい場合は、第1色格納部に格納されている色データを抽出するだけでよい。これは、第1色格納部に各ピースの代表色がラスタ順に格納されているためである。   The development process described above is a process for obtaining an image with the original resolution. However, if it is desired to obtain image data with half the resolution, it is only necessary to extract the color data stored in the first color storage unit. . This is because the representative colors of each piece are stored in the first color storage unit in raster order.

本実施形態によれば、オフィスで使用される文書画像はタイル単位で見ても、2色から3色で構成されることが殆どであることに着目し、各タイルの補間データを圧縮することで、圧縮率を向上させることができる。   According to the present embodiment, it is noted that document images used in the office are mostly composed of two to three colors even when viewed in tile units, and the interpolation data of each tile is compressed. Thus, the compression rate can be improved.

また、圧縮率を向上することにより、データ量の増大を抑制してシステム効率の低下を低減を図ると共に、メモリなどの容量の増大によるコストアップや高解像度化による画像処理システムの処理速度の低下を抑えることができる。   In addition, by increasing the compression rate, the increase in data volume is suppressed to reduce the decrease in system efficiency, and the processing speed of the image processing system is decreased due to the increase in cost due to the increase in memory capacity and the increase in resolution. Can be suppressed.

[他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (8)

予め定められた画素数で構成されるタイル画像を処理する画像処理装置であって、
前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であるか否かを判定する判定手段と、
前記判定手段で前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であると判定されるタイル画像に対して、前記各ブロックにおける予め決められた位置の画素の色データを示す第1色の色データ情報と、前記タイル画像内に存在する前記3色以内の色データ情報と、前記2色以下の各ブロックにおける色データの配置パターンを特定するための第1のパターン情報と、前記3色以内の色データ情報の中から前記2色以下の各ブロックにおける前記第1色の色データ情報と異なる第2色の色データ情報を選択するための選択情報とを含む第1のパケットデータを生成する生成手段と、
を有することを特徴とする画像処理装置。
An image processing apparatus that processes a tile image composed of a predetermined number of pixels,
Determining means for determining whether or not the tile image has 3 colors or less and all of the 2 × 2 pixel size blocks constituting the tile image have 2 colors or less;
With respect to the tile image in which the inside of the tile image is determined by the determination means to be within 3 colors and all of the 2 × 2 pixel size blocks constituting the tile image are 2 colors or less, Color data information of the first color indicating the color data of the pixel at the determined position, color data information within the three colors existing in the tile image, and an arrangement pattern of color data in each block of the two colors or less Color data information of a second color different from the color data information of the first color in each block of the two or less colors is selected from the first pattern information for specifying the color and the color data information of the three colors or less Generating means for generating first packet data including selection information for
An image processing apparatus comprising:
前記生成手段は、前記判定手段で前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下でないと判定されるタイル画像に対して、前記各ブロックにおける予め決められた位置の画素の色データを示す前記第1色の色データ情報と、前記各ブロックにおける前記第1色の色データ情報と異なる第2〜4色の色データ情報と、前記各ブロックにおける色データの配置パターンを特定するための第2のパターン情報と、を含む第2のパケットデータを生成することを特徴とする請求項1に記載の画像処理装置。   For the tile image in which the determination unit determines that the tile image has three colors or less and all the 2 × 2 pixel size blocks constituting the tile image are not two colors or less, Color data information of the first color indicating color data of pixels at a predetermined position in each block; color data information of second to fourth colors different from the color data information of the first color in each block; 2. The image processing apparatus according to claim 1, wherein second image data including second pattern information for specifying an arrangement pattern of color data in each block is generated. 前記生成手段は、
前記タイル画像を2×2画素のサイズのブロック毎に分割し、
前記分割された各ブロック内の各画素の色データを比較することにより、前記各ブロックに含まれる色データの配置パターンを示す前記第2のパターン情報を特定し、
前記各ブロックにおける予め決められた位置の画素の色データを示す前記第1色の色データ情報を抽出し、
前記各ブロックに含まれる色データの数が2〜4のいずれかであると判断したブロックからは、当該特定された前記第2のパターン情報で定義されている配置パターンに対応する前記第2〜4色の色データ情報を抽出し、
前記第2のパターン情報と、前記各ブロックにおける第1色の色データ情報と、前記各ブロックにおける第2〜4色の色データ情報とを含む前記第2のパケットデータを生成し、
前記判定手段で前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であると判定されたタイル画像に対しては、前記第2のパケットデータに含まれる前記第2のパターン情報を、前記第1のパターン情報と前記選択情報とに書き換え、且つ、前記第2のパケットデータに含まれる前記各ブロックにおける第2〜4色の色データ情報を、前記タイル画像内に存在する前記3色以内の色データ情報に置き換えることにより、前記第1のパケットデータを生成することを特徴とする請求項2に記載の画像処理装置。
The generating means includes
The tile image is divided into blocks each having a size of 2 × 2 pixels,
By comparing the color data of each pixel in each of the divided blocks, the second pattern information indicating the arrangement pattern of the color data included in each block is specified,
Extracting color data information of the first color indicating color data of a pixel at a predetermined position in each block;
From the blocks determined that the number of color data included in each block is any one of 2 to 4, the second to second corresponding to the arrangement pattern defined by the specified second pattern information. Extract color data information of 4 colors,
Generating the second packet data including the second pattern information, color data information of the first color in each block, and color data information of the second to fourth colors in each block;
For the tile image in which the determination means determines that the tile image has three colors or less and all the 2 × 2 pixel size blocks constituting the tile image have two colors or less, the second image The second pattern information included in the packet data is rewritten with the first pattern information and the selection information, and the color data of the second to fourth colors in each block included in the second packet data The image processing apparatus according to claim 2, wherein the first packet data is generated by replacing information with color data information within the three colors existing in the tile image.
前記第1のパケットデータのヘッダ情報には、前記タイル画像内に存在する前記3色以内の色データ情報で置き換えたことを示すフラグが含まれることを特徴とする請求項3に記載の画像処理装置。   4. The image processing according to claim 3, wherein the header information of the first packet data includes a flag indicating replacement with the color data information within the three colors existing in the tile image. 5. apparatus. 前記第2のパターン情報は4ビットのデータ、前記第1のパターン情報は3ビットのデータ、前記選択情報は1ビットのデータで表されることを特徴とする請求項2乃至4のいずれか1項に記載の画像処理装置。   The second pattern information is represented by 4-bit data, the first pattern information is represented by 3-bit data, and the selection information is represented by 1-bit data. The image processing apparatus according to item. 前記タイル画像は、ページ画像を64×64画素のサイズごとに分割することにより生成された画像であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the tile image is an image generated by dividing a page image into sizes of 64 × 64 pixels. 予め定められた画素数で構成されるタイル画像を処理する画像処理装置の処理方法であって、
判定手段が、前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であるか否かを判定する判定工程と、
生成手段が、前記判定工程で前記タイル画像内が3色以内で且つ当該タイル画像を構成する2×2画素サイズのブロックの全てが2色以下であると判定されるタイル画像に対して、前記各ブロックにおける予め決められた位置の画素の色データを示す第1色の色データ情報と、前記タイル画像内に存在する前記3色以内の色データ情報と、前記2色以下の各ブロックにおける色データの配置パターンを特定するための第1のパターン情報と、前記3色以内の色データ情報の中から前記2色以下の各ブロックにおける前記第1色の色データ情報と異なる第2色の色データ情報を選択するための選択情報とを含む第1のパケットデータを生成する生成工程と、
を有することを特徴とする処理方法。
A processing method of an image processing apparatus for processing a tile image composed of a predetermined number of pixels,
A determining step for determining whether or not the inside of the tile image is within 3 colors and all of the 2 × 2 pixel size blocks constituting the tile image are 2 colors or less;
For the tile image in which the generation unit determines that the inside of the tile image is within three colors and all of the 2 × 2 pixel size blocks constituting the tile image are two colors or less in the determination step, Color data information of a first color indicating color data of a pixel at a predetermined position in each block, color data information within the three colors existing in the tile image, and color in each block of the two colors or less Color of a second color different from the color data information of the first color in each block of the two or less colors among the first pattern information for specifying the arrangement pattern of data and the color data information within the three colors Generating a first packet data including selection information for selecting data information;
A processing method characterized by comprising:
コンピュータを、請求項1乃至6のいずれか1項に記載の画像処理装置として機能させるためのプログラム。   The program for functioning a computer as an image processing apparatus of any one of Claims 1 thru | or 6.
JP2010197141A 2010-09-02 2010-09-02 Image processing apparatus and processing method thereof Expired - Fee Related JP5606223B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010197141A JP5606223B2 (en) 2010-09-02 2010-09-02 Image processing apparatus and processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010197141A JP5606223B2 (en) 2010-09-02 2010-09-02 Image processing apparatus and processing method thereof

Publications (2)

Publication Number Publication Date
JP2012054842A true JP2012054842A (en) 2012-03-15
JP5606223B2 JP5606223B2 (en) 2014-10-15

Family

ID=45907700

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010197141A Expired - Fee Related JP5606223B2 (en) 2010-09-02 2010-09-02 Image processing apparatus and processing method thereof

Country Status (1)

Country Link
JP (1) JP5606223B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010141533A (en) * 2008-12-10 2010-06-24 Canon Inc Image encoding apparatus and control method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010141533A (en) * 2008-12-10 2010-06-24 Canon Inc Image encoding apparatus and control method thereof

Also Published As

Publication number Publication date
JP5606223B2 (en) 2014-10-15

Similar Documents

Publication Publication Date Title
JP5595151B2 (en) Image processing apparatus, compression method in image processing apparatus, and program
JP5558767B2 (en) Image processing apparatus and processing method thereof
JP5393574B2 (en) Image processing apparatus, image processing method, and program
US7551796B2 (en) Image processing apparatus, image data generation and transmission method and image data generation and transmission program
US8452083B2 (en) Image processing apparatus, image processing method, and computer-readable medium
JP4728695B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
US8953220B2 (en) Image processing for rotation of compressed image data
JP2009141807A (en) Image processing device, image processing method, and image processing program
JP2011193394A (en) Image processing apparatus, image processing method, and program
US8406517B2 (en) Image processing apparatus and image processing method
JP2004336453A (en) Copying machine, image processing system, program and storage medium
US20060215205A1 (en) Image processing apparatus, image processing method and image processing program
JP5606223B2 (en) Image processing apparatus and processing method thereof
JP2004341760A (en) Image forming apparatus, program and storage medium
JP2004336487A (en) Facsimile machine, program and storage medium
JP5538996B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP5595142B2 (en) Image processing apparatus and image processing method
JP4559173B2 (en) Image processing device
JP2012095227A (en) Image processing system, image processing method, and program
JP5643578B2 (en) Image processing apparatus, image processing method, and program
JP2006254355A (en) Image processor
JP2012054789A (en) Image processor, image processing method, and program
JP2012074897A (en) Image processing device, image processing method, and program
JP2011193396A (en) Image processing apparatus, control method, and program
JP2005302009A (en) Apparatus, method and program of image processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140626

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: 20140728

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140826

LAPS Cancellation because of no payment of annual fees