JP2010278650A - Image compression processor, image forming apparatus, computer program, recording medium, and image compression method - Google Patents

Image compression processor, image forming apparatus, computer program, recording medium, and image compression method Download PDF

Info

Publication number
JP2010278650A
JP2010278650A JP2009127904A JP2009127904A JP2010278650A JP 2010278650 A JP2010278650 A JP 2010278650A JP 2009127904 A JP2009127904 A JP 2009127904A JP 2009127904 A JP2009127904 A JP 2009127904A JP 2010278650 A JP2010278650 A JP 2010278650A
Authority
JP
Japan
Prior art keywords
data
image
compression
code
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009127904A
Other languages
Japanese (ja)
Inventor
Naoki Irisa
直喜 入佐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2009127904A priority Critical patent/JP2010278650A/en
Publication of JP2010278650A publication Critical patent/JP2010278650A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image compression processor, an image forming apparatus, a computer program, a recording medium, and an image compression method for increasing a compression rate of an image, reducing a memory capacity at performing compression/expanding processing, and simplifying the management of encoding data. <P>SOLUTION: In an image compression part 22 of a compression processing part of a printer, image data are separated into character/line drawing data and image data by an image separation part 221 and respective data are stored to a first band buffer 222 and a second band buffer 223. A luster scan output part 224 and a block scan output part 225 read respective data separately, and output them to a first compression part 226 and a second compression part 227, and reversible compression and irreversible compression of the respective data are performed. Respective code data are stored to a first code buffer 228 and a second code buffer 229. A code combining part 260 reads the respective code data from the respective code buffers and combines them into one code data. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、文字画像及び/又は線画像とイメージ画像とが混在する画像のデータを、文字画像及び/又は線画像の領域のデータとイメージの領域のデータとに分離して符号化する画像圧縮処理装置、画像形成装置、コンピュータプログラム、記録媒体及び画像圧縮方法に関する。   The present invention relates to image compression that separates and encodes character image and / or line image and image image data into character image and / or line image area data and image area data. The present invention relates to a processing apparatus, an image forming apparatus, a computer program, a recording medium, and an image compression method.

デジタル複合機、レーザプリンタ等の印刷装置(画像形成装置)においては、通常、ハードディスク等の記憶媒体に印刷データを一時保存しておき、該記憶媒体から印刷データを読み出して印刷、再印刷、ファイリング等の各種の印刷ジョブを行っている。
印刷データの量はA4サイズの場合で、600dpi、RGBフォーマットで略96MBであるので、ハードディスクの記憶容量及び転送帯域の観点から、ハードディスクにはデータを圧縮して保存することが一般的である。
In printing apparatuses (image forming apparatuses) such as digital multifunction peripherals and laser printers, usually, print data is temporarily stored in a storage medium such as a hard disk, and the print data is read out from the storage medium for printing, reprinting, and filing. Various print jobs are performed.
Since the amount of print data is A4 size, it is approximately 96 MB in 600 dpi and RGB format, it is common to compress and store data on the hard disk from the viewpoint of the storage capacity and transfer bandwidth of the hard disk.

カラー画像データの圧縮方式には可逆圧縮方式と非可逆圧縮方式とがあり、可逆圧縮方式としてJPEG−LS(Lossless Joint Photographic Experts Group)、及びJBIG(Joint Bi-Level Image Experts Group)、非可逆圧縮としてJPEGがある。従来はいずれかの方式を用いて圧縮を行っていたが、それぞれ一長一短を有する。
例えば、可逆圧縮方式のみで圧縮した場合、伸長時の画質の劣化はないが圧縮率が低いという問題があり、非可逆圧縮方式のみで圧縮した場合は、圧縮率は高いが、画質が劣化する(特に文字等の高周波数成分において劣化が知覚されやすい)という問題があった。
There are reversible and irreversible compression methods for color image data. As lossless compression methods, JPEG-LS (Lossless Joint Photographic Experts Group) and JBIG (Joint Bi-Level Image Experts Group), lossy compression There is JPEG. Conventionally, compression has been performed using any one of the methods, but each has advantages and disadvantages.
For example, when compression is performed only with the lossless compression method, there is a problem that the compression rate is low although there is no deterioration in image quality at the time of decompression. (In particular, deterioration is easily perceived in high-frequency components such as characters).

そこで圧縮率及び画質の両方を満足させるため、画像データを文字領域とイメージ領域とに分離し、文字領域については可逆圧縮を行い、イメージ領域については非可逆圧縮を行うというように複数の圧縮器を用いて圧縮することが実行されている。
しかしながら、この方式では圧縮時に複数の圧縮器から出力される符号データを別々のファイルとして管理する必要があり、復元する際に複数の伸長器から出力された画像データに基づいて1枚の画像に合成する必要があるためにバッファメモリを1ページ分用意する必要があるという問題がある。
Therefore, in order to satisfy both the compression rate and the image quality, the image data is separated into a character area and an image area, a reversible compression is performed on the character area, and an irreversible compression is performed on the image area. The compression is performed using
However, in this method, it is necessary to manage the code data output from a plurality of compressors as separate files at the time of compression, and to restore one image based on the image data output from the plurality of decompressors at the time of restoration. There is a problem that it is necessary to prepare one page of buffer memory because it is necessary to synthesize.

この問題の解決を図った特許文献1の画像符号化装置においては、画像データを矩形のブロックに分割し、ブロック内の画像データを複数の信号(TAG、文字線画、自然画)に分離している。次いで、分離したTAGは2値画像可逆符号化、文字線画は多値画像可逆符号化、自然画は多値画像非可逆符号化を行い、ブロックの境界で符号データが切れるように符号化する。そして、同一ブロック内の符号データを合成し(同一ブロック内の自然画符号データ、文字線画符号データ、TAG符号データは連続となるように配置し)、複数の圧縮器から出力される符号データをブロック毎に1つに集約することで符号データの管理の簡易化を実現している。そして、この画像符号化装置においては、ブロック単位で圧縮・伸長することで、画像合成時に必要であるメモリ容量を削減させている。すなわち、1ブロック分のメモリ容量で圧縮・伸長処理ができるように構成されている。   In the image encoding device of Patent Document 1 that solves this problem, image data is divided into rectangular blocks, and the image data in the block is separated into a plurality of signals (TAG, character line drawing, natural image). Yes. Next, the separated TAG is subjected to binary image lossless encoding, the character / line image is subjected to multivalued image lossless encoding, and the natural image is subjected to multivalued image lossy encoding, and encoded so that the code data is cut off at the block boundary. Then, the code data in the same block is synthesized (the natural image code data, the character / line image code data, and the TAG code data in the same block are arranged continuously), and the code data output from a plurality of compressors is combined. The code data management is simplified by consolidating the blocks into one block. In this image encoding apparatus, the memory capacity necessary for image composition is reduced by compressing and expanding in block units. That is, the compression / decompression process can be performed with the memory capacity of one block.

特開平10−13688号公報Japanese Patent Laid-Open No. 10-13688

しかしながら、特許文献1の画像符号化装置においては、データを圧縮する際、常にメモリからブロックスキャン方式によりデータを読み出して圧縮器へ出力するので、ブロックスキャン方式での入力に最適なJPEG方式の圧縮器では問題ないが、JPEG−LS及びJBIGのように予測符号化を採用した圧縮方式の場合、ブロックスキャン方式によりメモリからデータを読み出して圧縮すると圧縮率が低下するという問題がある。   However, in the image encoding apparatus of Patent Document 1, when compressing data, the data is always read from the memory by the block scan method and output to the compressor, so that the JPEG compression optimal for the input by the block scan method is performed. However, in the case of a compression method that employs predictive coding such as JPEG-LS and JBIG, there is a problem that the compression rate decreases when data is read from the memory by the block scan method and compressed.

図14は、JPEG−LSにおいて、注目画素xの予測値を計算する場合に参照する画素を示す説明図である。JPEG−LSは、注目画素xに隣接するサンプル値を用いて予測を行う圧縮方式であり、注目画素xの上隣の画素c,b,dの値、及び左隣の画素aの値を参照する。多くの場合、あるサンプル値と次のサンプル値の差分は0に近いことを利用して、各サンプルを個別に符号化する代わりに予測サンプル値との差分値を符号化する。すなわち、画素間の差分値を求め、差分値を分類して予測誤差の符号化を行う。ブロックスキャン方式で処理する場合、ラスタスキャン方式で処理する場合と比較して上端、左端、右端となる画素数が多いため、有効な周辺画素の数が少なくなって(予測の精度が悪くなって)圧縮率が低下する。   FIG. 14 is an explanatory diagram illustrating a pixel to be referred to when a predicted value of the target pixel x is calculated in JPEG-LS. JPEG-LS is a compression method that performs prediction using a sample value adjacent to the target pixel x, and refers to the values of the pixels c, b, and d above the target pixel x and the value of the pixel a adjacent to the left. To do. In many cases, using the fact that the difference between a certain sample value and the next sample value is close to 0, the difference value from the predicted sample value is encoded instead of encoding each sample individually. That is, a difference value between pixels is obtained, the difference values are classified, and a prediction error is encoded. When processing with the block scan method, the number of pixels at the top, left, and right ends is larger than when processing with the raster scan method, so the number of effective peripheral pixels decreases (prediction accuracy deteriorates). ) The compression rate decreases.

本発明は斯かる事情に鑑みてなされたものであり、画像データを任意のバンドサイズで分割した上で複数の領域のデータに分離し、各圧縮手段に対応して、ラスタスキャン方式及びブロックスキャン方式のいずれかの入力方式で各データを各圧縮手段に入力させることにより、圧縮率を向上させることができ、圧縮、伸長処理時に使用する記憶手段の容量を削減することができ、複数の圧縮手段から出力される符号データを1つの符号データに結合して出力することにより符号データの管理の簡易化が実現され、合成した画像の画質も良好である画像圧縮処理装置、画像形成装置、コンピュータプログラム、記録媒体及び画像圧縮方法を提供することを目的とする。   The present invention has been made in view of such circumstances. The image data is divided into a plurality of areas after being divided into arbitrary band sizes, and a raster scan method and a block scan corresponding to each compression means. By inputting each data to each compression means using one of the input methods, the compression rate can be improved, the capacity of the storage means used during compression and decompression processing can be reduced, and multiple compression An image compression processing apparatus, an image forming apparatus, and a computer that realizes simplification of the management of code data by combining the code data output from the means into one code data and outputs the synthesized image, and having a good image quality It is an object to provide a program, a recording medium, and an image compression method.

