JP2006060490A - Image compressor and image compression program - Google Patents

Image compressor and image compression program Download PDF

Info

Publication number
JP2006060490A
JP2006060490A JP2004239719A JP2004239719A JP2006060490A JP 2006060490 A JP2006060490 A JP 2006060490A JP 2004239719 A JP2004239719 A JP 2004239719A JP 2004239719 A JP2004239719 A JP 2004239719A JP 2006060490 A JP2006060490 A JP 2006060490A
Authority
JP
Japan
Prior art keywords
compression
image
unit
data
image compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2004239719A
Other languages
Japanese (ja)
Inventor
Yukio Sugita
由紀夫 杉田
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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2004239719A priority Critical patent/JP2006060490A/en
Publication of JP2006060490A publication Critical patent/JP2006060490A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To make both of the maintenance of image quality and the improvement of a compression rate highly compatible regarding an image compressor which applies data compression processing to image data, and an image compression program for operating an information processor such as a computer as the image compressor. <P>SOLUTION: The image compressor is provided with a first image compressor 510 which generates first compressed data by applying irreversible compression processing to the image data, an image decompressor 520 which generates decompressed data by decompressing the first compressed data obtained with the first image compressor 510, a difference calculator 530 which calculates difference data by difference calculation of the image data before the irreversible compression processing by the first image compressor 510 and the decompressed data obtained with the image decompressor 520, and a second image compressor 540 which generates second compressed data by applying the irreversible compression processing to the difference data obtained with the difference calculator 530. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像データにデータ圧縮処理を施す画像圧縮装置、およびコンピュータ等の情報処理装置を画像圧縮装置として動作させる画像圧縮プログラムに関する。   The present invention relates to an image compression apparatus that performs data compression processing on image data, and an image compression program that causes an information processing apparatus such as a computer to operate as an image compression apparatus.

従来より、記憶容量の低減化や通信量の低減化等のために、画像データにデータ圧縮処理を施す技術が広く採用されている。   2. Description of the Related Art Conventionally, a technique for performing data compression processing on image data has been widely adopted in order to reduce storage capacity and communication volume.

例えば、特許文献1には、原画像から代表色を選定しCLUT(カラールックアップテーブル)を構成する際に、連続する色番号が近い値の色データを持つように色番号を割り当て、次にCLUTに対応したビットマップを作成して隣接画素間の色番号の差分を求め、差分が大きな値を取る場合、画質劣化を起こさない範囲でビットマップの色番号を変更し、差分を小さな値に偏らせ、差分データに対してランレングス符号化を施すという技術が開示されている。   For example, in Patent Document 1, when a representative color is selected from an original image and a CLUT (color look-up table) is configured, color numbers are assigned so that continuous color numbers have color data of close values, When a bitmap corresponding to the CLUT is created to obtain the difference in color number between adjacent pixels, and the difference takes a large value, the color number of the bitmap is changed within a range that does not cause image quality degradation, and the difference is set to a small value. A technique is disclosed in which run length encoding is applied to biased and differential data.

また、特許文献2には、各色に対応してそれぞれ割り当てられたデータが複数集まって構成される画像用データを非可逆圧縮して符号化し、そして、データの1つを透明色に割り当てると共に、その透明色を可逆とし、画像用データを即値(差分符号化の際の最初の値)とその即値に続く複数の差分値(差分符号化の際の前の値)とで構成し、それらの値を非可逆圧縮して符号化等する際、透明色を表す即値と差分値とを可逆とし、さらに、透明色を表す即値を、各一色のデータ値の中間の値としたり、透明色を表す差分値を「0」としたりするという技術が提案されている。   Further, Patent Document 2 encodes image data configured by irreversibly compressing a plurality of data assigned to each color and assigning one of the data to a transparent color, The transparent color is reversible, and the image data is composed of an immediate value (the first value at the time of differential encoding) and a plurality of differential values (the previous value at the time of differential encoding) following the immediate value. When encoding a value by irreversible compression, the immediate value representing the transparent color and the difference value are made reversible, and the immediate value representing the transparent color is set to an intermediate value between the data values of each color, or the transparent color is changed. A technique has been proposed in which the difference value to be expressed is set to “0”.