本発明に係る画像圧縮処理装置は、複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割し、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離する分離手段、及び分離した各データを各別に記憶する複数の記憶手段を備え、各データを可逆圧縮手段又は非可逆圧縮手段により符号化して圧縮した後、符号化した各データを1つのデータに結合する画像圧縮処理装置であって、一の記憶手段に記憶されたデータについて、同一行にある画素に対応するデータを順次的に読み出して前記可逆圧縮手段へ与える第1データ読出手段と、他の記憶手段に記憶されたデータについて、画像を行方向に複数分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出して前記非可逆圧縮手段へ与える第2データ読出手段とを備えることを特徴とする。   An image compression processing apparatus according to the present invention divides an image configured by arranging a plurality of pixels in a matrix in a column direction, and sets data corresponding to the divided image to a plurality of regions based on pixel attributes. Separating means for separating data, and a plurality of storage means for storing each separated data separately. After each data is encoded and compressed by a reversible compression means or a lossy compression means, each encoded data is 1 An image compression processing apparatus combined with one data, the first data reading means for sequentially reading data corresponding to the pixels in the same row for the data stored in one storage means and giving the data to the lossless compression means With respect to the data stored in the other storage means, the data corresponding to the pixels in the same row are sequentially read out for each block obtained by dividing the image into a plurality of rows in the row direction. Characterized in that it comprises a second data reading means for providing the compression means.

可逆圧縮手段はラスタスキャン方式でのデータの入力に適しており、非可逆圧縮手段はブロックスキャン方式でのデータの入力に適している。本発明においては、可逆圧縮手段へは第1データ読出手段(ラスタスキャン方式で出力)により記憶手段からデータを読み出して出力し、非可逆圧縮手段へは第2データ読出手段(ブロックスキャン方式で出力)により記憶手段からデータを読み出して出力するので、全ての圧縮手段へブロックスキャン方式でデータを出力して圧縮するときと比較して圧縮率が向上する。
また、複数行(バンド)単位で処理するので、圧縮・伸長処理時に使用する記憶手段の容量(記憶するデータの量)をページ単位で処理する場合と比較して削減することができ、複数の圧縮手段から出力される符号データを1つの符号データにパッキングして記憶手段へ出力することで、符号データの管理の簡易化を図ることができる。
The lossless compression means is suitable for data input by the raster scan method, and the lossy compression means is suitable for data input by the block scan method. In the present invention, the data is read from the storage means by the first data reading means (output by the raster scan method) to the lossless compression means, and the second data reading means (output by the block scan method) is output to the lossy compression means. ), The data is read out from the storage means and output, so that the compression rate is improved as compared with the case where the data is output to all the compression means by the block scan method and compressed.
In addition, since processing is performed in units of multiple rows (bands), the capacity of the storage means used during compression / decompression processing (the amount of data to be stored) can be reduced compared to processing in units of pages. The code data output from the compression means is packed into one code data and output to the storage means, so that the management of the code data can be simplified.

本発明に係る画像圧縮処理装置は、前記分離手段は、画像のデータを8行毎に、複数の領域のデータに分離することを特徴とする。   The image compression processing apparatus according to the present invention is characterized in that the separation means separates image data into data of a plurality of regions every 8 rows.

本発明においては、非可逆圧縮方式として例えばJPEG方式を用いた場合、JPEGはMCU(Minimum Coded Unit)と呼ばれる8×8画素単位で処理するため、JPEGでの圧縮に最適なライン数(行数)で処理することができる。これによりバッファの容量及び回路規模を効率的に削減することができる。   In the present invention, for example, when the JPEG method is used as the irreversible compression method, JPEG is processed in units of 8 × 8 pixels called MCU (Minimum Coded Unit), so the optimum number of lines (number of rows) for compression with JPEG. ) Can be processed. Thereby, the capacity of the buffer and the circuit scale can be efficiently reduced.

本発明に係る画像圧縮処理装置は、前記分離手段は、画像のデータを文字画像及び/又は線画像に対応する領域のデータと、イメージ画像に対応する領域のデータとに分離することを特徴とする。   The image compression processing device according to the present invention is characterized in that the separation means separates image data into data of a region corresponding to a character image and / or line image and data of a region corresponding to an image image. To do.

本発明においては、高周波数成分を多く含む文字画像及び/又は線画像のデータと、高周波数成分をあまり含まないイメージ画像のデータとに分離するので、文字画像及び/又は線画像のデータを可逆圧縮することにより、圧縮したデータを伸長して画像を合成したときの画質をさらに良好にすることができる。また、イメージ画像のデータは非可逆圧縮することにより、さらに圧縮率を向上させることができる。   In the present invention, the character image and / or line image data containing a lot of high frequency components and the image image data containing little high frequency components are separated, so that the character image and / or line image data is reversible. By compressing, it is possible to further improve the image quality when the compressed data is expanded and the image is synthesized. Further, the image rate can be further improved by irreversibly compressing the image data.

本発明に係る画像圧縮処理装置は、前記第1データ読出手段は、文字画像及び/又は線画像に対応する領域のデータを記憶した記憶手段から前記データを読み出し、前記第2データ読出手段は、イメージ画像に対応する領域のデータを記憶した記憶手段から前記データを読み出すことを特徴とする。   In the image compression processing apparatus according to the present invention, the first data reading unit reads the data from a storage unit that stores data of an area corresponding to a character image and / or a line image, and the second data reading unit includes: The data is read out from a storage unit that stores data of an area corresponding to an image.

本発明においては、文字画像及び/又は線画像のデータをラスタスキャン方式での入力に適した可逆圧縮手段へ出力するので、ブロックスキャン方式で出力した場合より圧縮率を向上させることができ、しかも伸長時の画質の劣化を抑制することができる。   In the present invention, since the character image and / or line image data is output to a reversible compression means suitable for input by the raster scan method, the compression rate can be improved as compared with the case of outputting by the block scan method. Degradation of image quality during expansion can be suppressed.

本発明に係る画像圧縮処理装置は、各記憶手段からデータを読み出す読出手段の選択を受け付ける手段を備えることを特徴とする。   The image compression processing apparatus according to the present invention includes means for receiving selection of a reading means for reading data from each storage means.

本発明においては、文字画像及び/又は線画像を非可逆圧縮して圧縮率をさらに向上させたい場合、イメージ画像を可逆圧縮して画質劣化を抑制したい場合等、ユーザの指定により種々の圧縮方式を組み合わせることができる。   In the present invention, various compression methods can be specified by the user, such as when irreversibly compressing a character image and / or line image to further improve the compression rate, or when reversibly compressing an image image to suppress image quality degradation, etc. Can be combined.

本発明に係る画像形成装置は、前述した画像圧縮処理装置のいずれか一つを備えることを特徴とする。   An image forming apparatus according to the present invention includes any one of the above-described image compression processing apparatuses.

本発明においては、圧縮率を向上させつつ画質劣化を抑制することができる。   In the present invention, image quality deterioration can be suppressed while improving the compression rate.

本発明に係るコンピュータプログラムは、コンピュータに、複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割させ、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離させ、分離した各データを各別に記憶させ、各データを可逆圧縮又は非可逆圧縮により符号化して圧縮させた後、符号化した各データを1つのデータに結合させるコンピュータプログラムであって、コンピュータに、記憶した一の領域のデータについて、同一行にある画素に対応するデータを順次的に読み出させて可逆圧縮させるステップと、コンピュータに、記憶した他の領域のデータについて、画像を行方向に複数分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出させて非可逆圧縮させるステップとを有することを特徴とする。   A computer program according to the present invention causes a computer to divide an image configured by arranging a plurality of pixels in a matrix shape into a plurality of regions in a column direction, and to convert data corresponding to the divided images into a plurality of regions based on pixel attributes This is a computer program that separates each separated data, stores each separated data separately, encodes each data by lossless compression or lossy compression, and then compresses each data into one data. Then, with respect to the data of one area stored in the computer, the step of sequentially reading out the data corresponding to the pixels in the same row and performing lossless compression, and the image of the data of the other area stored in the computer For each block that is divided into multiple rows in the row direction, the data corresponding to the pixels in the same row is read out sequentially and lossy compression is performed. Characterized by a step for.

本発明においては、コンピュータで前述の画像圧縮処理装置の各手段を実現することによって、前述の画像圧縮処理装置を実現することができる。   In the present invention, the above-described image compression processing apparatus can be realized by realizing each unit of the above-described image compression processing apparatus with a computer.

本発明に係るコンピュータでの読み取りが可能な記録媒体は、前述したコンピュータプログラムを記録してあることを特徴とする。   A computer-readable recording medium according to the present invention records the above-described computer program.

本発明においては、記録媒体から読み出された画像圧縮処理のプログラムによって、前述の画像圧縮処理装置をコンピュータ上で実現することができる。   In the present invention, the above-described image compression processing apparatus can be realized on a computer by an image compression processing program read from a recording medium.

本発明に係る画像圧縮方法は、複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割し、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離し、分離した各データを各別に記憶し、各データを可逆圧縮又は非可逆圧縮により符号化して圧縮した後、符号化した各データを1つのデータに結合する画像圧縮方法であって、記憶した一の領域のデータについて、同一行にある画素に対応するデータを順次的に読み出して可逆圧縮するステップと、記憶した他の領域のデータについて、画像を行方向に分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出して非可逆圧縮するステップとを有することを特徴とする。   In the image compression method according to the present invention, an image configured by arranging a plurality of pixels in a matrix is divided into a plurality of columns, and data corresponding to the divided images is data of a plurality of regions based on pixel attributes. An image compression method in which each separated data is stored separately, each data is encoded and compressed by lossless or irreversible compression, and then each encoded data is combined into one data, A step of sequentially reading out the data corresponding to the pixels in the same row and reversibly compressing the data of one area stored, and for each block obtained by dividing the image in the row direction for the data of the other area stored And sequentially reading data corresponding to pixels in the same row and irreversibly compressing the data.

本発明においては、各領域のデータに対応して圧縮方式を選択し、ラスタスキャン方式及びブロックスキャン方式のうちの、選択した圧縮方式に適した方の読出・出力方式を用いて、記憶手段からデータを読み出して圧縮手段へ出力することにより、ブロックスキャン方式のみでデータを読出・出力する場合と比較して圧縮率が向上する。   In the present invention, the compression method is selected in accordance with the data of each area, and the read / output method that is suitable for the selected compression method of the raster scan method and the block scan method is used to store the data from the storage means. By reading the data and outputting it to the compression means, the compression rate is improved as compared with the case where the data is read / output only by the block scan method.

本発明によれば、可逆圧縮手段へは第1データ読出手段(ラスタスキャン方式で出力)により記憶手段からデータを読み出して出力し、非可逆圧縮手段へは第2データ読出手段(ブロックスキャン方式で出力)により記憶手段からデータを読み出して出力するので、圧縮率を向上させることができる。
そして、画像データを任意のバンドサイズで分割して、圧縮、伸長処理を行うので、処理時に使用する記憶手段の容量(記憶するデータの量)を削減することができる。
また、複数の圧縮手段から出力される符号データを1つの符号データに結合して出力するので、符号データの管理の簡易化が実現される。
According to the present invention, the data is read from the storage means by the first data reading means (output by the raster scan method) to the lossless compression means, and the second data reading means (by the block scan method) is output to the lossy compression means. Output), the data is read from the storage means and output, so that the compression rate can be improved.
Since the image data is divided by an arbitrary band size and subjected to compression and decompression processing, the capacity of the storage means (the amount of data to be stored) used during processing can be reduced.
Further, since the code data output from the plurality of compression means is combined and output as one code data, the management of the code data is simplified.

本発明の実施の形態1に係るプリンタの構成を示すブロック図である。1 is a block diagram illustrating a configuration of a printer according to a first embodiment of the present invention. 本発明の実施の形態1に係る画像処理部の構成及びデータフローを示す図である。It is a figure which shows the structure and data flow of an image processing part which concern on Embodiment 1 of this invention. 本発明の実施の形態1に係る画像圧縮部の構成を示すブロック図である。It is a block diagram which shows the structure of the image compression part which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るSoCのCPUによる圧縮処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the compression process by CPU of SoC which concerns on Embodiment 1 of this invention. ラスタスキャン方式で圧縮部へ出力する場合を示す説明図である。It is explanatory drawing which shows the case where it outputs to a compression part by a raster scan system. ブロックスキャン方式で圧縮部へ出力する場合を示す説明図である。It is explanatory drawing which shows the case where it outputs to a compression part by a block scan system. HDDへ出力される符号データのフォーマットを示す説明図である。It is explanatory drawing which shows the format of the code data output to HDD. 符号識別子の一例を示す説明図である。It is explanatory drawing which shows an example of a code identifier. 640×480画素からなる複数サンプルの画像データをブロックスキャン方式及びラスタスキャン方式それぞれの方式により第1圧縮部へ出力し、JPEG−LSで圧縮した場合の符号サイズを測定した結果を示すグラフである。It is a graph which shows the result of having measured the code size at the time of outputting to the 1st compression part the image data of a plurality of samples which consist of 640x480 pixels to the 1st compression part by each method of a block scan system and a raster scan system. . 横軸はブロックスキャン方式の符号サイズ、縦軸はラスタスキャン方式の符号サイズをブロックスキャン方式の符号サイズで除して得られた符号サイズ比とした場合のグラフである。The horizontal axis represents a block scan code size, and the vertical axis represents a graph size ratio obtained by dividing the raster scan code size by the block scan code size. 本発明の実施の形態2に係るプリンタの画像処理部の構成及びデータフローを示す図である。It is a figure which shows the structure and data flow of the image processing part of the printer which concern on Embodiment 2 of this invention. 本発明の実施の形態2に係る画像圧縮部の構成を示すブロック図である。It is a block diagram which shows the structure of the image compression part which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係るSoCのCPUによる圧縮処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the compression process by CPU of SoC which concerns on Embodiment 2 of this invention. JPEG−LSにおいて、注目画素xの予測値を計算する場合に参照する画素を示す説明図である。In JPEG-LS, it is explanatory drawing which shows the pixel referred when calculating the predicted value of the attention pixel x.

以下、本発明をその実施の形態を示す図面に基づき具体的に説明する。
実施の形態1.
図1は、本発明の実施の形態1に係る画像圧縮部(画像圧縮処理装置)を備えるプリンタ(画像形成装置)10の構成を示すブロック図である。
プリンタ10は、プリンタ10の制御及び画像データの処理を司るCPUを内蔵したSoC(System on Chip)1と、画像データの圧縮、伸長、及び色補正を行う画像処理部2と、現像、転写、定着等の処理を行って画像を形成する画像形成ユニット等を備えており、入力された画像データに基づいて紙等の記録媒体に画像を記録させる印刷エンジン部3と、画像データを保管しておくハードディスク(HDD)4とを備えている。SoC1、画像処理部2、及びHDD4はそれぞれがバスを介して接続されている。
また、SoC1にはCPUがワークメモリとして使用するシステムメモリ5が接続されており、画像処理部2には画像データを一時的に記憶しておくローカルメモリ6が接続されている。システムメモリ5には、本発明に係る画像圧縮処理のプログラム(コンピュータプログラム)も記憶されている。
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof.
Embodiment 1 FIG.
FIG. 1 is a block diagram illustrating a configuration of a printer (image forming apparatus) 10 including an image compression unit (image compression processing apparatus) according to Embodiment 1 of the present invention.
The printer 10 includes a SoC (System on Chip) 1 that includes a CPU that controls the printer 10 and processes image data, an image processing unit 2 that performs compression, expansion, and color correction of image data, and development, transfer, An image forming unit that forms an image by performing processing such as fixing is provided. The print engine unit 3 records an image on a recording medium such as paper based on the input image data, and stores the image data. And a hard disk (HDD) 4 to be placed. The SoC 1, the image processing unit 2, and the HDD 4 are connected via a bus.
A system memory 5 used as a work memory by the CPU is connected to the SoC 1, and a local memory 6 for temporarily storing image data is connected to the image processing unit 2. The system memory 5 also stores an image compression processing program (computer program) according to the present invention.

プリンタ10には、ネットワーク等を介してパーソナルコンピュータ(PC)20が接続されている。PC20にはワードプロセッサ及び表計算等のアプリケーションソフトウェアが搭載されており、該アプリケーションソフトウェアを用いてユーザが作成した原稿データがPC20に搭載されたプリンタドライバへ与えられ、該プリンタドライバが原稿データを印刷データに変換し、該印刷データをプリンタ10へ与える。   A personal computer (PC) 20 is connected to the printer 10 via a network or the like. The PC 20 is equipped with application software such as a word processor and a spreadsheet, and manuscript data created by the user using the application software is given to the printer driver installed on the PC 20, and the printer driver converts the manuscript data into print data. And the print data is given to the printer 10.

印刷データはプリンタ10のSoC1に内蔵されているCPUによって、画像処理部2により印刷可能な画像データ(ビットマップデータ)に変換され、画像データは各種の処理を施された上で印刷エンジン部3へ送信され、印刷エンジン部3において画像が印刷される。   The print data is converted into image data (bitmap data) that can be printed by the image processing unit 2 by the CPU built in the SoC 1 of the printer 10. The image data is subjected to various processes and then the print engine unit 3. And the print engine unit 3 prints the image.

図2は、画像処理部2の構成及びデータフローを示す図である。
PC20にインストールされたアプリケーションソフトウェア上で印刷が指示された場合、プリンタドライバによってページ記述言語データで記述された印刷データが生成される。
この印刷データはネットワークを介してプリンタ10へ転送され、プリンタ10のSoC1から画像処理部2へ与えられる。画像処理部2は、ラスタデータ生成部21、画像圧縮部22、画像伸長部23、色補正部24、及び中間調処理部25を備えている。
ラスタデータ生成部21において、RGBのラスタデータ(画像データ:ビットマップデータ)と、各画素の対象を示す属性データとが生成される。この属性としては、例えば写真、絵画等の自然画であるイメージ、線分からなるベクターグラフィックス、文字等がある。一例として、ラスタデータ生成部21は、画素毎に、文字若しくは線のように高周波数成分を多く含む画素であることを示す第1属性データ、又はイメージのように高周波数成分をあまり含まない画素であることを示す第2属性データを生成して、画像圧縮部23へ出力するものとする。
FIG. 2 is a diagram illustrating a configuration and a data flow of the image processing unit 2.
When printing is instructed on the application software installed on the PC 20, print data described in page description language data is generated by the printer driver.
This print data is transferred to the printer 10 via the network, and is supplied from the SoC 1 of the printer 10 to the image processing unit 2. The image processing unit 2 includes a raster data generation unit 21, an image compression unit 22, an image expansion unit 23, a color correction unit 24, and a halftone processing unit 25.
The raster data generation unit 21 generates RGB raster data (image data: bitmap data) and attribute data indicating the target of each pixel. Examples of this attribute include images that are natural images such as photographs and paintings, vector graphics that include line segments, and characters. As an example, the raster data generation unit 21 includes, for each pixel, first attribute data indicating that the pixel includes many high-frequency components such as characters or lines, or pixels that do not include many high-frequency components such as images. It is assumed that second attribute data indicating this is generated and output to the image compression unit 23.

ラスタデータ生成部21は、各画素の輝度に基づいて演算を行い、属性データを生成する。例えば画素の輝度に対して1次微分を行い、最大の微分値を持つ画素を特定することで、隣接する画素に対して急激な輝度の変化を持つ画素が特定される。この急激な輝度の変化を持つ画素と隣接する画素との輝度の差を算出し、算出された差が予め設定してある閾値以上である場合に、急激な輝度の変化を持つ画素について、文字又は線のように高周波数成分を多く含む画素であることを示す第1属性データを生成する。一方、算出された差が予め設定してある閾値未満である場合には、前記画素について自然画や写真等のように高周波数成分をあまり含まない画素であることを示す第2属性データを生成する。なお、1次微分の微分値が所定の閾値以上である場合に、該微分値に対応する画素について、文字又は線のように高周波数成分を多く含む画素を示す第1属性データを生成し、1次微分の微分値が所定の閾値未満である場合に、該微分値に対応する画素について、自然画や写真等のように高周波数成分をあまり含まない画素であることを示す第2属性データを生成してもよい。また、画像データを構成する画素の輝度に対して2次微分を行い、微分値が0である画素(隣接する画素に対して急激な輝度の変化を持つ画素)を特定し、隣接する画素との輝度の差を算出することにしてもよい。   The raster data generation unit 21 performs an operation based on the luminance of each pixel and generates attribute data. For example, by performing a first-order differentiation on the luminance of the pixel and specifying a pixel having the maximum differential value, a pixel having an abrupt luminance change with respect to an adjacent pixel is specified. When the difference in luminance between the pixel having this sudden change in brightness and the adjacent pixel is calculated and the calculated difference is equal to or greater than a preset threshold value, the character for the pixel having the sudden change in brightness is calculated. Or the 1st attribute data which shows that it is a pixel containing many high frequency components like a line is produced | generated. On the other hand, when the calculated difference is less than a preset threshold value, second attribute data indicating that the pixel does not contain a high frequency component such as a natural image or a photograph is generated. To do. In addition, when the differential value of the first derivative is equal to or greater than a predetermined threshold, for the pixel corresponding to the differential value, first attribute data indicating a pixel including a lot of high frequency components such as characters or lines is generated, Second attribute data indicating that when the differential value of the primary differential is less than a predetermined threshold, the pixel corresponding to the differential value is a pixel that does not contain much high frequency components, such as a natural image or a photograph. May be generated. In addition, second order differentiation is performed on the luminance of the pixels constituting the image data, and a pixel having a differential value of 0 (a pixel having a sudden luminance change with respect to the adjacent pixel) is specified. The difference in luminance may be calculated.