また、特許文献3には、数を予測された数(s’(j))と実際の数(s(j))との差分によって符号化することが提案されている。   Patent Document 3 proposes that the number is encoded by the difference between the predicted number (s' (j)) and the actual number (s (j)).

さらに、特許文献4には、n列目の画素データ列に対して、副走査方向の同一画素データの分布状況を認識するとともに、主走査方向の同ー画素データの分布状況を認識し、これらの認識結果を基に、副走査方向に連続する同ー画素データを圧縮処理するか、あるいは主走査方向に連続する同一画素データを圧縮処理するかを決定する画像圧縮装置が提案されている。   Further, Patent Document 4 recognizes the distribution status of the same pixel data in the sub-scanning direction and the distribution status of the same pixel data in the main scanning direction with respect to the n-th pixel data column. Based on this recognition result, there has been proposed an image compression device that determines whether to compress the same pixel data continuous in the sub-scanning direction or to compress the same pixel data continuous in the main scanning direction.

また、特許文献5には、画像データを予め小ブロックに分割し、注目領域が各小ブロックに含まれているかどうかを判断することにより注目領域とそれ以外の領域とで圧縮率を可変する技術が開示されている。   Japanese Patent Application Laid-Open No. 2005-228561 discloses a technique for dividing the image data into small blocks in advance, and determining whether or not the attention area is included in each small block, thereby changing the compression rate between the attention area and the other areas. Is disclosed.

さらに、特許文献6には、前段側の処理の結果を利用して画像データを複数のプレーンに分離し、複数のプレーンに分離された画像データに対して、前段側の処理の結果を利用して後段側の処理を行なうという多段階の処理により画像データを圧縮する技術が開示されている。   Further, in Patent Document 6, the image data is separated into a plurality of planes using the result of the process on the preceding stage, and the result of the process on the preceding stage is used for the image data separated into the plurality of planes. Thus, there is disclosed a technique for compressing image data by a multi-stage process in which a subsequent process is performed.

さらに、特許文献7には、入力された動画像データを1フレームごとにビットプレーンに分解し、その分解により生成された各プレーン群のデータをフレーム間、フレーム間双方で相関を用いて領域分割を行なうことによって符号化する技術が開示されている。   Further, Patent Document 7 discloses that input moving image data is decomposed into bit planes for each frame, and data of each plane group generated by the decomposition is divided into regions using correlation between frames and between frames. A technique for encoding by performing the above is disclosed.

ここで、データ圧縮技術を適用した1つのシステムを紹介する。   Here, one system to which the data compression technology is applied is introduced.

図1は、データ圧縮技術が適用されたプリントシステムの一例を示す図、図2は、プリントシステムにおけるデータ処理の流れを示す図である。   FIG. 1 is a diagram illustrating an example of a print system to which a data compression technique is applied, and FIG. 2 is a diagram illustrating a flow of data processing in the print system.

このプリントシステムは、図1に示すように、ホストコントローラ100と、インターフェース機器200と、プリンタ300とで構成されており、ホストコントローラ100とインターフェース機器200との間はSCSI等の汎用インターフェースケーブル150で接続され、さらにインターフェース機器200とプリンタ300との間は専用インターフェースケーブル250で接続されている。   As shown in FIG. 1, the print system includes a host controller 100, an interface device 200, and a printer 300. A general-purpose interface cable 150 such as SCSI is used between the host controller 100 and the interface device 200. Further, the interface device 200 and the printer 300 are connected by a dedicated interface cable 250.

ホストコントローラ100の内部では、図2に示すように、PDF,PS,TIFF等、様々な言語やフォーマットで記述された文字や画像のデータ11が、画像(CT;Continuous Tone)データと文字やライン等(LW;Line Work)のデータとに分けられて、それぞれについてRIP(Raster Image Processing)を行なうことによりビットマップデータ12A,13Aが生成され、さらにそれぞれについてデータ圧縮処理が行なわれて、CTについては非可逆の圧縮データ14、LWについては可逆の圧縮データ15が生成される。これらの圧縮データ14,15は、図1に示す汎用インターフェースケーブル150を経由して、ホストコントローラ100からインターフェース機器200に転送される。インターフェース機器200では、転送されてきた圧縮データ14,15にデータ伸長処理を施して、ホストコントローラ100でデータ圧縮処理を行なう前の状態のビットマップデータ12A,13Aに対応するビットマップデータ12B,13Bを生成する。ここで、CTデータについてはホストコントローラ100でのデータ圧縮の際非可逆圧縮処理が行なわれているため、データ伸長後のCTデータ(ビットマップデータ12B)は完全にはデータ圧縮前のCTデータ(ビットマップデータ12A)には戻らないが、ほぼ同一のビットマップデータが復元される。LWデータについては、ホストコントローラ100でのデータ圧縮の際可逆圧縮処理が行なわれているため、データ伸長後のLWデータ(ビットマップデータ13B)は、データ圧縮前のLWデータ(ビットマップデータ13A)と同一のデータに復元される。   In the host controller 100, as shown in FIG. 2, character and image data 11 described in various languages and formats such as PDF, PS, and TIFF are image (CT) data, characters and lines. Etc. (LW; Line Work) data, RIP (Raster Image Processing) is performed for each to generate bitmap data 12A and 13A, and further, data compression processing is performed for each, and CT is performed. Generates irreversible compressed data 14 and reversible compressed data 15 for LW. These compressed data 14 and 15 are transferred from the host controller 100 to the interface device 200 via the general-purpose interface cable 150 shown in FIG. In the interface device 200, the compressed data 14 and 15 transferred are subjected to data decompression processing, and the bitmap data 12B and 13B corresponding to the bitmap data 12A and 13A in the state before the data compression processing is performed by the host controller 100. Is generated. Here, since the CT data is subjected to lossy compression processing at the time of data compression by the host controller 100, the CT data (bitmap data 12B) after data decompression is completely CT data before data compression ( Although it does not return to the bitmap data 12A), almost the same bitmap data is restored. Since the LW data is subjected to lossless compression processing at the time of data compression by the host controller 100, the LW data (bitmap data 13B) after data expansion is the LW data (bitmap data 13A) before data compression. Is restored to the same data.

インターフェース機器200では、データ伸長後のCTデータ(ビットマップデータ12B)とLWデータ(ビットマップデータ13B)とが合成され、さらに網点情報等がタグとして付加されてプリンタ300に送られる。プリンタ300では、インターフェース機器200から受け取ったビットマップデータとそれに付加されたタグ情報とに従って画像がプリント出力される。   In the interface device 200, the CT data (bitmap data 12B) after data expansion and the LW data (bitmap data 13B) are combined, and halftone dot information and the like are added as tags and sent to the printer 300. In the printer 300, an image is printed out according to the bitmap data received from the interface device 200 and the tag information added thereto.

ホストコントローラ100とインターフェース機器200とが例えば相互に離れている場合、あるいは、インターフェース機器200が複数台のホストコントローラから画像データを受信するシステムの場合など、ホストコントローラ100とインターフェース機器200を別々の装置として構成する必要がある場合には、図2に示すような、ホストコントローラ100でデータ圧縮を行なってインターフェース機器200にデータ転送しインターフェース機器でデータ伸長するように構成することにより、ホストコントローラ100からインターフェース機器200へのデータ転送時間を短縮することができ、プリントの生産性が向上する。   For example, when the host controller 100 and the interface device 200 are separated from each other, or when the interface device 200 is a system that receives image data from a plurality of host controllers, the host controller 100 and the interface device 200 are separated from each other. 2, the host controller 100 performs data compression, transfers the data to the interface device 200, and decompresses the data using the interface device, as shown in FIG. Data transfer time to the interface device 200 can be shortened, and print productivity is improved.

ここで、一般的には、CTデータについては、非可逆ではあるが圧縮率の高いJPEG等の圧縮方式が採用され、LWデータについてはPackBits等の可逆圧縮方式が採用される。
特開平5−328142号公報 特開平10−164620号公報 特表2001−520822号公報 特開平9−200540号公報 特開2000−134622号公報 特開2003−348358号公報 特開平11−355770号公報
Here, generally, a compression method such as JPEG which is irreversible but has a high compression rate is adopted for CT data, and a reversible compression method such as PackBits is adopted for LW data.
JP-A-5-328142 Japanese Patent Laid-Open No. 10-164620 JP 2001-520822 A Japanese Patent Laid-Open No. 9-200540 JP 2000-134622 A JP 2003-348358 A JP-A-11-355770

図2に示すデータ圧縮方式の場合、CT画像とLW画像とに分離してそれぞれに別々の圧縮処理方式を適用しているためCT画像とLW画像との双方に適した画像圧縮処理が行なわれる反面、2系統の圧縮処理を行なう必要があるためその処理が複雑であるという問題がある。これを改善するには、CT画像であってもLW画像であっても同一の圧縮処理を行なうことが望ましいが、単純に同一の圧縮処理を適用すると、画質の維持と圧縮率の向上との相反する要求を同時に満たすことができないという問題がある。   In the case of the data compression method shown in FIG. 2, since the CT image and the LW image are separated and different compression processing methods are applied to each, an image compression process suitable for both the CT image and the LW image is performed. On the other hand, since it is necessary to perform two systems of compression processing, there is a problem that the processing is complicated. In order to improve this, it is desirable to perform the same compression processing for both CT images and LW images. However, simply applying the same compression processing can improve image quality and improve the compression rate. There is a problem that conflicting requirements cannot be satisfied at the same time.

本発明は、上記事情に鑑み、画像データに、画質の維持と圧縮率の向上との双方を高度に両立させたデータ圧縮処理を施す画像圧縮装置、およびコンピュータをそのような画像圧縮装置として動作させることのできる画像圧縮プログラムを提供することを目的とする。   SUMMARY OF THE INVENTION In view of the above circumstances, the present invention provides an image compression apparatus that performs a data compression process that highly balances both image quality maintenance and compression ratio improvement on image data, and operates the computer as such an image compression apparatus. An object of the present invention is to provide an image compression program that can be executed.

上記目的を達成する本発明の画像圧縮装置は、画像データにデータ圧縮処理を施す画像圧縮装置において、
画像データに非可逆圧縮処理を施すことにより第1の圧縮データを生成する第1の画像圧縮部と、
第1の画像圧縮部で得られた第1の圧縮データを解凍することにより解凍データを生成する画像解凍部と、
第1の画像圧縮部による非可逆圧縮処理前の画像データと画像解凍部により得られた解凍データとの差分演算により差分データを求める差分演算部と、
差分演算部で得られた差分データに非可逆圧縮処理を施すことにより第2の圧縮データを生成する第2の画像圧縮部とを備えたことを特徴とする。
An image compression apparatus of the present invention that achieves the above object is an image compression apparatus that performs data compression processing on image data.
A first image compression unit that generates first compressed data by performing irreversible compression processing on the image data;
An image decompression unit that generates decompressed data by decompressing the first compressed data obtained by the first image compression unit;
A difference calculation unit that obtains difference data by calculating a difference between the image data before irreversible compression processing by the first image compression unit and the decompressed data obtained by the image decompression unit;
And a second image compression unit that generates second compressed data by performing irreversible compression processing on the difference data obtained by the difference calculation unit.

本発明の画像圧縮装置は、第1の画像圧縮部で一旦非可逆圧縮処理を行ない、再度解凍処理を行なって、非可逆圧縮処理前の画像データと解凍処理により得られた解凍データとの差分演算により差分データを求め、第2の非可逆圧縮部でその差分データに非可逆圧縮処理を行なうようにしたものであり、第1の画像圧縮部で非可逆圧縮処理を行なって得た圧縮データを解凍して得たデータによる画像よりも画質が向上し、かつ、第2の画像圧縮部でも非可逆圧縮処理を行なうことにより高い圧縮率を実現することができる。   The image compression apparatus of the present invention performs a lossy compression process once in the first image compression unit, performs a decompression process again, and a difference between the image data before the lossy compression process and the decompressed data obtained by the decompression process Compressed data obtained by calculating difference data by calculation and performing lossy compression processing on the difference data by the second lossy compression unit, and performing lossy compression processing by the first image compression unit. The image quality is improved as compared with the image obtained by decompressing the image, and a high compression ratio can be realized by performing the irreversible compression process in the second image compression unit.

ここで、本発明の画像圧縮装置において、第1の画像圧縮部は、画像データにJPEG規格に準拠した非可逆圧縮処理を施すものであってもよい。   Here, in the image compression apparatus of the present invention, the first image compression unit may perform irreversible compression processing conforming to the JPEG standard on the image data.

画像データに施す圧縮処理としては一般的にJPEG圧縮が適している。   In general, JPEG compression is suitable as a compression process applied to image data.

また、本発明の画像圧縮装置において、上記第2の画像圧縮部は、上記差分データに量子化処理を含む圧縮処理を施すものである。   In the image compression apparatus of the present invention, the second image compression unit performs a compression process including a quantization process on the difference data.

量子化処理により、上記差分データに対し高い圧縮率を実現できる。   By the quantization process, a high compression rate can be realized for the difference data.

また、上記第2の画像圧縮部は、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む圧縮処理を施すものであってもよく、この場合に、
上記第2の画像圧縮部は、上記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときは連続数を2単位ビットで表現するものであることが好ましい。
The second image compression unit outputs one or a plurality of predetermined compression target numerical values as they are in the compressed data, and for the compression target numerical value, the compression target numerical value, the compression target numerical value, A compression process including an encoding process of encoding and outputting a numerical value representing a continuous number of the same numerical value to be compressed may be performed.
In the encoding process, the second image compression unit expresses the continuous number as a unit bit number when the number of consecutive compression target numerical values is equal to or less than a predetermined number, and the continuous number exceeds the predetermined number. In some cases, the continuous number is preferably expressed by 2 unit bits.

また、上記本発明の画像圧縮装置において、画像データに可逆圧縮処理を施すことにより第3の圧縮データを生成する第3の画像圧縮部と、
第3の画像圧縮部で得られた第3の圧縮データの圧縮率が所定の圧縮率以上であるか否かを判定する圧縮率判定部とを備え、
上記第1の画像圧縮部、上記画像解凍部、上記差分演算部、および上記第2の画像圧縮部は、圧縮率判定部による、第3の圧縮データが所定の圧縮率に満たない圧縮率であるとの判定結果を受けて作用するものであることが好ましい。
In the image compression apparatus of the present invention, a third image compression unit that generates third compressed data by performing lossless compression processing on the image data;
A compression rate determination unit that determines whether or not the compression rate of the third compressed data obtained by the third image compression unit is equal to or higher than a predetermined compression rate,
The first image compression unit, the image decompression unit, the difference calculation unit, and the second image compression unit are compression rates at which the third compressed data by the compression rate determination unit is less than a predetermined compression rate. It is preferable to act upon receiving the determination result.

可逆圧縮処理で所望の圧縮率を満足している場合、画質の劣化を生じさせずに所望の圧縮率を達成しているのであるから、これ以上処理する必要はない。したがって、この可逆圧縮処理では所望の圧縮率を満足しない場合にのみ、上記の第1の画像圧縮部、圧縮解凍部、差分演算部、および第2の画像圧縮装置による処理を行なうことが好ましい。   When the reversible compression process satisfies the desired compression ratio, the desired compression ratio is achieved without causing deterioration in image quality, and no further processing is necessary. Therefore, it is preferable to perform the processing by the first image compression unit, the compression / decompression unit, the difference calculation unit, and the second image compression device only when the desired compression rate is not satisfied in the lossless compression process.

ここで、上記第3の画像圧縮部が、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであることが好ましく、この場合に、
上記第3の画像圧縮部は、上記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときはその連続数を2単位ビット数で表現するものであることが好ましい。
Here, the third image compression unit directly outputs one or a plurality of predetermined compression target numerical values in the data to be compressed, and for the compression target numerical value, the compression target numerical value and the compression target numerical value. It is preferable to perform a reversible compression process including an encoding process that encodes and outputs a numerical value that represents the number of consecutive compression target numerical values,
As the encoding process, the third image compression unit expresses the continuous number as a unit bit number when the number of consecutive compression target numerical values is less than a predetermined number, and the continuous number exceeds the predetermined number. In some cases, it is preferable that the continuous number is expressed by 2 unit bits.

また、上記目的を達成する本発明の画像圧縮プログラムは、プログラムを実行する情報処理装置内で実行され、その情報処理装置を画像データにデータ圧縮処理を施す画像圧縮装置として動作させる画像圧縮プログラムであって、
上記情報処理装置を、
画像データに非可逆圧縮処理を施すことにより第1の圧縮データを生成する第1の画像圧縮部と、
第1の画像圧縮部で得られた第1の圧縮データを解凍することにより解凍データを生成する画像解凍部と、
第1の画像圧縮部による非可逆圧縮処理前の画像データと画像解凍部により得られた解凍データとの差分演算により差分データを求める差分演算部と、
差分演算部で得られた差分データに非可逆圧縮処理を施すことにより第2の圧縮データを生成する第2の画像圧縮部とを備えた画像圧縮装置として動作させることを特徴とする。
The image compression program of the present invention that achieves the above object is an image compression program that is executed in an information processing apparatus that executes the program and that operates the information processing apparatus as an image compression apparatus that performs data compression processing on image data. There,
The information processing apparatus is
A first image compression unit that generates first compressed data by performing irreversible compression processing on the image data;
An image decompression unit that generates decompressed data by decompressing the first compressed data obtained by the first image compression unit;
A difference calculation unit that obtains difference data by calculating a difference between the image data before irreversible compression processing by the first image compression unit and the decompressed data obtained by the image decompression unit;
The image processing apparatus is operated as an image compression apparatus including a second image compression unit that generates second compressed data by performing irreversible compression processing on the difference data obtained by the difference calculation unit.

ここで、本発明の画像圧縮装置においても、上記第1の画像圧縮部は、画像データにJPEG規格に準拠した非可逆圧縮処理を施すものであることが好ましく、
上記第2の画像圧縮部は、上記差分データに量子化処理を含む圧縮処理を施すものであることが好ましい。
Here, also in the image compression apparatus of the present invention, it is preferable that the first image compression unit performs irreversible compression processing conforming to the JPEG standard on image data,
The second image compression unit preferably performs a compression process including a quantization process on the difference data.

また、本発明の画像圧縮プログラムにおいて、上記第2の画像圧縮部は、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む圧縮処理を施すものであることが好ましく、この場合に、
上記第2の画像圧縮部は、上記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときはその連続数を2単位ビットで表現するものであることが好ましい。
In the image compression program of the present invention, the second image compression unit outputs one or a plurality of predetermined compression target numerical values as they are in the data to be compressed, and the compression target numerical values for the compression target. It is preferable to perform compression processing including encoding processing that encodes and outputs a numerical value and a numerical value that represents the number of consecutive compression target numerical values that are the same as the compression target numerical value.
In the encoding process, the second image compression unit expresses the continuous number as a unit bit number when the number of consecutive compression target numerical values is equal to or less than a predetermined number, and the continuous number exceeds the predetermined number. In some cases, the continuous number is preferably expressed by 2 unit bits.

さらに、本発明の画像圧縮プログラムは、上記情報処理装置を、
画像データに可逆圧縮処理を施すことにより第3の圧縮データを生成する第3の画像圧縮部と、
第3の画像圧縮部で得られた第3の圧縮データの圧縮率が所定の圧縮率以上であるか否かを判定する圧縮率判定部とをさらに備え、
上記第1の画像圧縮部、上記画像解凍部、上記差分演算部、および上記第2の画像圧縮部は、圧縮率判定部による、第3の圧縮データが所定の圧縮率に満たない圧縮率であるとの判定結果を受けて作用するものである画像圧縮装置として動作させることが好ましい。
Furthermore, the image compression program of the present invention provides the information processing apparatus,
A third image compression unit that generates third compressed data by performing reversible compression processing on the image data;
A compression rate determination unit that determines whether or not the compression rate of the third compressed data obtained by the third image compression unit is equal to or higher than a predetermined compression rate;
The first image compression unit, the image decompression unit, the difference calculation unit, and the second image compression unit are compression rates at which the third compressed data by the compression rate determination unit is less than a predetermined compression rate. It is preferable to operate as an image compression apparatus that acts upon receiving the determination result.

この場合、上記第3の画像圧縮部が、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであることが好ましく、この場合にさらに、
上記第3の画像圧縮部は、上記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときはその連続数を2単位ビット数で表現するものであることが好ましい。
In this case, the third image compression unit directly outputs one or a plurality of predetermined compression target numerical values in the compressed data, and for the compression target numerical value, the compression target numerical value and the compression target numerical value It is preferable to perform a reversible compression process including an encoding process that encodes and outputs a numerical value that represents the number of consecutive compression target numerical values, and in this case,
As the encoding process, the third image compression unit expresses the continuous number as a unit bit number when the number of consecutive compression target numerical values is less than a predetermined number, and the continuous number exceeds the predetermined number. In some cases, it is preferable that the continuous number is expressed by 2 unit bits.

以上、説明したように、本発明によれば、画質の維持と高い圧縮率を高度に両立させることができる。   As described above, according to the present invention, it is possible to achieve both high image quality maintenance and high compression ratio.

以下において説明する実施形態は、図1に示す全体システムの中のホストコントローラに組み込まれる画像圧縮装置であり、さらに具体的には、図2に示すホストコントローラ内のCTのビットマップデータ12AとLWのビットマップデータ13Aとの双方を区別せずにデータ圧縮を行なう処理に関するものである。したがって、ここでは、図1,図2を参照して説明したCTデータおよびLWデータについてのデータ圧縮処理が以下に説明する本発明の実施形態としてのデータ圧縮処理に置き換わり、インターフェース機器内でのデータ伸長(解凍)処理もその本発明の実施形態としてのデータ圧縮処理に対応したデータ伸長(解凍)処理に置き換わるものと理解し、図1に示す全体システムおよび図2に示す処理の流れについて重複した図示および重複説明は省略する。   The embodiment described below is an image compression apparatus incorporated in a host controller in the entire system shown in FIG. 1, and more specifically, CT bitmap data 12A and LW in the host controller shown in FIG. The present invention relates to a process of compressing data without distinguishing both of the bitmap data 13A. Therefore, here, the data compression processing for the CT data and LW data described with reference to FIGS. 1 and 2 is replaced with the data compression processing according to the embodiment of the present invention described below, and the data in the interface device is replaced. It is understood that the decompression (decompression) process replaces the data decompression (decompression) process corresponding to the data compression process as the embodiment of the present invention, and the entire system shown in FIG. 1 and the process flow shown in FIG. 2 are duplicated. The illustration and repeated explanation are omitted.

図3は、本発明の画像圧縮装置の一実施形態を示すブロック構成図である。   FIG. 3 is a block diagram showing an embodiment of the image compression apparatus of the present invention.

この図3に示す画像圧縮装置500は、第1の画像圧縮部510、画像解凍部520、差分演算部530、第2の画像圧縮部540、第3の画像圧縮部550、および圧縮率判定部560を備えている。各部510〜560の詳細は後述するが、この画像圧縮装置500内での画像データの流れは以下のとおりである。   The image compression apparatus 500 shown in FIG. 3 includes a first image compression unit 510, an image decompression unit 520, a difference calculation unit 530, a second image compression unit 540, a third image compression unit 550, and a compression rate determination unit. 560. Although details of each of the units 510 to 560 will be described later, the flow of image data in the image compression apparatus 500 is as follows.

入力画像ファイル(本実施形態では、図2に示すように、ビットマップに展開されたCTデータ12AあるいはLWデータ13Aが格納されているファイル)は、図3に示す画像圧縮装置500の、第1の画像圧縮部510、差分演算部530、および第3の画像圧縮部550に入力される。   An input image file (in this embodiment, a file storing CT data 12A or LW data 13A expanded in a bitmap as shown in FIG. 2) is stored in the first image compression apparatus 500 shown in FIG. Are input to the image compression unit 510, the difference calculation unit 530, and the third image compression unit 550.

第3の画像圧縮部550では、今回入力されてきた入力画像ファイル中の画像データに可逆圧縮処理が施される。   In the third image compression unit 550, lossless compression processing is performed on the image data in the input image file input this time.

本実施形態では、この第3の画像圧縮部550において、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理が施される。この符号化処理では同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときはその連続数を2単位ビット数で表現するという処理が行なわれる。ここでは第1の画像圧縮部510で行なわれるJPEG圧縮処理(後述する)と合致させるために、入力画像の8ライン分を1単位として圧縮処理が施される。この可逆圧縮処理が施された後の圧縮データ(本発明にいう第3の圧縮データ)は、圧縮率判定部560に入力される。この圧縮率判定部560にはあらかじめ要求圧縮率が通知されており、圧縮率判定部560では、第3の画像圧縮部550から入力されてきた圧縮データがその要求圧縮率を満たすレベルにまで圧縮されたデータであるか否かが判定される。この判定も入力画像8ライン分を一単位として行なわれる。8ライン分の圧縮データがその要求圧縮率を満たすデータがあったときは、この可逆圧縮処理の段階で圧縮率が満足され、これ以上圧縮する必要がなく、そのまま出力される。この圧縮データの出力にあたっては、その圧縮データの入力画像上の位置や、後の伸長処理に必要な情報等が記述されたヘッダが付されて出力される。   In the present embodiment, the third image compression unit 550 outputs one or more predetermined compression target numerical values in the compressed data as they are, and the compression target numerical values are the compression target numerical values and the compression target numerical values. A lossless compression process including an encoding process of encoding and outputting a numerical value representing a continuous number of the same numerical value to be compressed as the numerical value to be compressed is performed. In this encoding process, when the number of consecutive compression target numeric values is less than or equal to a predetermined number, the number of consecutive units is expressed by one unit bit number. When the number of consecutive units exceeds the predetermined number, the number of consecutive units is expressed by two unit bit numbers. The process of expressing with is performed. Here, in order to match the JPEG compression processing (described later) performed by the first image compression unit 510, the compression processing is performed with 8 lines of the input image as one unit. The compressed data (third compressed data referred to in the present invention) after the reversible compression processing is input to the compression rate determination unit 560. The compression rate determination unit 560 is notified of the required compression rate in advance, and the compression rate determination unit 560 compresses the compressed data input from the third image compression unit 550 to a level that satisfies the required compression rate. It is determined whether the data has been processed. This determination is also performed with the input image 8 lines as a unit. If the compressed data for 8 lines has data that satisfies the required compression rate, the compression rate is satisfied at the stage of the lossless compression process, and no further compression is required, and the data is output as it is. In outputting the compressed data, a header describing the position of the compressed data on the input image, information necessary for subsequent decompression processing, and the like is added and output.

圧縮率判定部560において、第3の画像圧縮部550から今回送られてきた圧縮データが要求圧縮率を満足しないデータであると判定されると、その判定結果が第1の画像圧縮部510に通知され、その第1の画像圧縮部510では、元々入力されてきた入力画像ファイル中の画像データに非可逆圧縮処理が施される。本実施形態では、この第1の画像圧縮部510では、JPEG圧縮処理が採用されている。   When the compression rate determination unit 560 determines that the compressed data sent this time from the third image compression unit 550 is data that does not satisfy the required compression rate, the determination result is sent to the first image compression unit 510. The first image compression unit 510 is notified, and irreversible compression processing is performed on the image data in the input image file that was originally input. In the present embodiment, the first image compression unit 510 employs JPEG compression processing.

この第1の画像圧縮部510でJPEG圧縮処理により得られたJPEG圧縮データ(本発明にいう第1の圧縮データの一例に相当する)は、画像解凍部520に入力され、この画像解凍部520では、その入力されてきたJPEG圧縮データに解凍処理が施されて、元々の入力画像ファイル中の画像データに近似した解凍データが生成される。この解凍データは、元々の入力画像ファイル中の画像データに近似したデータではあるが、第1の画像圧縮部510では非可逆圧縮処理(JPEG圧縮処理は非可逆圧縮処理の一種)が施されているため、この解凍データは、元々の入力画像ファイル中の画像データと同一ではない。   JPEG compressed data (corresponding to an example of the first compressed data referred to in the present invention) obtained by JPEG compression processing in the first image compression unit 510 is input to the image decompression unit 520, and this image decompression unit 520 Then, the input JPEG compressed data is decompressed to generate decompressed data that approximates the image data in the original input image file. The decompressed data is data approximate to the image data in the original input image file, but is subjected to irreversible compression processing (JPEG compression processing is a type of irreversible compression processing) in the first image compression unit 510. Therefore, the decompressed data is not the same as the image data in the original input image file.

この画像解凍部520での解凍処理により得られた解凍データは元々の入力画像ファイル中の画像データとともに差分演算部530に入力され、差分演算部530では入力されてきた画像データと解凍データとの間で画像の一画素ごとに差分演算が行なわれ差分データが求められる。この差分データは第2の画像圧縮部540に入力される。   The decompressed data obtained by the decompressing process in the image decompressing unit 520 is input to the difference computing unit 530 together with the image data in the original input image file, and the difference computing unit 530 calculates the input image data and decompressed data. A difference calculation is performed for each pixel of the image to obtain difference data. The difference data is input to the second image compression unit 540.

第2の画像圧縮部540では、その入力されてきた差分データに非可逆圧縮処理が施される。本実施形態では、この第2の画像圧縮部540における圧縮処理として、量子化処理と、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理とを含む圧縮処理が採用されている。ここでの符号化処理では、同一の圧縮対象数値の連続数が所定数以下のときはその連続数が1単位ビット数で表現され、その連続数が所定数を越えるときはその連続数が2単位ビットで表現される。ここで、その符号化処理は可逆圧縮処理であるが量子化処理が非可逆圧縮処理であるため、第2の画像圧縮部540で行なわれる圧縮処理は全体として非可逆圧縮処理となる。   In the second image compression unit 540, lossy compression processing is performed on the input difference data. In this embodiment, as the compression processing in the second image compression unit 540, the quantization processing and one or more predetermined compression target numerical values in the compressed data are output as they are, and the compression target numerical values are output as they are. A compression process including a compression target numerical value and an encoding process for encoding and outputting a numerical value representing a continuous number of the same compression target numerical value as the compression target numerical value is employed. In the encoding processing here, when the number of consecutive identical numerical values to be compressed is less than or equal to a predetermined number, the number of consecutive is represented by one unit bit number, and when the number of consecutive exceeds the predetermined number, the number of consecutive is 2 Expressed in unit bits. Here, since the encoding process is a lossless compression process, the quantization process is an irreversible compression process, and thus the compression process performed by the second image compression unit 540 is an irreversible compression process as a whole.

このようにして、第2の画像圧縮部で生成された圧縮データは、第1の画像圧縮部510で得られた圧縮データのヘッダに、その圧縮データを伸長するために必要なデータとともに記録される。   In this way, the compressed data generated by the second image compression unit is recorded in the header of the compressed data obtained by the first image compression unit 510 together with data necessary for decompressing the compressed data. The

図3に示す画像圧縮装置500において以上のようにして得られた圧縮データは、図1に示すSCSI等の汎用インターフェース150を経由してインターフェース機器200に転送される。インターフェース機器200では、その受け取った圧縮データにデータ伸長処理が施され、元々の入力画像ファイル中の画像データと比べ高度に近似した画像データに復元される。   The compressed data obtained as described above in the image compression apparatus 500 shown in FIG. 3 is transferred to the interface device 200 via the general-purpose interface 150 such as SCSI shown in FIG. In the interface device 200, the received compressed data is subjected to data decompression processing, and restored to image data that is highly approximate to the image data in the original input image file.

図4は、図1に示すホストコントローラのハードウェア構成図である。   FIG. 4 is a hardware configuration diagram of the host controller shown in FIG.

図1に示すホストコントローラ100は、図4に示す構成のコンピュータシステムで構成されている。   The host controller 100 shown in FIG. 1 is configured by a computer system having the configuration shown in FIG.

この図4に示す、コンピュータシステムで構成されたホストコントローラ100には、CPU111、RAM112、通信インターフェース113、ハードディスクコントローラ114、FDドライブ115、CDROMドライブ116、マウスコントローラ117、キーボードコントローラ118、ディスプレイコントローラ119、および通信用ボード120が備えられており、これらはバス110で相互に接続されている。   4 includes a CPU 111, a RAM 112, a communication interface 113, a hard disk controller 114, an FD drive 115, a CDROM drive 116, a mouse controller 117, a keyboard controller 118, a display controller 119, And a communication board 120 are connected to each other via a bus 110.

ハードディスクコントローラ114は、このホストコントローラ100に内蔵されているハードディスク104のアクセスを制御するものであり、FDドライブ115、CDROMドライブ116は、このホストコントローラ100に取出し自在に装填されるフレキシブルディスク(FD)130、CDROM140のアクセスを制御するものである。また、マウスコントローラ117、キーボードコントローラ118は、このホストコントローラ100に備えられたマウス107、キーボード108の操作を検出してCPU111に伝達する役割を担っている。さらに、ディスプレイコントローラ119は、このCPU111の指示に基づいて、ホストコントローラ100に備えられた画像ディスプレイ109の表示画面上に画像を表示する役割を担っている。   The hard disk controller 114 controls access to the hard disk 104 built in the host controller 100, and the FD drive 115 and the CDROM drive 116 are flexible disks (FD) loaded in the host controller 100 so as to be removable. 130, controls access to the CDROM 140. The mouse controller 117 and the keyboard controller 118 play a role of detecting operations of the mouse 107 and keyboard 108 provided in the host controller 100 and transmitting them to the CPU 111. Further, the display controller 119 plays a role of displaying an image on the display screen of the image display 109 provided in the host controller 100 based on the instruction of the CPU 111.

通信用ボード120は、SCSI等の汎用インターフェースプロトコルに準拠した通信を担っており、圧縮後の画像データをインターフェースケーブル150を介してインターフェース機器200(図1参照)に転送する役割を担っている。   The communication board 120 is responsible for communication conforming to a general-purpose interface protocol such as SCSI, and is responsible for transferring the compressed image data to the interface device 200 (see FIG. 1) via the interface cable 150.

さらに、通信用インターフェース113は、インターネット等の汎用の通信を担っており、このホストコントローラ100は、この通信用インターフェース113を経由して画像データを取り込むこともできる。   Further, the communication interface 113 is responsible for general-purpose communication such as the Internet, and the host controller 100 can also capture image data via the communication interface 113.

RAM112には、ハードディスク104に格納されているプログラムが読み出されてCPU111での実行のために展開され、CPU111では、そのRAM112に展開されたプログラムが読み出されて実行される。   A program stored in the hard disk 104 is read into the RAM 112 and expanded for execution by the CPU 111, and the program expanded in the RAM 112 is read out and executed by the CPU 111.

図5は、本発明の画像圧縮処理プログラムの模式構成図である。   FIG. 5 is a schematic configuration diagram of an image compression processing program of the present invention.

ここでは、この画像圧縮プログラム600は、CDROM140に記憶されている。   Here, the image compression program 600 is stored in the CD ROM 140.

この画像圧縮プログラム600は、第1の画像圧縮部610、画像解凍部620、差分演算部630、第2の画像圧縮部640、第3の画像圧縮部650、および圧縮率判定部660から構成されている。このCDROM140には、ここに示す画像圧縮プログラム600のほか、図1に示すホストコントローラ100における一連の処理を実行するための各種プログラムが記憶されているが、それらについては従来と同様であるため図示および説明は省略する。   The image compression program 600 includes a first image compression unit 610, an image decompression unit 620, a difference calculation unit 630, a second image compression unit 640, a third image compression unit 650, and a compression rate determination unit 660. ing. In addition to the image compression program 600 shown here, the CDROM 140 stores various programs for executing a series of processes in the host controller 100 shown in FIG. The description is omitted.

この図5に示すCDROM140が、図4に示すホストコントローラ100に装填されCDROMドライブ116でアクセスされてそのCDROM140に記憶されているプログラムがこのホストコントローラ100にアップロードされ、ハードディスク104に記憶される。このハードディスク104に記憶されたプログラムがそのハードディスク104から読み出されてRAM112に展開されCPU111で実行されると、このホストコントローラ100は、図3に示す画像圧縮装置500としての処理を含む、ホストコントローラとしての各種処理を実行する装置として動作する。   The CD ROM 140 shown in FIG. 5 is loaded into the host controller 100 shown in FIG. 4 and accessed by the CD ROM drive 116, and the program stored in the CD ROM 140 is uploaded to the host controller 100 and stored in the hard disk 104. When the program stored in the hard disk 104 is read from the hard disk 104, loaded into the RAM 112 and executed by the CPU 111, the host controller 100 includes a process as the image compression apparatus 500 shown in FIG. It operates as an apparatus that executes various processes.

ここで、図5に示す画像圧縮プログラム600は、ホストコントローラ100にインストールされてCPU111で実行されることにより、そのホストコントローラ100内に図3に示す画像圧縮装置500を実現するものであり、第1の画像圧縮部610、画像解凍部620、差分演算部630、第2の画像圧縮部640、第3の画像圧縮部650、および圧縮率判定部660は、CPU111で実行されることにより、そのホストコントローラ100を、図3に示す画像圧縮装置500を構成する、それぞれ、第1の画像圧縮部510、画像解凍部520、差分演算部530、第2の画像圧縮部540、第3の画像圧縮部550、および圧縮率判定部560として動作させるプログラム部品である。   Here, the image compression program 600 shown in FIG. 5 is installed in the host controller 100 and executed by the CPU 111, thereby realizing the image compression apparatus 500 shown in FIG. The first image compression unit 610, the image decompression unit 620, the difference calculation unit 630, the second image compression unit 640, the third image compression unit 650, and the compression rate determination unit 660 are executed by the CPU 111. The host controller 100 is included in the image compression apparatus 500 shown in FIG. 3, and includes a first image compression unit 510, an image decompression unit 520, a difference calculation unit 530, a second image compression unit 540, and a third image compression, respectively. The program component is operated as the unit 550 and the compression rate determination unit 560.

図5の画像圧縮プログラム600を構成する各部610〜660の、CPU111で実行されたときの作用は、それぞれ、図3の画像圧縮装置500を構成する各部510〜560の作用そのものである。したがって、図3の画像圧縮装置500の各部510〜560に関する、これまでの説明、および、以下に説明する詳細説明をもって、図5の画像圧縮プログラム600を構成する各部610〜660の説明を兼ねるものとする。   The operations of the units 610 to 660 constituting the image compression program 600 of FIG. 5 when executed by the CPU 111 are the operations themselves of the units 510 to 560 constituting the image compression apparatus 500 of FIG. Accordingly, the description up to now and the detailed description of each of the units 510 to 560 of the image compression apparatus 500 of FIG. 3 also serve as the description of the units 610 to 660 constituting the image compression program 600 of FIG. And

図6は、図3に示す画像圧縮装置500の第1の画像圧縮部510におけるJPEG圧縮処理を示す説明図である。   FIG. 6 is an explanatory diagram showing JPEG compression processing in the first image compression unit 510 of the image compression apparatus 500 shown in FIG.

ここでは、8×8画素の画素ブロックごとに以下のデータ圧縮処理が行なわれる。   Here, the following data compression processing is performed for each pixel block of 8 × 8 pixels.

8×8画素の画素ブロックのうちの1行分の画素列A(水平方向の1×8画素)が1次元DCT処理部511に入力される。1次元DCT処理部511は、入力された1行分の画素列Aについての1次元DCT(離散コサイン変換)処理を行なって、1行分の画素列Aを構成する各画素ごとの1次元DCT係数A’を求め、これら1次元DCT係数A’を、64ワード構成のメモリ512の1行目に書き込む。以下、同様にして、8×8画素の画素ブロックの残りの7行分の画素列それぞれについて1次元DCT処理を行なって各行分ごとに1次元DCT係数を求めて、それら1次元DCT係数をメモリ512の各行に書き込む。   A pixel column A (1 × 8 pixels in the horizontal direction) for one row in the 8 × 8 pixel block is input to the one-dimensional DCT processing unit 511. The one-dimensional DCT processing unit 511 performs a one-dimensional DCT (discrete cosine transform) process on the input pixel column A for one row, and performs one-dimensional DCT for each pixel constituting the pixel column A for one row. The coefficient A ′ is obtained, and the one-dimensional DCT coefficient A ′ is written in the first row of the memory 512 having a 64-word structure. Similarly, one-dimensional DCT processing is performed on each of the remaining seven rows of pixel columns of the 8 × 8 pixel pixel block to obtain one-dimensional DCT coefficients for each row, and the one-dimensional DCT coefficients are stored in the memory. Write to each row of 512.

次いで、メモリ512に書き込まれた1列分の1次元DCT係数B(垂直方向の8×1の1次元DCT係数列)が読み出されて1次元DCT処理部513に入力される。1次元DCT処理部513は、その1列分の1次元DCT係数Bについての1次元DCT処理を行なって2次元DCT係数Cを求めて、64ワード構成のメモリ514の1列目に書き込む。以下、同様にして、メモリ512に書き込まれた2〜8列分の1次元DCT係数についての1次元DCT処理を行方向に順次に行なって2次元DCT係数をメモリ514に書き込む。   Next, the one-dimensional DCT coefficient B (vertical 8 × 1 one-dimensional DCT coefficient string) written in the memory 512 is read and input to the one-dimensional DCT processing unit 513. The one-dimensional DCT processing unit 513 performs a one-dimensional DCT process on the one-dimensional DCT coefficient B for one column to obtain a two-dimensional DCT coefficient C, and writes the two-dimensional DCT coefficient C in the first column of the 64-word memory 514. Thereafter, similarly, the one-dimensional DCT processing for the one-dimensional DCT coefficients for 2 to 8 columns written in the memory 512 is sequentially performed in the row direction, and the two-dimensional DCT coefficients are written in the memory 514.

さらに、メモリ514に書き込まれた2次元DCT係数に対して、いわゆるジグザク読出しが行なわれる。ここで、メモリ514に書き込まれた2次元DCT係数のマトリックスは、通常の画像ではその画像の低空間周波数成分に対応する左上側に‘0’以外の値を持ち、高空間周波数成分に対応する右下側に‘0’が現れる確率が高い。そこで、低周波側から高周波側に向かって、即ち、左上端から右下端に向かって順次斜めにスキャンすることによりジグザグ読出しが行なわれる。具体的には、メモリ514のアドレスが、図3に示す番号0,1,2,3,…の順にスキャニングされて、そのスキャニングされた順に2次元DCT係数が読み出される。このようにして読み出された64ワードのデータストリームDを構成する2次元DCT係数が量子化部515に入力される。   Further, so-called zigzag reading is performed on the two-dimensional DCT coefficient written in the memory 514. Here, the matrix of the two-dimensional DCT coefficients written in the memory 514 has a value other than “0” on the upper left side corresponding to the low spatial frequency component of the normal image, and corresponds to the high spatial frequency component. There is a high probability that '0' appears in the lower right. Therefore, zigzag reading is performed by scanning obliquely sequentially from the low frequency side to the high frequency side, that is, from the upper left end to the lower right end. Specifically, the addresses of the memory 514 are scanned in the order of numbers 0, 1, 2, 3,... Shown in FIG. 3, and the two-dimensional DCT coefficients are read in the scanned order. The two-dimensional DCT coefficients constituting the 64-word data stream D read out in this way are input to the quantization unit 515.

量子化部515は、入力された2次元DCT係数を、予め用意された量子化テーブルTの、対応する係数で割り算して、ゼロランレングスカウンタ516に向けて出力する。ゼロランレングスカウンタ516は、量子化部515からの、割り算された2次元DCT係数の値が‘0’となっている無効係数の連続する長さをカウントする。このカウント値はハフマンエンコーダ517に入力される。   The quantization unit 515 divides the input two-dimensional DCT coefficient by the corresponding coefficient in the quantization table T prepared in advance, and outputs the result to the zero run length counter 516. The zero run length counter 516 counts the continuous lengths of invalid coefficients from the quantization unit 515 in which the value of the divided two-dimensional DCT coefficient is “0”. This count value is input to the Huffman encoder 517.

ハフマンエンコーダ517は、ハフマン符号化方式によるエントロピィ符号化処理を行なう。このようにして、JPEG画像圧縮が行なわれる。   The Huffman encoder 517 performs entropy encoding processing by the Huffman encoding method. In this way, JPEG image compression is performed.

このようにして得られたJPEG圧縮データは図3に示す画像解凍部520に入力されて、図6を参照して説明したJPEG圧縮処理とは逆の演算を行なうことによりJPEG圧縮データを解凍し解凍データを生成する。この解凍データは、差分演算部530に入力され、元々の入力画像ファイル中の画像データとこの解凍データとの間で対応する画素ごとに差分演算が行なわれて差分データが求められ、その差分データが第2の画像圧縮部540に入力される。   The JPEG compressed data obtained in this way is input to the image decompression unit 520 shown in FIG. 3, and the JPEG compressed data is decompressed by performing the reverse operation to the JPEG compression processing described with reference to FIG. Generate decompressed data. The decompressed data is input to the difference calculation unit 530, and a difference operation is performed for each corresponding pixel between the image data in the original input image file and the decompressed data, and the difference data is obtained. Is input to the second image compression unit 540.

図7は、図3に示す画像圧縮装置500の第2の画像圧縮部540の構成を示すブロック図である。   FIG. 7 is a block diagram showing the configuration of the second image compression unit 540 of the image compression apparatus 500 shown in FIG.

この第2の画像圧縮部540は、差分符号化部541、量子化処理部542、ランレングス符号化部543、およびハフマン符号化部544から構成される。   The second image compression unit 540 includes a differential encoding unit 541, a quantization processing unit 542, a run length encoding unit 543, and a Huffman encoding unit 544.

図8は、図7の第2の画像圧縮部540に入力される入力画像ファイル中の差分データのデータ構造および差分符号化の概念を示す図である。   FIG. 8 is a diagram illustrating the data structure of difference data in the input image file input to the second image compression unit 540 in FIG. 7 and the concept of difference encoding.

図8に示すように、図7に示す第2の画像圧縮部540に入力される差分データは、所定の主走査方向に画素がM個並んでいる。その主走査方向とは直角な副走査方向に教えていったときのN番目のラインについて、主走査方向に並ぶ各画素の画素値は、その並び順に、
n,1,Dn,2,…,Dn,m-2,Dn,m-1,Dn,m
と表現される。
As shown in FIG. 8, the difference data input to the second image compression unit 540 shown in FIG. 7 has M pixels arranged in a predetermined main scanning direction. For the Nth line when taught in the sub-scanning direction perpendicular to the main scanning direction, the pixel values of the pixels arranged in the main scanning direction are as follows:
Dn , 1 , Dn , 2 ,..., Dn , m-2 , Dn , m-1 , Dn , m
It is expressed.

これと同様に、副走査方向の(N+1)番目のラインについて、主走査方向に並ぶ各画素の画素値は、その並びの順に、
n+1,1,Dn+1,2,…,Dn+1,m-2,Dn+1,m-1,Dn+1,m
と表現される。
Similarly, for the (N + 1) th line in the sub-scanning direction, the pixel values of the pixels arranged in the main scanning direction are as follows:
Dn + 1,1 , Dn + 1,2 ,..., Dn + 1, m-2 , Dn + 1, m-1 , Dn + 1, m
It is expressed.

ここで、図7に示す第2の画像圧縮部540を構成する差分符号化部541では、上記のような画像データを入力し、副走査方向に隣接する画素どうしの差分が求められる。すなわち、N番目のラインと(N+1)番目のラインとの差分であって、主走査方向に並ぶj番目の画素の差分をSn,jとすると、この差分Sn,jは、
n,j=Dn+1,j−Dn,j (j=1〜m)
と表現される。
Here, the difference encoding unit 541 constituting the second image compression unit 540 shown in FIG. 7 inputs the image data as described above, and obtains the difference between pixels adjacent in the sub-scanning direction. That is, if the difference between the Nth line and the (N + 1) th line and the jth pixel lined up in the main scanning direction is Sn , j , the difference Sn, j is
S n, j = D n + 1, j −D n, j (j = 1 to m )
It is expressed.

この差分演算を具体的に説明する。   This difference calculation will be specifically described.

図9は、図7の第2の画像圧縮部540を構成する差分符号化部541における差分符号化処理を例示して示す図である。   FIG. 9 is a diagram illustrating a differential encoding process in the differential encoding unit 541 constituting the second image compression unit 540 of FIG.

ここでは、図8に示す副走査方向に並ぶある縦一列の画素値が、図9の「画像データ」
の欄に示すように、
「12 01 02 FF 64 … 40 40 3F …」
であったとする。尚、ここでは、各画素値は、16進2桁(1バイト=8ビット)で表現されている。ここでは「ライン」は主走査方向に並ぶ画素を指している。
Here, the pixel values in one vertical line arranged in the sub-scanning direction shown in FIG. 8 are “image data” in FIG.
As shown in the column
"12 01 02 FF 64 ... 40 40 3F ..."
Suppose that Here, each pixel value is represented by two hexadecimal digits (1 byte = 8 bits). Here, “line” indicates pixels arranged in the main scanning direction.

先ず、1ライン目の画素値「12」については、そのまま出力する。   First, the pixel value “12” on the first line is output as it is.

次に、2ライン目の画素値「01」から1ライン目の画素値「12」を引き算し、その結果を出力する。ここで、「01」から「12」を引き算した結果は負の数となり、9ビットで「1EF」と表わされるが、MSBの1ビットである「1」は省略し、下位8ビットである「EF」のみを出力する。   Next, the pixel value “12” of the first line is subtracted from the pixel value “01” of the second line, and the result is output. Here, the result of subtracting “12” from “01” is a negative number and is expressed as “1EF” by 9 bits, but “1” that is 1 bit of the MSB is omitted and “8” is the lower 8 bits. Only “EF” is output.

次に、3ライン目の画素値「02」から2ライン目の画素値「01」を引き算し、その結果の値「01」を出力する。   Next, the pixel value “01” of the second line is subtracted from the pixel value “02” of the third line, and the resultant value “01” is output.

次に、4ライン目の画素値「FF」から3ライン目の画素値「02」を引き算し、その結果の値「FD」を出力する。   Next, the pixel value “02” of the third line is subtracted from the pixel value “FF” of the fourth line, and the resultant value “FD” is output.

次に、5ライン目の画素値「64」から4ライン目の画素値「FF」を引き算し、その結果の値から、MSBの1ビットである「1」を省略し、下位8ビットである「65」を出力する。   Next, the pixel value “FF” of the fourth line is subtracted from the pixel value “64” of the fifth line, and “1” that is 1 bit of the MSB is omitted from the resulting value, and the lower 8 bits. “65” is output.

以下、これと同じ演算を繰り返すことにより、図9の「差分エンコード(下位8ビット)」の欄に表わされている。   Hereinafter, by repeating the same operation, it is represented in the column of “differential encoding (lower 8 bits)” in FIG.

「(12) EF 01 FD 65 … C0 00 FF …」
が出力される。
"(12) EF 01 FD 65 ... C0 00 FF ..."
Is output.

図1に示すインターフェース機器200では、この差分符号化されたデータを復号化するにあたり、図9の右側に示す演算が行なわれる。   In decoding the differentially encoded data, the interface device 200 shown in FIG. 1 performs the calculation shown on the right side of FIG.

先ず1ライン目の画素値は「12」のそのままである。   First, the pixel value of the first line remains “12”.

2ライン目の画素値は、差分値「EF」に1ライン目の画素値「12」を足し算した結果のうちの下位8ビットで表わされる「01」である。   The pixel value of the second line is “01” represented by the lower 8 bits of the result of adding the pixel value “12” of the first line to the difference value “EF”.

3ライン目の画素値は、差分値「01」に、上記で求めた2ライン目の画素値「01」を足し算することにより求められる「02」である。   The pixel value of the third line is “02” obtained by adding the pixel value “01” of the second line obtained above to the difference value “01”.

4ライン目の画素値は、差分値「FD」に、上記で求めた3ライン目の画素値「02」を足し算することにより求められる「FF」である。   The pixel value of the fourth line is “FF” obtained by adding the pixel value “02” of the third line obtained above to the difference value “FD”.

5ライン目の画素値は差分値「65」に、上記で求めた4ライン目の画素値「FF」を足し算した結果のうちの下位8ビットで表わされる「64」である。   The pixel value of the fifth line is “64” represented by the lower 8 bits of the result obtained by adding the pixel value “FF” of the fourth line obtained above to the difference value “65”.

以下これと同様の演算を繰り返すことにより、差分符号化を行なう前のデータと同一のデータに復号化される。   Thereafter, the same calculation is repeated, whereby the same data as the data before differential encoding is decoded.

図10は、差分符号化による作用説明図である。   FIG. 10 is a diagram for explaining the operation by differential encoding.

図10(A)は、画像の概念を表わしており、ここでは、図の縦方向を主走査方向、横方向を副走査方向とし、副走査方向(横方向)に引いた矢印A上の各画素の画素値に着目している。   FIG. 10A shows the concept of an image. Here, the vertical direction in the figure is the main scanning direction, the horizontal direction is the sub-scanning direction, and each of the arrows A drawn in the sub-scanning direction (horizontal direction) is shown in FIG. Focus is on the pixel value of the pixel.

この画像上には、主走査方向に延びる画素値「63」の濃度を持つ直線L1と、画素値「FF」の濃度を持つ直線L2が描かれており、その右側には、CT画像があて嵌められるCT画像領域が存在する。CT画像があて嵌められる領域は、画素値「00」で表わされている。   On this image, a straight line L1 having a density of pixel value “63” extending in the main scanning direction and a straight line L2 having a density of pixel value “FF” are drawn. There is a CT image area to be fitted. A region to which a CT image is fitted is represented by a pixel value “00”.

図10(A)の矢印A上に並ぶ画素の画素値は、図10(B)示すように、左側から順に、最初は「01」が続き直線L1上では「63」が続き、再度「01」が続き、直線L2上では「FF」となり、再度「01」に戻り、CT画像があて嵌められる領域では「00」が続き、CT画像領域が終わるともう一度「01」が続く。ここで、画素値「01」は、何も描かれていない領域(用紙の地の領域)であることを表わしている。   As shown in FIG. 10B, the pixel values of the pixels arranged on the arrow A in FIG. 10A are, in order from the left, first “01”, followed by “63” on the straight line L1, and again “01 ”Continues to“ FF ”on the straight line L2, returns to“ 01 ”again,“ 00 ”continues in the area where the CT image is fitted, and“ 01 ”continues again when the CT image area ends. Here, the pixel value “01” represents an area in which nothing is drawn (paper area).

図10(B)に示す元データに対し、差分演算を行なうと図10(C)に示す差分後データとなり、「00」の出現確率が大きく増加する。図9を参照して説明した、図7の差分符号化部541では、MSBの1ビット(符号ビット)は省略するため、その差分符号化部541から出力されるデータは、図10(D)のようになる。この場合であっても、図9を参照して説明したように、最初の画素値(図8の場合の1ライン目の画素値「12」)をそのまま伝えることによって、元データを順次復元することができる。   When the difference calculation is performed on the original data shown in FIG. 10B, the difference data shown in FIG. 10C is obtained, and the appearance probability of “00” is greatly increased. In the differential encoding unit 541 shown in FIG. 7 described with reference to FIG. 9, one bit (code bit) of the MSB is omitted, and the data output from the differential encoding unit 541 is shown in FIG. become that way. Even in this case, as described with reference to FIG. 9, the original data is sequentially restored by transmitting the first pixel value (the pixel value “12” in the first line in the case of FIG. 8) as it is. be able to.

図7に示す第2の画像圧縮部540の量子化処理部542では、差分符号化部541で以上のようにして求めた差分後データについて量子化処理が行なわれる。この量子化処理では、差分後データを構成する各画素の値が量子化係数で割り算されて商が求められ余りは捨て去られる。すなわち、例えばこの量子化係数として8を使用するとき、−7〜+7は0、+8〜+15は1、−7〜−15は−1、……となる。このような量子化処理を行なうと、同一の値の出現確率がさらに増え、その後の画像圧縮処理の圧縮率をさらに向上させることができる。   In the quantization processing unit 542 of the second image compression unit 540 shown in FIG. 7, quantization processing is performed on the post-difference data obtained as described above by the differential encoding unit 541. In this quantization process, the value of each pixel constituting the post-difference data is divided by the quantization coefficient to obtain a quotient, and the remainder is discarded. That is, for example, when 8 is used as the quantization coefficient, -7 to +7 is 0, +8 to +15 is 1, -7 to -15 is -1,. When such quantization processing is performed, the appearance probability of the same value is further increased, and the compression rate of the subsequent image compression processing can be further improved.

量子化処理部542で量子化処理の行なわれた後の量子化後データは次に図7に示す第2の画像圧縮部540を構成するランレングス符号化部543に入力される。   The quantized data that has been quantized by the quantization processing unit 542 is then input to the run-length encoding unit 543 that forms the second image compression unit 540 shown in FIG.

ランレングス符号化部543では、量子化処理部542から受け取ったデータを構成する複数の数値のうちの特定の数値についてのみ符号化処理が行なわれる。このため、このランレングス符号化部543では、受け取ったデータの中から、符号化処理を行なう数値(ここでは、この数値を「圧縮対象数値」と称する)と、その圧縮対象数値の連続数が検出される。   The run-length encoding unit 543 performs the encoding process only on specific numerical values among a plurality of numerical values constituting the data received from the quantization processing unit 542. For this reason, in the run length encoding unit 543, a numerical value to be encoded from the received data (here, this numerical value is referred to as a “compression target numerical value”) and a continuous number of the compression target numerical value are obtained. Detected.

本実施形態では、一例として、「01」、「FF」および「00」の3つの数値を圧縮対象数値としている。   In this embodiment, as an example, three numerical values “01”, “FF”, and “00” are set as compression target numerical values.

図11は、図7に示すランレングス符号化部543での符号化の説明図である。図11の上のラインは、量子化処理部542から受け取ったデータ、下のラインは、ランレングス符号化部543での符号化処理を行なった後のデータである。   FIG. 11 is an explanatory diagram of encoding in the run-length encoding unit 543 shown in FIG. The upper line in FIG. 11 is the data received from the quantization processing unit 542, and the lower line is the data after the encoding process in the run length encoding unit 543 is performed.

ここでは、図11の上のラインに示すように、量子化処理部542からは、
「06 02 02 02 01 01 01 01 04 05 00 … 」
なるデータが入力されたものとする。このとき、図7のランレングス符号化部543では、先頭の「06」は圧縮対象数値ではなく、次に続く「02 02 02」も圧縮対象数値ではなく、次に、圧縮対象数値である「01」が4つ連続していること、次に、圧縮対象数値ではない「04」、「05」を間に置いて、圧縮対象数値である「00」が32767個連続していることが検出される。
Here, as shown in the upper line of FIG. 11, from the quantization processing unit 542,
"06 02 02 02 01 01 01 01 01 04 05 00 ..."
It is assumed that the following data is input. At this time, in the run-length encoding unit 543 in FIG. 7, the leading “06” is not a compression target numerical value, and the next “02 02 02” is not a compression target numerical value. It is detected that four consecutive “01” s are present, and next, 32767 consecutive “00” s that are compression target values are inserted between “04” and “05” that are not compression target numerical values. Is done.

図12は、ランレングス符号化部における、圧縮対象数値を対象にした符号化のアルゴリズムを示す図である。   FIG. 12 is a diagram illustrating an encoding algorithm for a numerical value to be compressed in the run-length encoding unit.

この図12中、Zは同一の圧縮対象数値の連続数、例えば図11の上のラインの「01」についてはZ=4、「00」についてはZ=32767である。   In FIG. 12, Z is a continuous number of the same numerical values to be compressed, for example, Z = 4 for “01” in the upper line of FIG. 11, and Z = 32767 for “00”.

また、図12中、「YY」は、16進2桁で表わされた圧縮対象数値自体を表わしている。その「YY」に続く、「0」又は「1」は1ビットで表現された「0」又は「1」であり、さらにそれに続く「画像圧縮装置…」は、1つの「X」が1ビットを表わしており、この「画像圧縮装置…」でZの値を表現している。   In FIG. 12, “YY” represents the numerical value to be compressed itself represented by two hexadecimal digits. “0” or “1” following “YY” is “0” or “1” expressed by 1 bit, and “image compression apparatus ...” following the “YY” is one bit of “X”. This “image compression apparatus...” Expresses the value of Z.

すなわち、図12は、圧縮対象数値「YY」がZ<128連続するときは、1バイト目で圧縮対象数値「YY」を表現し、それに続く1バイトで、先頭ビットが「0」、それに続く7ビットでZの値を表現すること、また、圧縮対象数値「YY」がZ≧128連続するときは、1バイト目で圧縮対象数値「YY」を表現し、それに続く2バイト(16ビット)のうちの先頭の1ビットを「1」とすることで2バイトに跨って表現されていることを表現し、それに続く15ビットで、Zの値を表現することを意味している。   That is, FIG. 12 shows that when the compression target numerical value “YY” continues for Z <128, the compression target numerical value “YY” is expressed by the first byte, the first bit is “0”, and the subsequent byte is the subsequent one. Express the value of Z with 7 bits, and when the compression target numerical value “YY” continues Z ≧ 128, express the compression target numerical value “YY” with the first byte, followed by 2 bytes (16 bits) The first 1 bit of “1” is expressed as “1” to express that it is expressed over 2 bytes, and the subsequent 15 bits indicate that the value of Z is expressed.

この図12に示す規則に従って図11に示す符号化の例について説明する。   An example of the encoding shown in FIG. 11 will be described in accordance with the rules shown in FIG.

図7の量子化処理部542から入力されてきたデータ(上のライン)を構成する先頭の数値「06」は圧縮対象数値ではないため、その「06」のまま出力される。また、それに続く「02 02 02」も、「02」は圧縮対象数値ではなく、これら3つの「02」もそのまま出力される。次に、圧縮対象数値である「01」が4個連続するため、「01 04」に符号化される。次の「04」及び「05」は圧縮対象数値ではないため、そのまま「04 05」が出力される。   Since the first numerical value “06” constituting the data (upper line) input from the quantization processing unit 542 in FIG. 7 is not a compression target numerical value, it is output as “06”. Also, “02 02 02” that follows, “02” is not a compression target numerical value, and these three “02” are output as they are. Next, since “01”, which is a numerical value to be compressed, continues, it is encoded into “01 04”. Since the next “04” and “05” are not compression target numerical values, “04 05” is output as it is.

次に「00」が32767個連続しているため、「00」を置き、次の1バイトのうちの先頭の1ビットを「1」とし、次いで15ビットで32767−128を表現することにより、「00 FF 7F」の3バイトで「00」が32767個連続していることを表現する。すなわち、連続数128は、最初のビット「1」を除き、「00 00」と表現される。   Next, since there are 32767 consecutive “00s”, “00” is placed, the first 1 bit of the next 1 byte is set to “1”, and then 32767-128 is expressed by 15 bits. It represents that 32767 “00” s are consecutive in 3 bytes of “00 FF 7F”. That is, the consecutive number 128 is expressed as “00 00” except for the first bit “1”.

図13は、図7のランレングス符号化部543における、連続数に応じた符号化処理の例を示す図である。
・「00」が127個連続するときは、2バイトを用いて「00 7F」に符号化され、
・「00」が32767個連続するときは、3バイトを用いて「00 FF 7E」に符号化され、
・「00」が32895個連続するときは、3バイトを用いて「00 FF FF」に符号化され、
・「00」が128個連続するときは、3バイトを用いて「00 80 00」に符号化され、
・「FF」が4096個連続するときは、3バイトを用いて「FF 8F 80」に符号化される。
FIG. 13 is a diagram illustrating an example of an encoding process according to the number of consecutive steps in the run-length encoding unit 543 in FIG.
When “00” is 127 consecutive, it is encoded into “00 7F” using 2 bytes,
When “00” is 32767 consecutive, it is encoded into “00 FF 7E” using 3 bytes,
When “00” is 32895 consecutive, it is encoded into “00 FF FF” using 3 bytes,
When “00” is 128 consecutive, it is encoded to “00 80 00” using 3 bytes,
-When 4096 "FFs" are contiguous, they are encoded into "FF 8F 80" using 3 bytes.

図7に示すランレングス符号化部543では、上記のような符号化処理が行なわれる。   The run-length encoding unit 543 shown in FIG. 7 performs the encoding process as described above.

本実施形態によるランレングス符号化部543によれば、最大圧縮率は、3/32895=1/10,965にまで向上する。   According to the run-length encoding unit 543 according to the present embodiment, the maximum compression rate is improved to 3/32895 = 1 / 10,965.

図7のランレングス符号化部543で上記の符号化処理の行なわれた後のデータは、次に図7のハフマン符号化部544に入力される。   The data after the above-described encoding process is performed by the run-length encoding unit 543 in FIG. 7 is then input to the Huffman encoding unit 544 in FIG.

ハフマン符号化部544では、先ず1枚の画像全体を構成する画素について画素値の出現頻度が求められる。   In the Huffman encoding unit 544, first, the appearance frequency of the pixel value is obtained for the pixels constituting the entire image.

ここでは、「A1」の出現頻度が最も強く、以下順に、「A2」、「A3」、「A4」、…の順であるとする。尚、これら「A1」、「A2」等は数値を直接表わしている訳ではなく、数値を表わす符号である。すなわち、「A1」は例えば数値「00」、「A2」は数値「FF」等である。また、ここでは、簡単のため、図4のランレングス符号化部543から送られてくるデータは全ての画素が「A1」〜「A16」の16個の数値のうちのいずれかの数値で表わされるものとする。   Here, the appearance frequency of “A1” is the strongest, and it is assumed that “A2”, “A3”, “A4”,. These “A1”, “A2” and the like do not directly represent numerical values, but are symbols representing numerical values. That is, “A1” is, for example, a numerical value “00”, “A2” is a numerical value “FF”, and the like. Here, for simplicity, the data sent from the run-length encoding unit 543 in FIG. 4 is expressed by any one of the 16 numerical values “A1” to “A16” for all pixels. Shall be.

図14は、図7に示すハフマン符号化部544における符号化処理を例示した図である。   FIG. 14 is a diagram illustrating an encoding process in the Huffman encoder 544 illustrated in FIG.

ここでは、出現頻度の最も高い「A1」は、2ビットで表わされた「00」に置き換えられ、次の「A2」は、やはり2ビットで表わされた「01」に置き換えられ、次の「A3」、さらに次の「A4」は、3ビットで表わされる、それぞれ、「100」、「101」に置き換えられ、次の「A5」〜「A8」は、5ビットで表わされる各数値に置き換えられ、以下同様に、出現頻度が低い数値ほど多くのビット数で表わされた数値に置き換えられる。   Here, “A1” having the highest appearance frequency is replaced with “00” represented by 2 bits, and the next “A2” is replaced with “01” also represented by 2 bits. "A3" and further "A4" are replaced by "100" and "101", respectively, and the following "A5" to "A8" are numerical values expressed by 5 bits. In the same manner, a numerical value with a lower appearance frequency is replaced with a numerical value represented by a larger number of bits.

図15は、ハフマンテーブルの一例を示す図である。   FIG. 15 is a diagram illustrating an example of the Huffman table.

このハフマンテーブルは、図14と一致させてあり、出現頻度が高いほど短かいビット数で表わされた数値に置き換えられるように並べた、符号化前(置き換え前)の数値と符号化後(置き換え後)の数値との対応テーブルである。   This Huffman table is the same as that in FIG. 14 and is arranged so that it is replaced with a numerical value represented by a shorter number of bits as the appearance frequency is higher, and the numerical value before encoding (before replacement) and after encoding ( It is a correspondence table with numerical values after replacement.

図1に示すインターフェース機器200では、このハフマンテーブルを参照することにより、ハフマン符号化に対する復号化が行なわれる。   The interface device 200 shown in FIG. 1 performs decoding for Huffman coding by referring to the Huffman table.

第2の画像圧縮部540では以上の画像圧縮処理が行なわれ、図3に示す画像データ(B)のヘッダ部に、第2の画像圧縮部540で得た圧縮データ自体や、ハフマン符号化部544(図7参照)で用いたハフマンテーブル(図15参照)や、さらに量子化処理部542(図7参照)で用いた量子化係数など、データ伸長処理に必要な情報が書き込まれる。   The second image compression unit 540 performs the above-described image compression processing, and the compressed data itself obtained by the second image compression unit 540 or the Huffman coding unit is added to the header of the image data (B) shown in FIG. Information necessary for data decompression processing is written, such as the Huffman table (see FIG. 15) used in 544 (see FIG. 7) and the quantization coefficient used in the quantization processing unit 542 (see FIG. 7).

図3に示す画像データファイル(B)のヘッダには、さらに、第1の画像圧縮部510でのJPEG圧縮処理で用いられた量子化テーブル(図6参照)も書き込まれ、以上のようにしてデータ伸長処理に必要な情報が書き込まれたヘッダと、第1の画像圧縮部510で得たJPEG圧縮データとが組となって画像データファイル(B)を構成し、図1に示すインターフェース機器200に送信される。インターフェース機器200は、送信されてきた画像データファイル(B)のヘッダを参照しながらJPEG圧縮データを解凍し、元々の入力画像ファイル(図3参照)中の画像データに十分に近似した画像データが再生される。   In the header of the image data file (B) shown in FIG. 3, the quantization table (see FIG. 6) used in the JPEG compression processing in the first image compression unit 510 is also written. The header in which information necessary for data decompression processing is written and the JPEG compressed data obtained by the first image compression unit 510 are combined to form an image data file (B), and the interface device 200 shown in FIG. Sent to. The interface device 200 decompresses the JPEG compressed data while referring to the header of the transmitted image data file (B), and image data sufficiently approximating the image data in the original input image file (see FIG. 3) is obtained. Played.

本実施形態では、以上説明した、図3に示す画像圧縮装置500での、第1の画像圧縮部510、画像解凍部520、差分演算部530、および第2の画像圧縮部540での画像圧縮処理は、図3に示す画像圧縮装置500の第3の画像圧縮部550での可逆圧縮処理の結果、要求圧縮率を満足しなかった場合のみ実行される。そこで、次に、第3の画像圧縮部550での可逆圧縮処理について説明する。   In the present embodiment, the image compression performed by the first image compression unit 510, the image decompression unit 520, the difference calculation unit 530, and the second image compression unit 540 in the image compression apparatus 500 illustrated in FIG. The process is executed only when the required compression rate is not satisfied as a result of the lossless compression process in the third image compression unit 550 of the image compression apparatus 500 shown in FIG. Then, next, the lossless compression process in the 3rd image compression part 550 is demonstrated.

図16は、第3の画像圧縮部の構成を示すブロック図である。   FIG. 16 is a block diagram illustrating a configuration of the third image compression unit.

この第3の画像圧縮部550は、差分符号化部551、ランレングス符号化部552、およびハフマン符号化部553から構成されている。   The third image compression unit 550 includes a differential encoding unit 551, a run length encoding unit 552, and a Huffman encoding unit 553.

この図16に示す第3の画像圧縮部550を、図7に示す画像圧縮部540と比べると図16に示す第3の画像圧縮部550は、図7に示す第2の画像圧縮部540の量子化処理部542を省き、差分符号化部541で得られた差分後データを直接にランレングス符号化部543に入力した構成と同一の構成である。すなわち、図16に示す第3の画像圧縮部550の差分符号化部551、ランレングス符号化部552、およびハフマン符号化部553は、図7に示す第2の画像圧縮部540における、差分符号化部541、ランレングス符号化部543、およびハフマン符号化部544の各処理とそれぞれ同一である。したがって、ここでの重複説明は省略する。   When the third image compression unit 550 shown in FIG. 16 is compared with the image compression unit 540 shown in FIG. 7, the third image compression unit 550 shown in FIG. 16 is different from the second image compression unit 540 shown in FIG. The configuration is the same as the configuration in which the quantization processing unit 542 is omitted and the post-difference data obtained by the differential encoding unit 541 is directly input to the run-length encoding unit 543. That is, the difference encoding unit 551, the run length encoding unit 552, and the Huffman encoding unit 553 of the third image compression unit 550 illustrated in FIG. 16 are the difference codes in the second image compression unit 540 illustrated in FIG. The same processes as those of the encoding unit 541, the run length encoding unit 543, and the Huffman encoding unit 544 are performed. Therefore, the duplicate description here is omitted.

図3に示す画像圧縮装置500の構成する圧縮率判定部560では、図16に示す構成の第3の画像圧縮部550で8ラインずつについて得られた圧縮データが各8ラインごとに要求圧縮率を満たすか否かが判定され、その要求圧縮率を満たさない場合には、その8ライン分の画像データについて、前述した、第1の画像圧縮部510、画像解凍部520、差分演算部530、および第2の画像圧縮部540における圧縮処理が行なわれる。   In the compression rate determination unit 560 of the image compression apparatus 500 shown in FIG. 3, the compressed data obtained for each 8 lines by the third image compression unit 550 having the configuration shown in FIG. If the requested compression rate is not satisfied, the first image compression unit 510, the image decompression unit 520, the difference calculation unit 530, the image data for the eight lines are described. And the compression process in the 2nd image compression part 540 is performed.

圧縮率判定部560で要求圧縮率を満たすと判定された8ラインについては、第3の画像圧縮部550で得られた圧縮データに、その圧縮データを解凍するに必要な情報、例えば図16に示すハフマン符号化部で用いたハフマンテーブル等が書き込まれるヘッダが付加された画像データファイル(A)が生成されて図1に示すインターフェース機器200に送信される。インターフェース機器では送信されてきた画像データファイル(A)のヘッダを参照しながらその画像データファイル(A)の中の圧縮データを解凍し、元々の入力画像ファイル(図3参照)中の画像データと同一の画像データが再生される。   For the 8 lines determined to satisfy the required compression rate by the compression rate determination unit 560, information necessary for decompressing the compressed data obtained by the third image compression unit 550, for example, FIG. An image data file (A) to which a header to which a Huffman table used in the Huffman encoder shown is added is generated and transmitted to the interface device 200 shown in FIG. The interface device decompresses the compressed data in the image data file (A) while referring to the header of the transmitted image data file (A), and the image data in the original input image file (see FIG. 3). The same image data is reproduced.

次に図3に示す第1の画像圧縮部510、画像解凍部520、差分演算部530、および第2の画像圧縮部540における処理例について説明する。   Next, processing examples in the first image compression unit 510, the image decompression unit 520, the difference calculation unit 530, and the second image compression unit 540 illustrated in FIG. 3 will be described.

図17は8×8画素の画像の一例を示す図、図18は図17に示す8×8画素の各画素値を示す図である。   FIG. 17 is a diagram illustrating an example of an 8 × 8 pixel image, and FIG. 18 is a diagram illustrating each pixel value of 8 × 8 pixels illustrated in FIG. 17.

ここでは、白は16進数でFF,黒は16進数で00、その途中の数値は、その数値に応じた灰色を示している。   Here, white is FF in hexadecimal, black is 00 in hexadecimal, and a numerical value in the middle indicates gray corresponding to the numerical value.

図19は、図18の画素値を持つ8×8画素の画像についてJPEG圧縮処理を行ない、さらにそのJPEG圧縮処理後のデータを解凍して得た8×8画素の画像の各画素値を表わす図である。   FIG. 19 shows pixel values of an 8 × 8 pixel image obtained by performing JPEG compression processing on the 8 × 8 pixel image having the pixel values of FIG. 18 and further decompressing the data after the JPEG compression processing. FIG.

図20は、図18の8×8画素の画像値と図19の8×8画素の画像値について対応する画素ごとに差分演算を行なって得た差分画像の画素値を示す図、図21は、図20の8×8画素の差分画像の画素値を量子化係数8で割り算して得た後の量子化データを示す図、図22は、図19に示すJPEG解凍データを図21に示す量子化データで補正して得た画像データを示す図である。この補正では、図19に示すJPEG解凍データと図2に示す量子化データが対応する画素ごとに加算される。   FIG. 20 is a diagram illustrating pixel values of a difference image obtained by performing a difference operation for each pixel corresponding to the image value of 8 × 8 pixels in FIG. 18 and the image value of 8 × 8 pixels in FIG. 19. FIG. 22 is a diagram illustrating quantized data obtained by dividing the pixel value of the difference image of 8 × 8 pixels in FIG. 20 by the quantization coefficient 8; FIG. 22 is a diagram illustrating the JPEG decompressed data illustrated in FIG. It is a figure which shows the image data obtained by correct | amending with quantization data. In this correction, the JPEG decompressed data shown in FIG. 19 and the quantized data shown in FIG. 2 are added for each corresponding pixel.

但し、図20において、10進数での0〜127は16進数の00〜7Fで表現し、10進数での−1〜−127は16進数のFF〜81で表現している。10進数で−127未満および+128以上はそれぞれ−127および+127にクリップしてある。   However, in FIG. 20, 0 to 127 in decimal notation is represented by 00 to 7F in hexadecimal notation, and −1 to −127 in decimal notation is represented by FF to 81 in hexadecimal notation. Decimal numbers less than -127 and +128 or more are clipped to -127 and +127, respectively.

図23は、図19のJPEG解凍画像の、図18に示すオリジナルの画像に対する誤差分布を示す図、図24は、図22に示すJPEG解凍画像を図21の量子化データで補正した画像の、図18に示すオリジナルの画像に対する誤差分布を示す図である。   FIG. 23 is a diagram showing an error distribution of the JPEG decompressed image of FIG. 19 with respect to the original image shown in FIG. 18, and FIG. 24 is an image obtained by correcting the JPEG decompressed image shown in FIG. 22 with the quantized data of FIG. It is a figure which shows the error distribution with respect to the original image shown in FIG.

図23と図24とを比べると明らかなとおり、単にJPEG圧縮および解凍を行なった画像よりも本実施形態の解凍画像の方が誤差が大幅に低減され画質が向上していることが分かる。   As is apparent from a comparison between FIG. 23 and FIG. 24, it can be seen that the decompressed image of the present embodiment has a greatly reduced error and improved image quality than the image simply subjected to JPEG compression and decompression.

ここで、図21は、上述のとおり量子化係数8で割り算して求めた量子化データであり、この場合3値以上の数値が表われているが、この量子化係数としてさらに大きな値(例えば量子化係数16)を採用すると2値のみ表われる量子化データを得ることができる。量子化係数として大きな値を採用するとオリジナルの画像からの誤差は増えるが、量子化データに2値のみ表われる量子化係数を採用すると、図7に示す量子化処理部542とランレングス符号化部543との間に、以下に説明する、2値符号化処理部を配置することにより、第2の画像圧縮部540でのデータの圧縮率をさらに向上させることができる。   Here, FIG. 21 shows quantized data obtained by dividing by the quantization coefficient 8 as described above. In this case, a numerical value of three or more values is shown, but a larger value (for example, this quantization coefficient) If the quantization coefficient 16) is employed, quantized data that only shows two values can be obtained. If a large value is used as the quantization coefficient, an error from the original image increases. However, if a quantization coefficient that is expressed only in binary is used in the quantized data, the quantization processing unit 542 and the run-length encoding unit illustrated in FIG. By disposing a binary encoding processing unit described below between 543 and 543, the data compression rate of the second image compression unit 540 can be further improved.

すなわち、その2値符号化処理部では、その量子化データを構成する2値がどのような値(例えば16進数で「01」と「FF」など)であっても、その2値のうちの一方の値を16進数で「00」もう一方の値を16進数で「80」に変換し、その後、この2値符号化処理部では、先ずは、図9に示す差分符号化処理と同じ差分符号化処理が再度実行される。   In other words, in the binary encoding processing unit, whatever value is included in the quantized data (for example, “01” and “FF” in hexadecimal numbers), One value is converted to “00” in hexadecimal, and the other value is converted to “80” in hexadecimal. Then, in this binary encoding processing unit, first, the same difference as the differential encoding processing shown in FIG. The encoding process is executed again.

図25は、00と80からなる2値データのときの差分符号化処理を示す図である。   FIG. 25 is a diagram showing a differential encoding process for binary data consisting of 00 and 80.

ここでは一列に並ぶ画素値が図10の「2値画像データ」欄に示すように、
「00 80 80 00 00 80 00 00 80 …」
であったとする。図9の場合と同様、ここでも、各画像値は、16進数2桁(1バイト=8ビット)で表現されている。先ず、1ライン目の画素値「00」については、そのまま出力する。
Here, as shown in the “binary image data” column of FIG.
"00 80 80 00 00 80 00 00 80 ..."
Suppose that Similarly to the case of FIG. 9, here, each image value is expressed by two hexadecimal digits (1 byte = 8 bits). First, the pixel value “00” on the first line is output as it is.

次に、2ライン目の画素値「80」から1ライン目の画素値「00」を引き算し、その結果の値「80」を出力する。   Next, the pixel value “00” of the first line is subtracted from the pixel value “80” of the second line, and the resultant value “80” is output.

次に、3ライン目の画素値「80」から2ライン目の画素値「80」を引き算し、その結果の値「00」を出力する。   Next, the pixel value “80” of the second line is subtracted from the pixel value “80” of the third line, and the resulting value “00” is output.

次に、4ライン目の画素値「00」から3ライン目の画素値「80」を引き算し、その結果の値を出力する。ここで、「00」から「80」を引き算した結果は負の数となり、9ビットで「180」と表わされるが、MSBの1ビットである「1」は省略し、下位ビット8である「80」のみ出力する。   Next, the pixel value “80” of the third line is subtracted from the pixel value “00” of the fourth line, and the resultant value is output. Here, the result of subtracting “80” from “00” is a negative number and is expressed as “180” with 9 bits, but “1”, which is 1 bit of the MSB, is omitted, and the lower bit 8 is “ Only 80 "is output.

次に、5ライン目の画素値「00」から4ライン目の画素値「00」を引き算し、その結果の「00」を出力する。   Next, the pixel value “00” of the fourth line is subtracted from the pixel value “00” of the fifth line, and the result “00” is output.

以下、これと同じ演算を繰り返すことにより、図9の「差分エンコード」の欄に表わされている、
「(00) 80 00 80 00 80 80 00 80…」
が出力される。
Hereinafter, by repeating the same calculation, it is represented in the “difference encoding” column of FIG.
"(00) 80 00 80 00 80 80 00 80 ..."
Is output.

図1に示すインターフェース機器200では、この差分符号化されたデータを復号化するにあたり、図10の右側に示す演算が行なわれる。   In decoding the differentially encoded data, the interface device 200 shown in FIG. 1 performs the operation shown on the right side of FIG.

この復号化演算は、取り扱う数値が「00」と「80」との2値であることを除き、図9を参照して説明した復号化演算と同一であり、ここでは重複説明は省略する。   This decoding operation is the same as the decoding operation described with reference to FIG. 9 except that the numerical values to be handled are binary values “00” and “80”, and redundant description is omitted here.

尚、上述したように2値符号化処理部では、2値データの場合、その2値データを構成する2値がどのような値(例えば「01」と「FF」など)であっても「00」と「80」とに変換したが、図1に示すホストコントローラ100からインターフェース機器200に送信される圧縮情報には、どの値(例えば「01」と「FF」)をそれぞれ「00」と「80」に割り当てたか(例えば「01」を「00」に割り当て、「FF」を「80」に割り当てたなど)という情報を含ませておき、インターフェース機器では、図25の「デコード結果」の欄に示す、「00」と「80」とからなる2値データに復号化した後、それら「00」と「80」がそれら「00」と「80」に割り当てられたもともとの値に戻される(例えば「00」が「01」に戻され、「80」が「FF」に戻される)。   As described above, in the binary encoding processing unit, in the case of binary data, any value (for example, “01” and “FF”) constituting the binary data is “ Although converted into “00” and “80”, the compression information transmitted from the host controller 100 shown in FIG. 1 to the interface device 200 has which value (for example, “01” and “FF”) is “00”, respectively. Information such as “80” (eg, “01” assigned to “00”, “FF” assigned to “80”, etc.) is included, and the interface device displays the “decoding result” in FIG. After decoding into binary data consisting of “00” and “80” shown in the column, those “00” and “80” are returned to the original values assigned to “00” and “80”. (For example, “00” Returned to 1 "," 80 "is returned to" FF ").

図26は、2値符号化処理の説明図である。   FIG. 26 is an explanatory diagram of binary encoding processing.

この2値符号化処理部では、上記のようにして2値データについて差分符号化処理が行なわれた後の、「00」と「80」とからなる2値の画像データについて2値符号化処理が行なわれる。   In this binary encoding processing unit, binary encoding processing is performed on binary image data composed of “00” and “80” after the differential encoding processing is performed on the binary data as described above. Is done.

上記のようにして差分符号化された画像データが、図26の「差分符号化された画像データ」の欄に示すように、
「00 00 00 00 00 80 80 80 …」
であったとする。
As shown in the column of “difference-encoded image data” in FIG. 26, the image data differentially encoded as described above is as follows.
"00 00 00 00 00 80 80 80 ..."
Suppose that

ここでは、これら「00」と「80」の2種類の数値が1ビットで識別される。ここでは、「00」が1ビットで「0」、「80」が1ビットで「1」で識別され、図26の「差分符号化された画像データ」の欄に示す、
「00 00 00 00 00 80 80 80 …」
の数値列が、図11の「2値符号化されたビットストリーム」の欄に示すように、
「0 0 0 0 0 1 1 1 …」
に変換され、さらにこのビットストリームを8ビットずつまとめて、「バイトパッキング化されたバイトストリーム」の欄に示すように、
「07 C0 03 81 …」
の数値列に変換される。この変換後の数値列は、図7のランレングス符号化部543に入力される。
Here, these two types of numerical values “00” and “80” are identified by one bit. Here, “00” is identified by 1 bit “0”, “80” is identified by 1 bit “1”, and is shown in the “differential encoded image data” column of FIG.
"00 00 00 00 00 80 80 80 ..."
As shown in the column of “binary encoded bitstream” in FIG.
"0 0 0 0 0 1 1 1 ..."
In addition, as shown in the “byte packed byte stream” column, the bit stream is grouped in units of 8 bits.
"07 C0 03 81 ..."
Converted to a numeric column. The converted numeric string is input to the run-length encoding unit 543 in FIG.

2値データの場合、上記の2値符号化処理を行なうことにより、データ量を大幅に削減することができる。   In the case of binary data, the amount of data can be greatly reduced by performing the above binary encoding process.

データ圧縮技術が適用されたプリントシステムの一例を示す図である。1 is a diagram illustrating an example of a print system to which a data compression technique is applied. プリントシステムにおけるデータ処理の流れを示す図である。FIG. 6 is a diagram illustrating a flow of data processing in the print system. 本発明の画像圧縮装置の一実施形態を示すブロック構成図である。It is a block block diagram which shows one Embodiment of the image compression apparatus of this invention. 図1に示すホストコントローラのハードウェア構成図である。It is a hardware block diagram of the host controller shown in FIG. 本発明の画像圧縮処理プログラムの模式構成図である。It is a schematic block diagram of the image compression processing program of this invention. 図3に示す画像圧縮装置の第1の画像圧縮部におけるJPEG圧縮処理を示す説明図である。It is explanatory drawing which shows the JPEG compression process in the 1st image compression part of the image compression apparatus shown in FIG. 図3に示す画像圧縮装置の第2の画像圧縮部の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd image compression part of the image compression apparatus shown in FIG. 図3の画像圧縮装置に入力される入力画像ファイル中の画像データのデータ構造および差分符号化の概念を示す図である。It is a figure which shows the data structure of the image data in the input image file input into the image compression apparatus of FIG. 3, and the concept of differential encoding. 図3の画像圧縮装置を構成する差分符号化部における差分符号化処理を例示して示す図である。It is a figure which illustrates and illustrates the difference encoding process in the difference encoding part which comprises the image compression apparatus of FIG. 差分符号化による作用説明図である。It is operation | movement explanatory drawing by difference encoding. 図3に示すランレングス符号化部での符号化の説明図である。It is explanatory drawing of the encoding in the run length encoding part shown in FIG. ランレングス符号化部における、圧縮対象数値を対象にした符号化のアルゴリズムを示す図である。It is a figure which shows the algorithm of the encoding for the numerical value for compression in a run length encoding part. 図7のランレングス符号化部における、連続数に応じた符号化処理の例を示す図である。It is a figure which shows the example of the encoding process according to the continuous number in the run length encoding part of FIG. 図7に示すハフマン符号化部における符号化処理を例示した図である。It is the figure which illustrated the encoding process in the Huffman encoding part shown in FIG. ハフマンテーブルの一例を示す図である。It is a figure which shows an example of a Huffman table. 第3の画像圧縮部の構成を示すブロック図である。It is a block diagram which shows the structure of a 3rd image compression part. 8×8画素の画像の一例を示す図である。It is a figure which shows an example of an image of 8x8 pixel. 図17に示す8×8画素の各画素値を示す図である。It is a figure which shows each pixel value of 8x8 pixel shown in FIG. 図18の画素値を持つ8×8画素の画像についてJPEG圧縮処理を行ない、さらにそのJPEG圧縮処理後のデータを解凍して得た8×8画素の画像の各画素値を表わす図である。FIG. 19 is a diagram illustrating pixel values of an 8 × 8 pixel image obtained by performing JPEG compression processing on the 8 × 8 pixel image having the pixel values of FIG. 18 and further decompressing the data after the JPEG compression processing. 図18の8×8画素の画像値と図19の8×8画素の画像値について対応する画素ごとに差分演算を行なって得た差分画像の画素値を示す図である。It is a figure which shows the pixel value of the difference image obtained by performing a difference calculation for every pixel corresponding to the image value of 8x8 pixel of FIG. 18, and the image value of 8x8 pixel of FIG. 図20の8×8画素の差分画像の各画素値を量子化係数8で割り算して得た後の量子化データを示す図である。It is a figure which shows the quantization data after dividing each pixel value of the difference image of 8x8 pixel of FIG. 20 by the quantization coefficient 8. FIG. 図19に示すJPEG解凍データを図21に示す量子化データで補正して得た画像データを示す図である。It is a figure which shows the image data obtained by correct | amending the JPEG decompression | decompression data shown in FIG. 19 with the quantization data shown in FIG. 図19のJPEG解凍画像の、図18に示すオリジナルの画像に対する誤差分布を示す図である。FIG. 20 is a diagram showing an error distribution of the JPEG decompressed image of FIG. 19 with respect to the original image shown in FIG. 図22に示すJPEG解凍画像を図21の量子化データで補正した画像の、図18に示すオリジナルの画像に対する誤差分布を示す図である。It is a figure which shows the error distribution with respect to the original image shown in FIG. 18 of the image which correct | amended the JPEG decompression | decompression image shown in FIG. 22 with the quantization data of FIG. 00と80からなる2値データのときの差分符号化処理を示す図である。It is a figure which shows the difference encoding process in the case of the binary data which consists of 00 and 80. 2値符号化処理部における2値符号化処理の説明図である。It is explanatory drawing of the binary encoding process in a binary encoding process part.

符号の説明Explanation of symbols

11 画像のデータ
12A,12B,13A,13B ビットマップデータ
14 非可逆の圧縮データ
15 可逆の圧縮データ
100 ホストコントローラ
140 CDROM
150 汎用インターフェースケーブル
200 インターフェース機器
250 専用インターフェースケーブル
300 プリンタ
500 画像圧縮装置
510 第1の画像圧縮部
520 画像解凍部
530 差分演算部
540 第2の画像圧縮部
541 差分符号化部
542 量子化処理部
543 ランレングス符号化部
544 ハフマン符号化部
550 第3の画像圧縮部
551 差分符号化部
552 ランレングス符号化部
553 ハフマン符号化部
560 圧縮率判定部
600 画像圧縮プログラム
610 第1の画像圧縮部
620 画像解凍部
630 差分演算部
640 第2の画像圧縮部
650 第3の画像圧縮部
660 圧縮率判定部
11 Image data 12A, 12B, 13A, 13B Bitmap data 14 Lossy compression data 15 Lossless compression data 100 Host controller 140 CDROM
DESCRIPTION OF SYMBOLS 150 General-purpose interface cable 200 Interface apparatus 250 Dedicated interface cable 300 Printer 500 Image compression apparatus 510 1st image compression part 520 Image decompression | decompression part 530 Difference calculation part 540 2nd image compression part 541 Difference encoding part 542 Quantization process part 543 Run-length encoding unit 544 Huffman encoding unit 550 Third image compression unit 551 Differential encoding unit 552 Run-length encoding unit 553 Huffman encoding unit 560 Compression rate determination unit 600 Image compression program 610 First image compression unit 620 Image decompression unit 630 Difference calculation unit 640 Second image compression unit 650 Third image compression unit 660 Compression rate determination unit

Claims (16)

画像データにデータ圧縮処理を施す画像圧縮装置において、
画像データに非可逆圧縮処理を施すことにより第1の圧縮データを生成する第1の画像圧縮部と、
前記第1の画像圧縮部で得られた第1の圧縮データを解凍することにより解凍データを生成する画像解凍部と、
前記第1の画像圧縮部による非可逆圧縮処理前の画像データと前記画像解凍部により得られた解凍データとの差分演算により差分データを求める差分演算部と、
前記差分演算部で得られた差分データに非可逆圧縮処理を施すことにより第2の圧縮データを生成する第2の画像圧縮部とを備えたことを特徴とする画像圧縮装置。
In an image compression apparatus that performs data compression processing on image data,
A first image compression unit that generates first compressed data by performing irreversible compression processing on the image data;
An image decompression unit that generates decompressed data by decompressing the first compressed data obtained by the first image compression unit;
A difference calculation unit for obtaining difference data by calculating a difference between the image data before irreversible compression processing by the first image compression unit and the decompressed data obtained by the image decompression unit;
An image compression apparatus comprising: a second image compression unit that generates second compressed data by performing irreversible compression processing on the difference data obtained by the difference calculation unit.
前記第1の画像圧縮部は、画像データにJPEG規格に準拠した非可逆圧縮処理を施すものであることを特徴とする請求項1記載の画像圧縮装置。   2. The image compression apparatus according to claim 1, wherein the first image compression unit performs irreversible compression processing conforming to the JPEG standard on image data. 前記第2の画像圧縮部は、前記差分データに量子化処理を含む圧縮処理を施すものであることを特徴とする請求項1記載の画像圧縮装置。   The image compression apparatus according to claim 1, wherein the second image compression unit performs a compression process including a quantization process on the difference data. 前記第2の画像圧縮部は、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む圧縮処理を施すものであることを特徴とする請求項1記載の画像圧縮装置。   The second image compression unit outputs one or more predetermined compression target numerical values as they are in the compressed data, and the compression target numerical values are the same as the compression target numerical values and the compression target numerical values. 2. The image compression apparatus according to claim 1, wherein a compression process including an encoding process for encoding and outputting a numerical value representing a continuous number of numerical values to be compressed is performed. 前記第2の画像圧縮部は、前記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときは該連続数を1単位ビット数で表現し、該連続数が該所定数を越えるときは該連続数を2単位ビットで表現するものであることを特徴とする請求項4記載の画像圧縮装置。   The second image compression unit expresses, as the encoding process, when the number of consecutive identical numerical values to be compressed is equal to or less than a predetermined number, the continuous number is expressed by one unit bit number, and the continuous number is the predetermined number. 5. The image compression apparatus according to claim 4, wherein when it exceeds, the continuous number is expressed by 2 unit bits. 画像データに可逆圧縮処理を施すことにより第3の圧縮データを生成する第3の画像圧縮部と、
前記第3の画像圧縮部で得られた第3の圧縮データの圧縮率が所定の圧縮率以上であるか否かを判定する圧縮率判定部とを備え、
前記第1の画像圧縮部、前記画像解凍部、前記差分演算部、および前記第2の画像圧縮部は、前記圧縮率判定部による、前記第3の圧縮データが所定の圧縮率に満たない圧縮率であるとの判定結果を受けて作用するものであることを特徴とする請求項1記載の画像圧縮装置。
A third image compression unit that generates third compressed data by performing reversible compression processing on the image data;
A compression rate determination unit that determines whether or not the compression rate of the third compressed data obtained by the third image compression unit is equal to or higher than a predetermined compression rate;
The first image compression unit, the image decompression unit, the difference calculation unit, and the second image compression unit are compressed by the compression rate determination unit so that the third compressed data does not reach a predetermined compression rate. The image compression apparatus according to claim 1, wherein the image compression apparatus operates upon receiving a determination result that the ratio is a rate.
前記第3の画像圧縮部が、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであることを特徴とする請求項6記載の画像圧縮装置。   The third image compression unit outputs one or more predetermined compression target numerical values in the compressed data as they are, and the compression target numerical values are the same as the compression target numerical values and the compression target numerical values. 7. The image compression apparatus according to claim 6, wherein a reversible compression process including an encoding process for encoding and outputting a numerical value representing a continuous number of numerical values to be compressed is performed. 前記第3の画像圧縮部は、前記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときは該連続数を1単位ビット数で表現し、該連続数が該所定数を越えるときは該連続数を2単位ビット数で表現するものであることを特徴とする請求項7記載の画像圧縮装置。   The third image compression unit represents, as the encoding process, when the number of consecutive identical numerical values to be compressed is equal to or less than a predetermined number, the continuous number is represented by one unit bit number. 8. The image compression apparatus according to claim 7, wherein when it exceeds, the continuous number is expressed by 2 unit bits. プログラムを実行する情報処理装置内で実行され、該情報処理装置を画像データにデータ圧縮処理を施す画像圧縮装置として動作させる画像圧縮プログラムであって、
前記情報処理装置を、
画像データに非可逆圧縮処理を施すことにより第1の圧縮データを生成する第1の画像圧縮部と、
前記第1の画像圧縮部で得られた第1の圧縮データを解凍することにより解凍データを生成する画像解凍部と、
前記第1の画像圧縮部による非可逆圧縮処理前の画像データと前記画像解凍部により得られた解凍データとの差分演算により差分データを求める差分演算部と、
前記差分演算部で得られた差分データに非可逆圧縮処理を施すことにより第2の圧縮データを生成する第2の画像圧縮部とを備えた画像圧縮装置として動作させることを特徴とする画像圧縮プログラム。
An image compression program that is executed in an information processing apparatus that executes a program and causes the information processing apparatus to operate as an image compression apparatus that performs data compression processing on image data,
The information processing apparatus;
A first image compression unit that generates first compressed data by performing irreversible compression processing on the image data;
An image decompression unit that generates decompressed data by decompressing the first compressed data obtained by the first image compression unit;
A difference calculation unit for obtaining difference data by calculating a difference between the image data before irreversible compression processing by the first image compression unit and the decompressed data obtained by the image decompression unit;
Image compression characterized by operating as an image compression apparatus including a second image compression unit that generates second compressed data by performing lossy compression processing on the difference data obtained by the difference calculation unit program.
前記第1の画像圧縮部は、画像データにJPEG規格に準拠した非可逆圧縮処理を施すものであることを特徴とする請求項9記載の画像圧縮プログラム。   10. The image compression program according to claim 9, wherein the first image compression unit performs irreversible compression processing conforming to the JPEG standard on image data. 前記第2の画像圧縮部は、前記差分データに量子化処理を含む圧縮処理を施すものであることを特徴とする請求項9記載の画像圧縮プログラム。   10. The image compression program according to claim 9, wherein the second image compression unit performs a compression process including a quantization process on the difference data. 前記第2の画像圧縮部は、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む圧縮処理を施すものであることを特徴とする請求項11記載の画像圧縮プログラム。   The second image compression unit outputs one or more predetermined compression target numerical values as they are in the compressed data, and the compression target numerical values are the same as the compression target numerical values and the compression target numerical values. 12. The image compression program according to claim 11, wherein a compression process including an encoding process for encoding and outputting a numerical value representing a continuous number of numerical values to be compressed is performed. 前記第2の画像圧縮部は、前記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときは該連続数を1単位ビット数で表現し、該連続数が該所定数を越えるときは該連続数を2単位ビットで表現するものであることを特徴とする請求項12記載の画像圧縮プログラム。   The second image compression unit expresses, as the encoding process, when the number of consecutive identical numerical values to be compressed is equal to or less than a predetermined number, the continuous number is expressed by one unit bit number, and the continuous number is the predetermined number. 13. The image compression program according to claim 12, wherein when the number exceeds, the continuous number is expressed by 2 unit bits. 前記情報処理装置と、
画像データに可逆圧縮処理を施すことにより第3の圧縮データを生成する第3の画像圧縮部と、
前記第3の画像圧縮部で得られた第3の圧縮データの圧縮率が所定の圧縮率以上であるか否かを判定する圧縮率判定部とをさらに備え、
前記第1の画像圧縮部、前記画像解凍部、前記差分演算部、および前記第2の画像圧縮部は、前記圧縮率判定部による、前記第3の圧縮データが所定の圧縮率に満たない圧縮率であるとの判定結果を受けて作用するものである画像圧縮装置として動作させることを特徴とする請求項9記載の画像圧縮プログラム。
The information processing apparatus;
A third image compression unit that generates third compressed data by performing reversible compression processing on the image data;
A compression rate determination unit that determines whether or not the compression rate of the third compressed data obtained by the third image compression unit is equal to or higher than a predetermined compression rate;
The first image compression unit, the image decompression unit, the difference calculation unit, and the second image compression unit are compressed by the compression rate determination unit so that the third compressed data does not reach a predetermined compression rate. The image compression program according to claim 9, wherein the image compression program is operated as an image compression apparatus that operates upon receiving a determination result that the ratio is a rate.
前記第3の画像圧縮部が、被圧縮データ中、1つもしくは複数の所定の圧縮対象数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであることを特徴とする請求項14記載の画像圧縮プログラム。   The third image compression unit outputs one or more predetermined compression target numerical values in the compressed data as they are, and the compression target numerical values are the same as the compression target numerical values and the compression target numerical values. 15. The image compression program according to claim 14, wherein a lossless compression process including an encoding process for encoding and outputting a numerical value representing a continuous number of numerical values to be compressed is performed. 前記第3の画像圧縮部は、前記符号化処理として、同一の圧縮対象数値の連続数が所定数以下のときは該連続数を1単位ビット数で表現し、該連続数が該所定数を越えるときは該連続数を2単位ビット数で表現するものであることを特徴とする請求項15記載の画像画像圧縮プログラム。   The third image compression unit represents, as the encoding process, when the number of consecutive identical numerical values to be compressed is equal to or less than a predetermined number, the continuous number is represented by one unit bit number. 16. The image image compression program according to claim 15, wherein when it exceeds, the continuous number is expressed by 2 unit bit number.
JP2004239719A 2004-08-19 2004-08-19 Image compressor and image compression program Withdrawn JP2006060490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004239719A JP2006060490A (en) 2004-08-19 2004-08-19 Image compressor and image compression program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004239719A JP2006060490A (en) 2004-08-19 2004-08-19 Image compressor and image compression program

Publications (1)

Publication Number Publication Date
JP2006060490A true JP2006060490A (en) 2006-03-02

Family

ID=36107610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004239719A Withdrawn JP2006060490A (en) 2004-08-19 2004-08-19 Image compressor and image compression program

Country Status (1)

Country Link
JP (1) JP2006060490A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017115A (en) * 2006-07-05 2008-01-24 Fujifilm Corp Data compression apparatus and data compression program
JP2008035066A (en) * 2006-07-27 2008-02-14 Fujifilm Corp Data compression apparatus and data compression program
JP2008235966A (en) * 2007-03-16 2008-10-02 Kyocera Mita Corp Image compression apparatus, image forming apparatus, and still image compression method
CN112165588A (en) * 2020-09-28 2021-01-01 成都微光集电科技有限公司 Screen superposition display system and method and picture compression method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017115A (en) * 2006-07-05 2008-01-24 Fujifilm Corp Data compression apparatus and data compression program
JP4689545B2 (en) * 2006-07-05 2011-05-25 富士フイルム株式会社 Data compression apparatus and data compression program
JP2008035066A (en) * 2006-07-27 2008-02-14 Fujifilm Corp Data compression apparatus and data compression program
JP4699307B2 (en) * 2006-07-27 2011-06-08 富士フイルム株式会社 Data compression apparatus and data compression program
JP2008235966A (en) * 2007-03-16 2008-10-02 Kyocera Mita Corp Image compression apparatus, image forming apparatus, and still image compression method
CN112165588A (en) * 2020-09-28 2021-01-01 成都微光集电科技有限公司 Screen superposition display system and method and picture compression method

Similar Documents

Publication Publication Date Title
US7899262B2 (en) Data compression apparatus and data compressing program storage medium
US6658146B1 (en) Fixed-rate block-based image compression with inferred pixel values
US8213727B2 (en) Image encoding apparatus and image decoding apparatus, and control method thereof
JP3461309B2 (en) Huffman coded data compression device
JP2006121645A (en) Image compression apparatus and image compression program
JP4633576B2 (en) Data compression apparatus and data compression program
JP2006060490A (en) Image compressor and image compression program
US20080025620A1 (en) Data compression apparatus and data compressing program storage medium
JP4173498B2 (en) Data compression apparatus and data compression program
JP2005277932A (en) Device and program for compressing data
JP4377351B2 (en) Data compression apparatus and data compression program
JP4131969B2 (en) Data compression apparatus and data compression program
JP4435586B2 (en) Data compression apparatus and data compression program
JP2005260408A (en) Data compression apparatus and data compression program
JP2005252531A (en) Device and program for compressing data
JP3859325B2 (en) Image iterative transform decoding apparatus and method, and recording medium
JP4131970B2 (en) Data compression apparatus and data compression program
JP4699307B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4181147B2 (en) Data compression apparatus and data compression program
JP4377352B2 (en) Data compression apparatus and data compression program
JPH1098620A (en) Picture processor
JP3361177B2 (en) Encoding / decoding method and encoding / decoding device
JP2005260420A (en) Data compression apparatus and data compression program
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061213

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20071106