画像データは、データ量が、A4用紙1ページ分で略96MB(600dpi:RGBフォーマットの場合)であるため、HDD4の記憶容量及びデータ転送帯域の観点から、画像圧縮部22により圧縮され、得られた符号データがHDD4に保存される。
HDD4に格納された圧縮(符号)データは、画像伸長部23により読み出されて伸長される。その後、色補正部24においてRGB信号が印刷可能なCMYK(C:シアン、M:マゼンダ、Y:イエロー、K:黒)のデジタルカラー信号へ変換され、印刷エンジン部3の色再現特性に合わせた色補正が行われる。
そして、画像データのイメージ部分に対して、中間調処理部25において印刷エンジン部3の特性に対応する出力階調補正処理が行われた後、最終的に画像を画素に分離してそれぞれの階調を再現できるように処理する階調再現処理(中間調生成)が施されてエンジン出力用データが生成され、印刷エンジン部3へ出力される。
Since the image data is about 96 MB (600 dpi: RGB format) for one page of A4 paper, the image data is compressed and obtained by the image compression unit 22 from the viewpoint of the storage capacity of the HDD 4 and the data transfer bandwidth. The encoded data is stored in the HDD 4.
The compressed (code) data stored in the HDD 4 is read and decompressed by the image decompression unit 23. Thereafter, the color correction unit 24 converts the RGB signals into CMYK (C: cyan, M: magenta, Y: yellow, K: black) digital color signals that can be printed, and matches the color reproduction characteristics of the print engine unit 3. Color correction is performed.
Then, after the output tone correction processing corresponding to the characteristics of the print engine unit 3 is performed in the halftone processing unit 25 on the image portion of the image data, the image is finally separated into pixels, and each level is divided. Tone reproduction processing (halftone generation) is performed so that the tone can be reproduced, and engine output data is generated and output to the print engine unit 3.

図3は図2の画像圧縮部22の構成を示すブロック図であり、データフローも表している。
画像圧縮部22は、画像分離部(分離手段)221、第1バンドバッファ222、第2バンドバッファ223、ラスタスキャン出力部(第1データ読出手段)224、ブロックスキャン出力部(第2データ読出手段)225、第1圧縮部226、第2圧縮部227、第1符号バッファ228、第2符号バッファ229、及び符号結合部260を備えている。
FIG. 3 is a block diagram showing a configuration of the image compression unit 22 in FIG. 2 and also shows a data flow.
The image compression unit 22 includes an image separation unit (separation unit) 221, a first band buffer 222, a second band buffer 223, a raster scan output unit (first data reading unit) 224, and a block scan output unit (second data reading unit). ) 225, a first compression unit 226, a second compression unit 227, a first code buffer 228, a second code buffer 229, and a code combination unit 260.

ラスタデータ生成部21で生成された画像データ及び属性データは画像分離部221に入力される。
画像分離部221においては、属性データに基づいて画像データが高周波数成分を多く含む文字及び/又は線画データ(以下、文字/線画データという)と、高周波数成分をあまり含まない自然画等のイメージデータとに分離される。
分離された文字/線画データ,イメージデータはそれぞれ第1バンドバッファ222,第2バンドバッファ223に格納される。
本実施の形態においては、圧縮処理を複数の画素ライン(行)からなる1バンド毎に行うので、第1バンドバッファ222,第2バンドバッファ223のサイズは、[主走査(画素ライン:行)の画素数]×(1バンド当たりのライン数)となる。ここで、1バンドが8ライン(行)であるものとする。
第1バンドバッファ222に格納された文字/線画データは、ラスタスキャン出力部224によりラスタスキャン方式で読み出されて第1圧縮部226へ出力される。
第2バンドバッファ223に格納されたイメージデータは、ブロックスキャン出力部225によりブロックスキャン方式で読み出されて第2圧縮部227へ出力される。
The image data and attribute data generated by the raster data generation unit 21 are input to the image separation unit 221.
In the image separation unit 221, based on the attribute data, the image data includes characters and / or line drawing data (hereinafter referred to as “character / line drawing data”) that contains a lot of high frequency components, and images such as natural images that do not contain much high frequency components. Separated from data.
The separated character / line drawing data and image data are stored in the first band buffer 222 and the second band buffer 223, respectively.
In this embodiment, since compression processing is performed for each band including a plurality of pixel lines (rows), the sizes of the first band buffer 222 and the second band buffer 223 are set to [main scanning (pixel line: row). Of pixels] × (number of lines per band). Here, it is assumed that one band is 8 lines (rows).
The character / line drawing data stored in the first band buffer 222 is read out by the raster scan output unit 224 by the raster scan method and output to the first compression unit 226.
The image data stored in the second band buffer 223 is read by the block scan output unit 225 by the block scan method and output to the second compression unit 227.

ラスタスキャン出力部224により出力された文字/線画データは第1圧縮部226で可逆圧縮される。第1圧縮部226の圧縮方式の一例として、文字/線画データの圧縮に最適な可逆圧縮の1つである上述のJPEG−LS方式が挙げられる。第1圧縮部226にはラスタスキャン方式でのデータの入力が適している。
ブロックスキャン出力部225により出力されたイメージデータは第2圧縮部227で非可逆圧縮される。第2圧縮部227の圧縮方式の一例として、イメージデータの圧縮に最適な非可逆圧縮の1つであるJPEG方式が挙げられる。第2圧縮部227にはブロックスキャン方式でのデータの入力が適している。
JPEG方式においては、8×8画素のブロック画像単位で、各画素値に離散コサイン変換(Discrete Cosine Transform:DCT)を施し、周波数変換の各基底関数の周波数成分毎の係数である周波数係数に変換する。そして、変換された周波数係数を量子化により近似する。量子化は、DCT実施後の8行8列の周波数係数の各要素を、8行8列の計64個の量子化係数で構成される量子化テーブルの対応する各要素で除算することにより行う。そして、量子化して得られた数値の整数部(量子化インデックス)を、ハフマン符号等を用いてエントロピー符号化することにより圧縮データが生成される。一般的な画像の場合、周波数係数の絶対値は、高い次数の周波数成分(高周波数成分)ほど小さな値になる傾向があり、また、人間の視覚特性が高周波に対する分解能が低いので、周波数係数のうち低周波数成分は細かく量子化し、高周波数成分は粗く量子化することによって、データ量が削減される。
The character / line drawing data output by the raster scan output unit 224 is reversibly compressed by the first compression unit 226. As an example of the compression method of the first compression unit 226, the above-described JPEG-LS method, which is one of the reversible compressions most suitable for compression of character / line image data, can be cited. The first compression unit 226 is suitable for data input by a raster scan method.
The image data output by the block scan output unit 225 is irreversibly compressed by the second compression unit 227. As an example of the compression method of the second compression unit 227, there is a JPEG method that is one of irreversible compressions that is optimal for image data compression. Data input by the block scan method is suitable for the second compression unit 227.
In the JPEG method, discrete cosine transform (DCT) is applied to each pixel value in units of block images of 8 × 8 pixels, and converted to frequency coefficients that are coefficients for each frequency component of each basis function of frequency conversion. To do. Then, the converted frequency coefficient is approximated by quantization. The quantization is performed by dividing each element of the frequency coefficient of 8 rows and 8 columns after the DCT is performed by each corresponding element of a quantization table composed of a total of 64 quantization coefficients of 8 rows and 8 columns. . Then, compressed data is generated by entropy encoding the integer part (quantization index) of the numerical value obtained by quantization using Huffman code or the like. In the case of a general image, the absolute value of the frequency coefficient tends to be smaller as the frequency component of a higher order (high frequency component), and the human visual characteristics have a lower resolution with respect to high frequencies. Among them, the amount of data is reduced by finely quantizing the low frequency component and coarsely quantizing the high frequency component.

第1圧縮部226,第2圧縮部227で圧縮された符号データは第1符号バッファ228,第2符号バッファ229に一時的に格納される。1バンド分のデータの圧縮処理が完了した後、符号結合部260は各符号バッファから各符号データを読み出し、1つの符号データに結合してHDD4へ出力する。   The code data compressed by the first compression unit 226 and the second compression unit 227 is temporarily stored in the first code buffer 228 and the second code buffer 229. After the compression processing of data for one band is completed, the code combining unit 260 reads each code data from each code buffer, combines it with one code data, and outputs it to the HDD 4.

以下に、実施の形態1のプリンタ10を用いた画像圧縮方法について説明する。
SoC1のCPUは、システムメモリ5に記憶された画像圧縮処理のプログラムを読み出し、該プログラムに従って画像圧縮処理を実行する。
図4は、SoC1のCPUによる圧縮処理の手順を示すフローチャートである。以下、1ページ分の画像データを圧縮する場合について説明する。
CPUは、ラスタデータ生成部21から画像データと属性データとを画像分離部221へ入力させる(S1)。
そして、画像分離部221に、画像データを属性データに基づいて1画素ずつ文字/線画データ,イメージデータに分離させ(S2)、分離した文字/線画データ,イメージデータをそれぞれ第1バンドバッファ222,第2バンドバッファ223に格納させる(S3)。
次に、CPUは、1バンド分の文字/線画データ,イメージデータを第1バンドバッファ222,第2バンドバッファ223に格納にしたか否かを判定する(S4)。1バンド分の文字/線画データ,イメージデータを第1バンドバッファ222,第2バンドバッファ223に格納にしていないと判定した場合(S4:NO)、処理をステップS1へ戻す。
Hereinafter, an image compression method using the printer 10 according to the first embodiment will be described.
The CPU of the SoC 1 reads the image compression processing program stored in the system memory 5 and executes the image compression processing according to the program.
FIG. 4 is a flowchart showing a procedure of compression processing by the CPU of SoC1. Hereinafter, a case where image data for one page is compressed will be described.
The CPU inputs image data and attribute data from the raster data generation unit 21 to the image separation unit 221 (S1).
Then, the image separation unit 221 separates the image data into character / line drawing data and image data pixel by pixel based on the attribute data (S2), and the separated character / line drawing data and image data are respectively sent to the first band buffer 222, It is stored in the second band buffer 223 (S3).
Next, the CPU determines whether or not character / line drawing data and image data for one band are stored in the first band buffer 222 and the second band buffer 223 (S4). When it is determined that character / line drawing data and image data for one band are not stored in the first band buffer 222 and the second band buffer 223 (S4: NO), the process returns to step S1.

CPUは、1バンド分の文字/線画データ,イメージデータを第1バンドバッファ222,第2バンドバッファ223に格納したと判定した場合(S4:YES)、ラスタスキャン出力部224に、第1バンドバッファ222からラスタスキャン方式により文字/線画データを読み出させ、第1圧縮部226へ出力させる。また、CPUは、ブロックスキャン出力部225に、第2バンドバッファ223からブロックスキャン方式によりイメージデータを読み出させ、第2圧縮部227へ出力させる。そして、第1圧縮部226は文字/線画データについて、上述のJPEG−LS方式等により可逆圧縮を行い、第2圧縮部227はイメージデータについて、上述のJPEG方式等により非可逆圧縮を行う(S5)。   When the CPU determines that character / line drawing data and image data for one band have been stored in the first band buffer 222 and the second band buffer 223 (S4: YES), the raster scan output unit 224 receives the first band buffer. Character / line drawing data is read from the image data 222 by the raster scan method and output to the first compression unit 226. Further, the CPU causes the block scan output unit 225 to read the image data from the second band buffer 223 by the block scan method, and outputs the image data to the second compression unit 227. Then, the first compression unit 226 performs lossless compression on the character / line drawing data by the above-described JPEG-LS method or the like, and the second compression unit 227 performs lossy compression on the image data by the above-described JPEG method or the like (S5). ).

図5は、ラスタスキャン方式で圧縮部へ出力する場合を示す説明図である。図5に示すように、ラスタスキャン方式とは、画像データを主走査方向に(同一行は)1画素ずつ左から右へ読み出し、各行を上から下へ連続して読み出して出力する方式である。
図6は、ブロックスキャン方式で圧縮部へ出力する場合を示す説明図である。図6に示すように、ブロックスキャン方式とは、画像を8×8画素の矩形のブロックに分割し、ブロック内を1画素ずつ左から右へ、上から下にラスタスキャンして出力する方式である。
FIG. 5 is an explanatory diagram showing a case where data is output to the compression unit by the raster scan method. As shown in FIG. 5, the raster scan method is a method in which image data is read pixel by pixel from the left to the right (in the same row) in the main scanning direction, and each row is read and output continuously from top to bottom. .
FIG. 6 is an explanatory diagram illustrating a case where data is output to the compression unit using the block scan method. As shown in FIG. 6, the block scan method is a method in which an image is divided into 8 × 8 pixel rectangular blocks, and the inside of the block is raster-scanned pixel by pixel from left to right and from top to bottom. is there.

そして、CPUは、第1圧縮部226,第2圧縮部227から第1符号バッファ228,第2符号バッファ229へ符号データを出力して記憶させる。さらに、符号結合部260に第1符号バッファ228,第2符号バッファ229から各符号データを読み出させ、各符号データを1つの符号データに結合させて(1つのパケットに結合させて)、HDD4へ出力させる(S6)。
CPUは、1ページ分の符号データをHDD4へ出力したか否かを判定する(S7)。CPUは、1ページ分の符号データをHDD4へ出力していないと判定した場合(S7:NO)、処理をステップS1へ戻す。1ページ分の符号データをHDD4へ出力したと判定した場合(S7:YES)、画像データの圧縮処理を終了する。
Then, the CPU outputs the code data from the first compression unit 226 and the second compression unit 227 to the first code buffer 228 and the second code buffer 229 and stores them. Further, the code combining unit 260 reads each code data from the first code buffer 228 and the second code buffer 229, combines each code data into one code data (combines into one packet), and HDD4. (S6).
The CPU determines whether code data for one page has been output to the HDD 4 (S7). If the CPU determines that the code data for one page has not been output to the HDD 4 (S7: NO), the process returns to step S1. If it is determined that one page of code data has been output to the HDD 4 (S7: YES), the image data compression process is terminated.

図7は、HDD4へ出力される符号データのフォーマットを示す説明図である。
符号の先頭のヘッダにはジョブ管理番号、画像サイズ等の画像データに関する情報が格納されている。このヘッダに続いて、第1バンド符号、第2バンド符号、…第Nバンド符号と各バンド符号が出力される。各バンド符号は、符号識別子、文字/線画データを可逆圧縮した可逆圧縮符号、符号識別子、及びイメージデータを非可逆圧縮した非可逆圧縮符号から構成される。
FIG. 7 is an explanatory diagram showing the format of the code data output to the HDD 4.
Information related to image data such as a job management number and an image size is stored in the header at the top of the code. Subsequent to this header, a first band code, a second band code,... Nth band code and each band code are output. Each band code includes a code identifier, a lossless compression code obtained by lossless compression of character / line image data, a code identifier, and an irreversible compression code obtained by lossy compression of image data.

図8は、上述の符号識別子の一例を示す説明図である。符号識別子として、圧縮方法(方式)の種別、符号サイズ等の符号データを識別するための情報が定義されており、7ビット目に圧縮方法の種別が、0から6ビット目に符号サイズのデータが格納されている。   FIG. 8 is an explanatory diagram showing an example of the above-described code identifier. Information for identifying code data such as the type of compression method (method) and code size is defined as a code identifier, the type of compression method is defined in the 7th bit, and code size data in the 0th to 6th bits. Is stored.

図9は、640×480画素からなる複数サンプルの画像データをブロックスキャン方式及びラスタスキャン方式それぞれの方式により第1圧縮部226へ出力し、JPEG−LSで圧縮した場合の符号サイズを測定した結果を示すグラフである。横軸はラスタスキャン方式による符号サイズ、縦軸はブロックスキャン方式の符号サイズを示す。点線で示す補助線は両方式で符号サイズが同じであることを表す。
図9のグラフよりラスタスキャン方式で出力して得られた符号のサイズより、ブロックスキャン方式で出力して得られた符号のサイズの方が大きいことが分かる。
図10は、図9のグラフを変形させたものである。横軸はブロックスキャン方式の符号サイズ、縦軸はラスタスキャン方式の符号サイズをブロックスキャン方式の符号サイズで除して得られた符号サイズ比である。このグラフより符号サイズ比は0.1〜0.4の範囲内にあり、常に1以下となっている。これによりブロックスキャン方式で出力して圧縮する場合よりもラスタスキャン方式で出力して圧縮する方が、周辺画素による注目画素の予測の精度が向上し、圧縮率が高くなることが確認された。
FIG. 9 shows the result of measuring the code size when the image data of a plurality of samples composed of 640 × 480 pixels is output to the first compression unit 226 by the block scan method and the raster scan method, respectively, and compressed by JPEG-LS. It is a graph which shows. The horizontal axis indicates the code size by the raster scan method, and the vertical axis indicates the code size by the block scan method. An auxiliary line indicated by a dotted line indicates that the code size is the same in both systems.
It can be seen from the graph of FIG. 9 that the code size obtained by the block scan method is larger than the code size obtained by the raster scan method.
FIG. 10 is a modification of the graph of FIG. The horizontal axis represents the code size of the block scan method, and the vertical axis represents the code size ratio obtained by dividing the code size of the raster scan method by the code size of the block scan method. From this graph, the code size ratio is in the range of 0.1 to 0.4, and is always 1 or less. As a result, it was confirmed that the accuracy of prediction of the pixel of interest by the peripheral pixels is improved and the compression rate is higher when the output is compressed by the raster scan method than when the output is compressed by the block scan method.

以上のように画像圧縮部22において圧縮され、HDD4に格納された圧縮(符号)データは、上述したように画像伸長部23において伸長され、伸長されたデータは色補正及び階調再現処理等の処理を施された上で印刷エンジン部3へ出力され、画像が用紙等に印刷される。   As described above, the compressed (code) data compressed in the image compression unit 22 and stored in the HDD 4 is expanded in the image expansion unit 23 as described above, and the expanded data is subjected to color correction, tone reproduction processing, and the like. After being processed, it is output to the print engine unit 3 and an image is printed on paper or the like.

上述したように、本実施の形態においては、JPEG−LS方式で可逆圧縮を行う第1圧縮部226へはラスタスキャン方式で文字/線画データが入力されるので、印刷時の画質の劣化は抑制しつつ、圧縮時にはブロックスキャン方式で文字/線画データが第1圧縮部226へ入力される場合と比較して圧縮率を向上させることができる。   As described above, in this embodiment, since the character / line drawing data is input by the raster scan method to the first compression unit 226 that performs the lossless compression by the JPEG-LS method, the deterioration of the image quality at the time of printing is suppressed. However, at the time of compression, the compression rate can be improved as compared with the case where the character / line drawing data is input to the first compression unit 226 by the block scan method.

また、画像の複数行(バンド)単位で圧縮処理するので、符号データの結合前に各符号を記憶しておくメモリ(第1符号バッファ228,第2符号バッファ229)の容量を削減することができる。そして、第1符号バッファ228,第2符号バッファ229から出力される符号データを1つの符号データにパッキングしてHDD4へ出力するので、符号データの管理が簡易化される。
そして、バンドが8画素行からなるので、8×8画素単位で処理を行うJPEG方式による圧縮に最適なライン数で処理することができる。これにより第2符号バッファ229の容量及び回路規模を効率的に削減することができる。
なお、本実施の形態においては、RGB信号に基づいて符号化した場合につき説明しているがこれに限定されるものではなく、YCbCr信号に基づいて符号化することにしもてよい。
In addition, since compression processing is performed in units of a plurality of rows (bands) of an image, it is possible to reduce the capacity of the memory (first code buffer 228, second code buffer 229) that stores each code before combining the code data. it can. Since the code data output from the first code buffer 228 and the second code buffer 229 are packed into one code data and output to the HDD 4, the management of the code data is simplified.
Since the band is composed of 8 pixel rows, processing can be performed with the optimum number of lines for compression by the JPEG method in which processing is performed in units of 8 × 8 pixels. Thereby, the capacity and circuit scale of the second code buffer 229 can be efficiently reduced.
In the present embodiment, the case of encoding based on RGB signals has been described, but the present invention is not limited to this, and encoding may be performed based on YCbCr signals.

実施の形態2.
本発明の実施の形態2に係るプリンタ30は、実施の形態1に係るプリンタ10と同様の構成を有し、画像処理部8の画像圧縮部82の構成が実施の形態1に係る画像圧縮部22の構成と異なる。また、プリンタ30はレジスタI/F7を備える。
図11は、プリンタ30の画像処理部8の構成及びデータフローを示す図である。図中、図2と同一部分は同一符号を付して詳細な説明を省略する。画像処理部8は、ラスタデータ生成部81、画像圧縮部82、画像伸長部83、色補正部84、及び中間調処理部85を備えている。ラスタデータ生成部81、画像伸長部83、色補正部84、及び中間調処理部85は、実施の形態1のプリンタ10のラスタデータ生成部21、画像伸長部23、色補正部24、及び中間調処理部25と同一の構成を有する。
SoC1のCPUは、ユーザがプリンタ30のタッチパネル等の表示部(図示せず)の操作ボタンを押圧して行う各種の指示、選択を受け付けるように構成されている。表示部において、文字/線画データ及びイメージデータそれぞれにつき、可逆圧縮方式及び非可逆圧縮方式のうちのいずれかの圧縮方式を選択するための選択画面を表示し、ユーザから選択を受け付けた場合、CPUはレジスタI/F7を介して、画像圧縮部82の圧縮モードレジスタ865に圧縮方式の設定を記憶する。
Embodiment 2. FIG.
The printer 30 according to the second embodiment of the present invention has the same configuration as the printer 10 according to the first embodiment, and the configuration of the image compression unit 82 of the image processing unit 8 is the image compression unit according to the first embodiment. 22 is different. The printer 30 includes a register I / F 7.
FIG. 11 is a diagram illustrating the configuration and data flow of the image processing unit 8 of the printer 30. In the figure, the same parts as those in FIG. The image processing unit 8 includes a raster data generation unit 81, an image compression unit 82, an image expansion unit 83, a color correction unit 84, and a halftone processing unit 85. The raster data generation unit 81, the image expansion unit 83, the color correction unit 84, and the halftone processing unit 85 are the raster data generation unit 21, the image expansion unit 23, the color correction unit 24, and the intermediate of the printer 10 according to the first embodiment. The tone processing unit 25 has the same configuration.
The CPU of the SoC 1 is configured to receive various instructions and selections that are made by a user pressing an operation button of a display unit (not shown) such as a touch panel of the printer 30. When the display unit displays a selection screen for selecting one of the lossless compression method and the lossy compression method for each of the character / line drawing data and the image data, and receives a selection from the user, the CPU Stores the compression method setting in the compression mode register 865 of the image compression unit 82 via the register I / F 7.

図12は、画像圧縮部82の構成を示すブロック図である。
画像圧縮部82は、画像分離部821、第1バンドバッファ822、第2バンドバッファ823、ラスタスキャン出力部824,826、ブロックスキャン出力部825,827、第1圧縮部828,860、第2圧縮部829,861、第1符号バッファ862、第2符号バッファ863、及び符号結合部864を備えている。第1圧縮部828,860においては可逆圧縮が行われ、第2圧縮部829,861においては非可逆圧縮が行われる。
FIG. 12 is a block diagram illustrating a configuration of the image compression unit 82.
The image compression unit 82 includes an image separation unit 821, a first band buffer 822, a second band buffer 823, raster scan output units 824 and 826, block scan output units 825 and 827, first compression units 828 and 860, and second compression. Sections 829 and 861, a first code buffer 862, a second code buffer 863, and a code combining section 864. The first compression units 828 and 860 perform lossless compression, and the second compression units 829 and 861 perform lossy compression.

上述したように、圧縮モードレジスタ865には圧縮方式の設定が記憶されている。設定された情報は、ラスタスキャン出力部824,826、ブロックスキャン出力部825,827、第1圧縮部828,860、第2圧縮部829,861、及び符号結合部864に伝達されている。
画像分離部821へラスタデータ生成部81から画像データ及び属性データが入力される。
画像分離部821においては、画像データが属性データに基づいて文字/線画データとイメージデータとに分離される。
分離された文字/線画データ,イメージデータはそれぞれ第1バンドバッファ828,第2バンドバッファ829に格納される。
本実施の形態においては、圧縮処理を8画素行からなる1バンド毎に行うので、第1バンドバッファ828,第2バンドバッファ829のサイズは、主走査(画素ライン:行)の画素数×8となる。
As described above, the compression mode register 865 stores the compression method setting. The set information is transmitted to the raster scan output units 824 and 826, the block scan output units 825 and 827, the first compression units 828 and 860, the second compression units 829 and 861, and the code combination unit 864.
Image data and attribute data are input from the raster data generation unit 81 to the image separation unit 821.
In the image separation unit 821, the image data is separated into character / line drawing data and image data based on the attribute data.
The separated character / line drawing data and image data are stored in the first band buffer 828 and the second band buffer 829, respectively.
In the present embodiment, since compression processing is performed for each band of 8 pixel rows, the size of the first band buffer 828 and the second band buffer 829 is the number of pixels in main scanning (pixel line: row) × 8. It becomes.

ユーザが文字/線画データは非可逆圧縮方式により圧縮を行い、イメージデータは可逆圧縮方式により圧縮を行うことを選択した場合、すなわち、文字/線画データは第2圧縮部829により圧縮を行い、イメージデータは第1圧縮部860により圧縮を行うことを選択した場合、第1バンドバッファ822に格納された文字/線画データは、ブロックスキャン出力部825によりブロックスキャン方式で読み出されて第2圧縮部829へ出力される。第2バンドバッファ823に格納されたイメージデータは、ラスタスキャン出力部826によりラスタスキャン方式で読み出されて第1圧縮部860へ出力される。   When the user selects to compress the character / line image data by the lossy compression method and the image data to be compressed by the lossless compression method, that is, the character / line image data is compressed by the second compression unit 829 and the image data is compressed. When the data is selected to be compressed by the first compression unit 860, the character / line drawing data stored in the first band buffer 822 is read by the block scan output unit 825 by the block scan method, and the second compression unit 829. The image data stored in the second band buffer 823 is read out by the raster scan output unit 826 by the raster scan method and output to the first compression unit 860.

ブロックスキャン出力部825により出力された画像データは第2圧縮部829で非可逆圧縮される。第2圧縮部829の圧縮方式の一例としてJPEG方式が挙げられる。
ラスタスキャン出力部826により出力された画像データは第1圧縮部860で可逆圧縮される。第1圧縮部860の圧縮方式の一例として、JPEG−LS方式が挙げられる。
The image data output by the block scan output unit 825 is irreversibly compressed by the second compression unit 829. An example of the compression method of the second compression unit 829 is the JPEG method.
The image data output by the raster scan output unit 826 is reversibly compressed by the first compression unit 860. An example of the compression method of the first compression unit 860 is a JPEG-LS method.

第2圧縮部829,第1圧縮部860で圧縮された符号データは第1符号バッファ862,第2符号バッファ863に一時的に格納される。1バンド分の圧縮処理が完了した後、符号結合部864は第1符号バッファ862,第2符号バッファ863から各符号データを読み出し、1つの符号データに結合してHDD4へ出力する。   The code data compressed by the second compression unit 829 and the first compression unit 860 is temporarily stored in the first code buffer 862 and the second code buffer 863. After the compression processing for one band is completed, the code combining unit 864 reads each code data from the first code buffer 862 and the second code buffer 863 and combines them into one code data and outputs it to the HDD 4.

ユーザが文字/線画データは可逆圧縮方式により圧縮を行い、イメージデータは非可逆圧縮方式により圧縮を行うことを選択した場合、すなわち、文字/線画データは第1圧縮部828により圧縮を行い、イメージデータは第2圧縮部861により圧縮を行うことを選択した場合、第1バンドバッファ822に格納された文字/線画データは、ラスタスキャン出力部824によりラスタスキャン方式で読み出されて第1圧縮部828へ出力される。第2バンドバッファ823に格納されたイメージデータは、ブロックスキャン出力部827によりブロックスキャン方式で読み出されて第2圧縮部861へ出力される。   When the user selects to compress the character / line image data by the lossless compression method and the image data to be compressed by the lossy compression method, that is, the character / line image data is compressed by the first compression unit 828, and the image data is compressed. When the data is selected to be compressed by the second compression unit 861, the character / line drawing data stored in the first band buffer 822 is read out by the raster scan output unit 824 by the raster scan method, and the first compression unit To 828. The image data stored in the second band buffer 823 is read by the block scan output unit 827 by the block scan method and output to the second compression unit 861.

ラスタスキャン出力部824により出力された画像データは第1圧縮部828でJPEG−LS方式等により可逆圧縮される。
ブロックスキャン出力部827により出力された画像データは第2圧縮部861でJPEG方式等により非可逆圧縮される。
The image data output by the raster scan output unit 824 is reversibly compressed by the first compression unit 828 by the JPEG-LS method or the like.
The image data output from the block scan output unit 827 is irreversibly compressed by the second compression unit 861 using the JPEG method or the like.

第1圧縮部828,第2圧縮部861で圧縮された符号データは第1符号バッファ862,第2符号バッファ863に一時的に格納される。1バンド分の圧縮処理が完了した後、符号結合部864は第1符号バッファ862,第2符号バッファ863から各符号データを読み出し、1つの符号データに結合してHDD4へ出力する。   The code data compressed by the first compression unit 828 and the second compression unit 861 is temporarily stored in the first code buffer 862 and the second code buffer 863. After the compression processing for one band is completed, the code combining unit 864 reads each code data from the first code buffer 862 and the second code buffer 863 and combines them into one code data and outputs it to the HDD 4.

以下に、実施の形態2のプリンタ30を用いた画像圧縮方法について説明する。
SoC1のCPUは、システムメモリ5に記憶された画像圧縮処理のプログラムを読み出し、該プログラムに従って画像圧縮処理を実行する。
図13は、SoC1のCPUによる圧縮処理の手順を示すフローチャートである。
CPUは、PC20から印刷データを入力したか否かを判定する(S11)。
印刷データを入力したと判定した場合(S11:YES)、表示部に、文字/線画データ及びイメージデータそれぞれにつき、可逆圧縮方式及び非可逆圧縮方式のうちのいずれかの圧縮方式を選択するための選択画面を表示させ、ユーザから各データについて圧縮方式の選択を受け付けたか否かを判定する(S12)。ここで、文字/線画データについて第1圧縮部828及び第2圧縮部829のうちのいずれの圧縮部で圧縮を行うか、イメージデータについて第1圧縮部860及び第2圧縮部861のうちのいずれの圧縮部で圧縮を行うかの選択を受け付けることにしてもよい。CPUは、「記憶手段からデータを読み出す読出手段の選択を受け付ける手段」として機能する。
The image compression method using the printer 30 according to the second embodiment will be described below.
The CPU of the SoC 1 reads the image compression processing program stored in the system memory 5 and executes the image compression processing according to the program.
FIG. 13 is a flowchart showing a procedure of compression processing by the CPU of SoC1.
The CPU determines whether print data has been input from the PC 20 (S11).
When it is determined that the print data has been input (S11: YES), the display unit selects one of the lossless compression method and the lossy compression method for each of the character / line drawing data and the image data. A selection screen is displayed, and it is determined whether selection of a compression method for each data has been received from the user (S12). Here, which one of the first compression unit 828 and the second compression unit 829 compresses the character / line image data, and which of the first compression unit 860 and the second compression unit 861 is performed on the image data. The selection of whether or not to perform compression may be accepted. The CPU functions as “means for accepting selection of reading means for reading data from the storage means”.

CPUは、圧縮方式又は圧縮部の選択を受け付けていないと判定した場合(S12:NO)、この判定を繰り返す。
CPUは圧縮方式又は圧縮部の選択を受け付けたと判定した場合(S12:YES)、ラスタデータ生成部21に画像データ(ラスタデータ)と属性データとを生成させ、画像分離部821へ画像データと属性データとを入力させる(S13)。
そして、画像分離部821に、属性データに基づいて画像データを1画素ずつ文字/線画データ,イメージデータ属性データに分離させ(S14)、分離した文字/線画データ,イメージデータをそれぞれ第1バンドバッファ822,第2バンドバッファ823に格納させる(S15)。
When determining that the selection of the compression method or the compression unit is not accepted (S12: NO), the CPU repeats this determination.
When the CPU determines that the selection of the compression method or the compression unit has been received (S12: YES), the raster data generation unit 21 generates image data (raster data) and attribute data, and the image separation unit 821 generates the image data and attribute. Data is input (S13).
Then, the image separation unit 821 separates the image data into character / line drawing data and image data attribute data pixel by pixel based on the attribute data (S14), and the separated character / line drawing data and image data are respectively sent to the first band buffer. The data is stored in the second band buffer 823 (S15).

次に、CPUは、1バンド分の画像データを第1バンドバッファ822,第2バンドバッファ823に格納したか否かを判定する(S16)。1バンド分の画像データを第1バンドバッファ822,第2バンドバッファ823に格納していないと判定した場合(S16:NO)、処理をステップS13へ戻す。
そして、CPUは、1バンド分の画像データを第1バンドバッファ822,第2バンドバッファ823に格納したと判定した場合(S16:YES)、文字/線画データ,イメージデータがそれぞれ選択された圧縮方式で圧縮されるように、対応する出力部に文字/線画データ,イメージデータを読み出させて対応する圧縮部へ出力させ、データを圧縮させる(S17)。
Next, the CPU determines whether image data for one band has been stored in the first band buffer 822 and the second band buffer 823 (S16). When it is determined that the image data for one band is not stored in the first band buffer 822 and the second band buffer 823 (S16: NO), the process returns to step S13.
When the CPU determines that the image data for one band has been stored in the first band buffer 822 and the second band buffer 823 (S16: YES), the compression method in which the character / line image data and the image data are respectively selected. The character / line drawing data and image data are read out to the corresponding output unit and output to the corresponding compression unit so that the data is compressed (S17).

例えばユーザが文字/線画データは非可逆圧縮方式により圧縮を行い、イメージデータは可逆圧縮方式により圧縮を行うことを選択し、この選択が設定されていた場合、CPUは、第1バンドバッファ822に格納された文字/線画データを、ブロックスキャン出力部825によりブロックスキャン方式で読み出させて第2圧縮部829へ出力させ、第2圧縮部829において非可逆圧縮させる。そして、第2バンドバッファ823に格納されたイメージデータを、ラスタスキャン出力部826によりラスタスキャン方式で読み出させて第1圧縮部860へ出力させ、第1圧縮部860において可逆圧縮させる。   For example, if the user selects to compress character / line image data by the lossy compression method and the image data to be compressed by the lossless compression method, and this selection is set, the CPU stores the data in the first band buffer 822. The stored character / line drawing data is read by the block scan output unit 825 by the block scan method, and is output to the second compression unit 829, and is irreversibly compressed by the second compression unit 829. Then, the image data stored in the second band buffer 823 is read out by the raster scan output unit 826 by the raster scan method, output to the first compression unit 860, and reversibly compressed by the first compression unit 860.

CPUは各圧縮部で圧縮が終了した場合、各圧縮部から第1符号バッファ862,第2符号バッファ863へ符号データを出力して記憶させ、符号結合部864に第1符号バッファ862,第2符号バッファ863から符号データを読み出させ、1つの符号データにパッキングさせて(1つのパケットに結合させて)HDD4へ出力させる(S18)。
CPUは、印刷指示された全画像データに係る符号データをHDD4へ出力したか否かを判定する(S19)。CPUは、全画像データに係る符号データをHDD4へ出力していないと判定した場合(S19:NO)、処理をステップS13へ戻す。全画像データに係る符号データをHDD4へ出力したと判定した場合(S19:YES)、圧縮処理を終了する。
When the compression ends in each compression unit, the CPU outputs code data from each compression unit to the first code buffer 862 and the second code buffer 863 and stores the code data in the first code buffer 862 and the second code buffer 862. Code data is read from the code buffer 863, packed into one code data (combined into one packet), and output to the HDD 4 (S18).
The CPU determines whether or not the code data related to all image data for which printing has been instructed has been output to the HDD 4 (S19). If the CPU determines that the code data related to all the image data has not been output to the HDD 4 (S19: NO), the process returns to step S13. If it is determined that the code data related to all the image data has been output to the HDD 4 (S19: YES), the compression process is terminated.

本実施の形態においては、文字画像及び/又は線画像のデータを非可逆圧縮して圧縮率をさらに向上させたい場合、イメージ画像のデータを可逆圧縮して画質劣化を抑制したい場合等、ユーザの指定により種々の圧縮方式を組み合わせることができる。従って、ユーザが指定する圧縮方法(可逆、非可逆)に柔軟に対応することができ、その圧縮方式に最適なデータ入力方式によりデータを対応する圧縮部へ供給するので、圧縮率の向上を図ることが可能となる。
なお、本実施の形態においては、ユーザから印刷指示を受け付ける都度、圧縮方式又は圧縮部の選択を受け付ける場合につき説明しているがこれに限定されるものではなく、最初に圧縮方式又は圧縮部の選択を受け付け、圧縮モードレジスタ865に記憶しておくことにしてもよい。但し、印刷指示を受け付ける都度、圧縮方式又は圧縮部の選択を受け付ける場合、印刷画像の各領域に対応して種々の圧縮方式を組み合わせることができる。
In the present embodiment, when the character image and / or line image data is irreversibly compressed to further improve the compression rate, the image image data is reversibly compressed to suppress image quality degradation, etc. Various compression methods can be combined depending on the specification. Therefore, it is possible to flexibly cope with the compression method (reversible or irreversible) designated by the user, and the data is supplied to the corresponding compression unit by the data input method optimal for the compression method, so that the compression rate is improved. It becomes possible.
In the present embodiment, each time a print instruction is received from a user, the selection of a compression method or compression unit is described. However, the present invention is not limited to this. The selection may be accepted and stored in the compression mode register 865. However, each time a print instruction is received, when selecting a compression method or a compression unit, various compression methods can be combined corresponding to each area of the print image.

そして、前記実施の形態1及び2においては、画像形成装置として、プリンタ10,30を適用した場合につき説明しているがこれに限定されるものではなく、画像形成装置はプリンタ機能の他に、コピー機能及びファックス機能等を有するデジタル複合機であってもよい。   In the first and second embodiments, the case where the printers 10 and 30 are applied as the image forming apparatus has been described. However, the present invention is not limited to this. A digital multi-function peripheral having a copy function and a fax function may be used.

また、画像圧縮部22,82の画像分離部221,821により文字/線画データとイメージデータとに分離する場合につき説明しているがデータの分離の仕方はこれに限定されるものではない。
そして、データの圧縮処理を8行からなるバンド毎に行う場合につき説明しているが、行数は8行に限定されない。但し、圧縮処理を8行からなるバンド毎に行う場合、非可逆圧縮方式としてJPEG方式を用いたときに、8×8画素単位で処理するJPEG方式による圧縮に最適な行数で処理することができるので、行数は8行であるのが好ましい。
Further, the case where the image separation units 221 and 821 of the image compression units 22 and 82 separate the text / line drawing data and the image data has been described, but the data separation method is not limited to this.
Although the case where the data compression process is performed for each band of 8 rows has been described, the number of rows is not limited to 8 rows. However, when compression processing is performed for each band of 8 rows, when the JPEG method is used as the lossy compression method, processing can be performed with the optimum number of rows for compression by the JPEG method in which processing is performed in units of 8 × 8 pixels. Since this is possible, the number of rows is preferably eight.

さらに、画像圧縮方法は、CPUがシステムメモリ5に記憶された画像データ圧縮処理のプログラムに従って実行することにより実現される場合に限定されない。そして、図示しないROMに前記プログラムを記憶することにしてもよい。システムメモリ5及びROMが本発明の記録媒体に相当する。
また、本発明の記録媒体は、画像データ圧縮処理を行うプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)を記録した、持ち運び自在の記録媒体であってもよい。この場合、プリンタ10,30がプログラム読み取り装置を備え、又はプリンタ10,30にプログラム読み取り装置が接続されており、該プログラム読み取り装置に前記記録媒体が挿入されてプログラムが読み取られる。
記録媒体としては、磁気テープ及びカセットテープ等のテープ系記録媒体、フレキシブルディスク及びハードディスク等の磁気ディスク、並びにCD−ROM/MO/MD/DVD等の光ディスク等のディスク系記録媒体、ICカード(メモリカードを含む)/光カード等のカード系記録媒体、又はマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等の半導体メモリ系記録媒体等の固定的にプログラムコードを担持する記録媒体が挙げられる。
Further, the image compression method is not limited to the case where the CPU is realized by executing it according to the image data compression processing program stored in the system memory 5. The program may be stored in a ROM (not shown). The system memory 5 and the ROM correspond to the recording medium of the present invention.
The recording medium of the present invention may be a portable recording medium that records program codes (execution format program, intermediate code program, source program) for performing image data compression processing. In this case, the printers 10 and 30 include a program reading device, or a program reading device is connected to the printers 10 and 30, and the program is read by inserting the recording medium into the program reading device.
Recording media include tape-based recording media such as magnetic tape and cassette tape, magnetic disks such as flexible disks and hard disks, and disk-based recording media such as optical disks such as CD-ROM / MO / MD / DVD, IC cards (memory Card-type recording media such as optical cards, etc., or fixed memory such as mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash ROM, etc. And a recording medium carrying a program code.

記録媒体に格納されているプログラムは、CPUがアクセスして実行する構成であってもよく、CPUがプログラムコードを読み出し、読み出されたプログラムコードがプログラム記憶エリアにダウンロードされて、そのプログラムが実行される構成であってもよい。このダウンロード用のプログラムは予めシステムメモリ5に格納されているものとする。   The program stored in the recording medium may be configured to be accessed and executed by the CPU. The CPU reads the program code, the read program code is downloaded to the program storage area, and the program is executed. It may be configured. It is assumed that this download program is stored in the system memory 5 in advance.

また、本実施の形態に係る画像形成装置は、インターネットを含む通信ネットワークを接続可能な構成とし、通信ネットワークからプログラムコードをダウンロードするように流動的にプログラムコードを担持する媒体であってもよい。このように通信ネットワークからプログラムをダウンロードする場合には、ダウンロード用のプログラムは予めシステムメモリ5に格納しておくか、又は別の記録媒体からインストールしておく。さらに、プログラムコードは電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態であってもよい。   Further, the image forming apparatus according to the present embodiment may be a medium that can be connected to a communication network including the Internet and that carries the program code in a fluid manner so as to download the program code from the communication network. When the program is downloaded from the communication network as described above, the download program is stored in the system memory 5 in advance or installed from another recording medium. Furthermore, the program code may be in the form of a computer data signal embedded in a carrier wave, embodied by electronic transmission.

1 SoC
2、8 画像処理部
21、81 ラスタデータ生成部
22、82 画像圧縮部
221、821 画像分離部
222、822 第1バンドバッファ
223、823 第2バンドバッファ
224、824、826 ラスタスキャン出力部
225、825、827 ブロックスキャン出力部
226、828、860 第1圧縮部
227、829、861 第2圧縮部
228、862 第1符号バッファ
229、863 第2符号バッファ
260、864 符号結合部
865 圧縮モードレジスタ
23、83 画像伸長部
24、84 色補正部
25、85 中間調処理部
3 印刷エンジン部
4 HDD
5 システムメモリ
6 ローカルメモリ
7 レジスタI/F
10、30 プリンタ
20 PC
1 SoC
2, 8 Image processing unit 21, 81 Raster data generation unit 22, 82 Image compression unit 221, 821 Image separation unit 222, 822 First band buffer 223, 823 Second band buffer 224, 824, 826 Raster scan output unit 225, 825, 827 Block scan output unit 226, 828, 860 First compression unit 227, 829, 861 Second compression unit 228, 862 First code buffer 229, 863 Second code buffer 260, 864 Code combination unit 865 Compression mode register 23 , 83 Image decompression unit 24, 84 Color correction unit 25, 85 Halftone processing unit 3 Print engine unit 4 HDD
5 System memory 6 Local memory 7 Register I / F
10, 30 Printer 20 PC

Claims (9)

複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割し、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離する分離手段、及び分離した各データを各別に記憶する複数の記憶手段を備え、各データを可逆圧縮手段又は非可逆圧縮手段により符号化して圧縮した後、符号化した各データを1つのデータに結合する画像圧縮処理装置であって、
一の記憶手段に記憶されたデータについて、同一行にある画素に対応するデータを順次的に読み出して前記可逆圧縮手段へ与える第1データ読出手段と、
他の記憶手段に記憶されたデータについて、画像を行方向に複数分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出して前記非可逆圧縮手段へ与える第2データ読出手段と
を備えることを特徴とする画像圧縮処理装置。
Separation means for dividing an image configured by arranging a plurality of pixels in a matrix in a column direction, and separating data corresponding to the divided image into data of a plurality of regions based on pixel attributes, and separation An image compression processing apparatus that includes a plurality of storage means for storing each data separately, encodes each data by a lossless compression means or an irreversible compression means, and then compresses each data into one data. There,
First data reading means for sequentially reading data corresponding to pixels in the same row for data stored in one storage means and giving the data to the lossless compression means;
For data stored in other storage means, second data that sequentially reads out data corresponding to the pixels in the same row for each block obtained by dividing the image into a plurality of rows in the row direction and gives the data to the irreversible compression means And an image compression processing apparatus.
前記分離手段は、画像のデータを8行毎に、複数の領域のデータに分離することを特徴とする請求項1に記載の画像圧縮処理装置。   The image compression processing apparatus according to claim 1, wherein the separation unit separates the image data into data of a plurality of regions every 8 rows. 前記分離手段は、画像のデータを文字画像及び/又は線画像に対応する領域のデータと、イメージ画像に対応する領域のデータとに分離することを特徴とする請求項1又は2に記載の画像圧縮処理装置。   3. The image according to claim 1, wherein the separation unit separates the image data into data of a region corresponding to a character image and / or a line image and data of a region corresponding to the image image. Compression processing device. 前記第1データ読出手段は、文字画像及び/又は線画像に対応する領域のデータを記憶した記憶手段から前記データを読み出し、
前記第2データ読出手段は、イメージ画像に対応する領域のデータを記憶した記憶手段から前記データを読み出すことを特徴とする請求項3に記載の画像圧縮処理装置。
The first data reading means reads the data from a storage means storing data of a region corresponding to a character image and / or a line image;
4. The image compression processing apparatus according to claim 3, wherein the second data reading unit reads the data from a storage unit that stores data of an area corresponding to an image.
各記憶手段からデータを読み出す読出手段の選択を受け付ける手段を備えることを特徴とする請求項3に記載の画像圧縮処理装置。   4. The image compression processing apparatus according to claim 3, further comprising means for receiving selection of a reading means for reading data from each storage means. 請求項1から5までのいずれか一つに記載の画像圧縮処理装置を備えることを特徴とする画像形成装置。   An image forming apparatus comprising the image compression processing apparatus according to claim 1. コンピュータに、複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割させ、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離させ、分離した各データを各別に記憶させ、各データを可逆圧縮又は非可逆圧縮により符号化して圧縮させた後、符号化した各データを1つのデータに結合させるコンピュータプログラムであって、
コンピュータに、記憶した一の領域のデータについて、同一行にある画素に対応するデータを順次的に読み出させて可逆圧縮させるステップと、
コンピュータに、記憶した他の領域のデータについて、画像を行方向に複数分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出させて非可逆圧縮させるステップと
を有することを特徴とするコンピュータプログラム。
The computer divides the image formed by arranging a plurality of pixels in a matrix in the column direction, and the data corresponding to the divided image is separated into data of a plurality of regions based on the attribute of the pixel. A computer program for storing each data separately, encoding each data by reversible compression or irreversible compression, and then combining each encoded data into one data,
A step of causing a computer to sequentially read out data corresponding to pixels in the same row and reversibly compress the stored data in one area;
A step of causing the computer to sequentially read out the data corresponding to the pixels in the same row for each block formed by dividing the image into a plurality of rows in the row direction, and to perform irreversible compression on the stored data of other regions. A computer program comprising:
請求項7に記載のコンピュータプログラムを記録してあることを特徴とするコンピュータでの読み取りが可能な記録媒体。   A computer-readable recording medium on which the computer program according to claim 7 is recorded. 複数の画素をマトリクス状に配置して構成される画像を列方向に複数分割し、分割した画像に対応するデータを画素の属性に基づいて複数の領域のデータに分離し、分離した各データを各別に記憶し、各データを可逆圧縮又は非可逆圧縮により符号化して圧縮した後、符号化した各データを1つのデータに結合する画像圧縮方法であって、
記憶した一の領域のデータについて、同一行にある画素に対応するデータを順次的に読み出して可逆圧縮するステップと、
記憶した他の領域のデータについて、画像を行方向に分割してなるブロック毎に、同一行にある画素に対応するデータを順次的に読み出して非可逆圧縮するステップと
を有することを特徴とする画像圧縮方法。
An image configured by arranging a plurality of pixels in a matrix is divided into a plurality of columns, and data corresponding to the divided image is separated into data of a plurality of regions based on the attributes of the pixels. An image compression method for storing each separately, encoding each data by reversible compression or irreversible compression, and then combining each encoded data into one data,
For the stored data of one region, the step of sequentially reading out the data corresponding to the pixels in the same row and performing lossless compression;
A step of sequentially reading data corresponding to pixels in the same row and irreversibly compressing each block obtained by dividing the image in the row direction with respect to the stored data of other regions. Image compression method.
JP2009127904A 2009-05-27 2009-05-27 Image compression processor, image forming apparatus, computer program, recording medium, and image compression method Pending JP2010278650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009127904A JP2010278650A (en) 2009-05-27 2009-05-27 Image compression processor, image forming apparatus, computer program, recording medium, and image compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009127904A JP2010278650A (en) 2009-05-27 2009-05-27 Image compression processor, image forming apparatus, computer program, recording medium, and image compression method

Publications (1)

Publication Number Publication Date
JP2010278650A true JP2010278650A (en) 2010-12-09

Family

ID=43425215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009127904A Pending JP2010278650A (en) 2009-05-27 2009-05-27 Image compression processor, image forming apparatus, computer program, recording medium, and image compression method

Country Status (1)

Country Link
JP (1) JP2010278650A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102021122154A1 (en) 2021-05-14 2022-11-17 Denso Ten Limited IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD AND IMAGE PROCESSING PROGRAM

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102021122154A1 (en) 2021-05-14 2022-11-17 Denso Ten Limited IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD AND IMAGE PROCESSING PROGRAM
US11902487B2 (en) 2021-05-14 2024-02-13 Denso Ten Limited Image processing device, image processing method, and computer readable medium

Similar Documents

Publication Publication Date Title
JP4533043B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP5052569B2 (en) Image compression apparatus, image compression method, image expansion apparatus, image expansion method, image forming apparatus, computer program, and recording medium
JP4861711B2 (en) Image processing apparatus, image compression method, image compression program, and recording medium
CN1756296B (en) Image processing apparatus and image processing method
JP4979323B2 (en) Image processing apparatus and control method thereof
JP4693603B2 (en) Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
JP2008028485A (en) Image processor and image processing method and information processor
JP2006080794A (en) Image coding device and method, computer program and computer readable storage medium
US20080159650A1 (en) Image processing apparatus and image processing method
JP4781198B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
JP2011151720A (en) Image processing apparatus
JP2005333393A (en) Image compressing device, image output device, image expanding device, printer, image processor, copying machine, image compression method, image expansion method, image processing program, and recording medium with image processing program recorded thereon
US20040208379A1 (en) Image processing apparatus that adjusts image size to make image divisible into tiles
US7373000B2 (en) Image processing apparatus
JP2010278650A (en) Image compression processor, image forming apparatus, computer program, recording medium, and image compression method
US6069980A (en) Adaptive character image generation and synthesis
JP2002051221A (en) Device, system and method for encoding and decoding image and storage medium
JP2010245976A (en) Image compressing apparatus, image processing apparatus, image forming apparatus, image compression method, image compression program and recording medium
JP5259862B2 (en) Image processing apparatus, image forming apparatus including the same, program, and recording medium
JP4047144B2 (en) Image processing apparatus and method
CN101237518B (en) Image processing method and apparatus
AU2004218686B2 (en) A Combined Spatial and Transform Domain Method for Compressing Image Data into a Fixed Size Buffer
JP4262145B2 (en) Image processing apparatus and control method thereof
JP4050157B2 (en) Image processing apparatus, image processing method, program, and storage medium