JP2006352417A - Data compression apparatus and data compression program - Google Patents

Data compression apparatus and data compression program Download PDF

Info

Publication number
JP2006352417A
JP2006352417A JP2005174772A JP2005174772A JP2006352417A JP 2006352417 A JP2006352417 A JP 2006352417A JP 2005174772 A JP2005174772 A JP 2005174772A JP 2005174772 A JP2005174772 A JP 2005174772A JP 2006352417 A JP2006352417 A JP 2006352417A
Authority
JP
Japan
Prior art keywords
data
compression
unit
numerical value
numerical values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005174772A
Other languages
Japanese (ja)
Other versions
JP4181147B2 (en
JP2006352417A5 (en
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
Fujifilm Holdings Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Holdings Corp filed Critical Fujifilm Holdings Corp
Priority to JP2005174772A priority Critical patent/JP4181147B2/en
Priority to US11/453,172 priority patent/US7826670B2/en
Publication of JP2006352417A publication Critical patent/JP2006352417A/en
Publication of JP2006352417A5 publication Critical patent/JP2006352417A5/ja
Application granted granted Critical
Publication of JP4181147B2 publication Critical patent/JP4181147B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data compression apparatus and a data compression program capable of executing novel and preferable compression processing applicable to the compression of CT data. <P>SOLUTION: The data compression apparatus includes: an interleave processing section that periodically interleaves numerals from consecutive numerals configuring data to be compressed to generate first data to be compressed comprising consecutiveness of numerals extracted through the interleaving from the data to be compressed and to generate second data to be compressed comprising consecutiveness of numerals left uninterleaved; a lossless compression section for applying lossless compression processing to the first data to be compressed produced by the interleave processing section; and a lossy compression section for applying lossy compression processing to the second data to be compressed produced by the interleave processing section. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

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

従来より、記憶容量の低減化や通信量の低減化等のために、画像データ等のデータを圧縮する技術が広く採用されている。   2. Description of the Related Art Conventionally, techniques for compressing data such as image data have 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 a 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.

ここで、データ圧縮技術を適用した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−5−20822号公報 特開平9−200540号公報
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 Japanese translation of PCT publication No. 2001-5-20822 Japanese Patent Laid-Open No. 9-200540

しかし、JPEG等の圧縮方式では、ソフトウェアでの圧縮処理に時間を要し、圧縮処理のシステム全体としての処理能力を劣化させる要因となっていた。   However, in a compression method such as JPEG, it takes time to perform compression processing by software, which causes a reduction in processing capacity of the entire compression processing system.

本発明は上記事情に鑑み、CTデータの圧縮に適用可能な新たな好ましい圧縮処理を行うことができるデータ圧縮装置およびデータ圧縮プログラムを提供することを目的とする。   In view of the above circumstances, an object of the present invention is to provide a data compression apparatus and a data compression program capable of performing a new preferable compression process applicable to CT data compression.

上記目的を達成する本発明のデータ圧縮装置は、
所定の単位ビット数で表わされる数値の連続からなる被圧縮データにデータ圧縮処理を施すデータ圧縮装置において、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第2の被圧縮データとを作成する間引き処理部と、
上記間引き処理部で作成された第1の被圧縮データに可逆圧縮処理を施す可逆圧縮部と、
上記間引き処理部で作成された第2の被圧縮データに非可逆圧縮処理を施す非可逆圧縮部とを備えたことを特徴とする。
The data compression apparatus of the present invention that achieves the above object provides:
In a data compression apparatus that performs data compression processing on data to be compressed consisting of a series of numerical values represented by a predetermined number of unit bits,
By periodically decimating a numerical value from a series of numerical values constituting the compressed data, a first compressed data consisting of a series of numerical values extracted from the compressed data by the thinning and a continuation of the remaining numerical values. A decimation processing unit for creating the two compressed data;
A lossless compression unit that performs a lossless compression process on the first compressed data created by the thinning processing unit;
And an irreversible compression unit that performs irreversible compression processing on the second compressed data generated by the thinning processing unit.

この本発明のデータ圧縮装置は、
上記非可逆圧縮部が、
上記間引き処理部で作成された第2の被圧縮データを構成する数値について、上記間引き処理部の間引きによってその数値の前後それぞれで間引かれた各数値の間の値を有するものか否かを判定し、間の値を有する場合には、間の値であることを表す符号を出力し、間の値でない場合には、その数値を前記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであることが好適である。
This data compression apparatus of the present invention is
The lossy compression unit is
Whether or not the numerical value constituting the second compressed data created by the thinning processing unit has a value between the numerical values thinned out before and after the numerical value by thinning out the thinning processing unit. If there is an intermediate value, a sign indicating that it is an intermediate value is output, and if it is not an intermediate value, the numerical value is re-expressed with a smaller number of bits than the unit bit number. It is preferable to output the numerical values obtained.

この好適なデータ圧縮装置は、
上記非可逆圧縮部が、数値を上記少ビット数で表現し直すに当たり、上記単位ビット数のビット値の下位桁を切り捨てるものであってもよく、あるいは、
上記非可逆圧縮部が、数値を上記少ビット数で表現し直すに当たり、その単位ビット数で表現される数値範囲のうち、上記各所定場所から間引かれた数値の数値幅を除く残りの数値範囲を、その少ビット数に割り振って表現し直すものであってもよい。
This preferred data compression device is:
When the irreversible compression unit re-expresses the numerical value with the small number of bits, the lower-order digit of the bit value of the unit bit number may be truncated,
When the irreversible compression unit re-expresses the numerical value with the small number of bits, the remaining numerical value excluding the numerical value width of the numerical value thinned out from each predetermined place in the numerical range expressed with the unit bit number The range may be re-expressed by allocating to the small number of bits.

また、本発明のデータ圧縮装置は、
上記可逆圧縮部が、
上記間引き処理部で作成された第1の被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
上記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
上記オフセット部によって数値がオフセットされた被圧縮データの各数値を、上記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、その被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
上記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
上記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであることが好ましい。
The data compression apparatus of the present invention
The lossless compression unit is
Difference generation for generating new compressed data composed of a series of numerical values representing the difference by obtaining a difference between adjacent numerical values for a series of numerical values constituting the first compressed data generated by the thinning processing unit And
An offset unit for offsetting each numerical value constituting new compressed data generated by the difference generation unit by a predetermined value;
By dividing each numerical value of the compressed data whose numerical value is offset by the offset part into an upper bit part and a lower bit part at a predetermined divided bit number smaller than the unit bit number, the compressed data is A dividing unit that divides the upper data consisting of a continuation of the upper bit part in each numerical value and the lower data consisting of a continuation of the lower bit part of each numerical value;
An upper data compression unit that performs lossless compression processing on the upper data divided by the dividing unit;
It is preferable to include a lower data compression unit that performs a lossless compression process on the lower data divided by the dividing unit.

ここで、上記の『被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることにより』における『隣接する』とは、データストリーム上で隣接してもよいが、必ずしもそれに限定されるものではない。例えば、2次元画像データが1次元ストリーム状のデータとして扱われている場合であれば、2次元的な画像上で見て隣接してもよい。以下においても同様である。   Here, “adjacent” in the above “by calculating the difference between adjacent numerical values for a series of numerical values constituting the compressed data” may be adjacent on the data stream, but is not necessarily limited thereto. It is not something. For example, if two-dimensional image data is handled as one-dimensional stream data, the two-dimensional images may be adjacent to each other when viewed on the two-dimensional image. The same applies to the following.

差分生成部などを備えたこの好ましいデータ圧縮装置は、
上記上位データ圧縮部が、上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部を備えたものであることが好ましい。
This preferable data compression apparatus including a difference generation unit is
The upper data compression unit outputs the numerical values of the upper data excluding one or a plurality of predetermined compression target numerical values as they are, and for the compression target numerical values, the compression target numerical value and the same compression as the compression target numerical value It is preferable to include a first encoding unit that encodes and outputs a numerical value representing the number of consecutive target numerical values.

また、上記差分生成部などを備えた好ましいデータ圧縮装置は、
上記上位データ圧縮部が、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
符号と数値を対応づけるテーブルを用いて、第1の符号化部で符号化された後のデータにエントロピー符号化を施す第2の符号化部を備えたものであることが、より好ましい。
Moreover, a preferable data compression apparatus including the difference generation unit and the like is as follows.
The upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target values is output as it is, and the compression target numerical value represents the compression target numerical value and the continuous number of the compression target numerical values that are the same as the compression target numerical value. A first encoding unit that encodes and outputs a numerical value;
It is more preferable to include a second encoding unit that performs entropy encoding on the data that has been encoded by the first encoding unit using a table that associates codes with numerical values.

ここで、本発明のデータ圧縮装置において、上記の上位データ圧縮部は、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
ハフマンテーブルを用いて、第1の符号化部で符号化された後のデータにハフマン符号化を施す第2の符号化部を備えたものであってもよい。
Here, in the data compression apparatus of the present invention, the upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target values is output as it is, and the compression target numerical value represents the compression target numerical value and the continuous number of the compression target numerical values that are the same as the compression target numerical value. A first encoding unit that encodes and outputs a numerical value;
You may provide the 2nd encoding part which performs Huffman encoding to the data after encoding by the 1st encoding part using a Huffman table.

さらに、上記差分生成部などを備えた好ましい圧縮装置は、
上記上位データ圧縮部が、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
第1のデータ圧縮部で符号化された後のデータ中に出現する数値のヒストグラムを求めるヒストグラム算出部と、
ヒストグラム算出部で求められたヒストグラムに基づき、符号と数値を対応づけるテーブルに、出現頻度の高い数値ほど符号長の短かい符号を割り当てる符号割当部と、
符号割当部で符号が割り当てられたテーブルを用いて、第1の符号化部で符号化された後のデータにエントロピー符号化を施す第2の符号化部を備えたものであることが、より好ましい。
Furthermore, a preferable compression device including the difference generation unit and the like is as follows.
The upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target values is output as it is, and the compression target numerical value represents the compression target numerical value and the continuous number of the compression target numerical values that are the same as the compression target numerical value. A first encoding unit that encodes and outputs a numerical value;
A histogram calculation unit for obtaining a histogram of numerical values appearing in the data after being encoded by the first data compression unit;
Based on the histogram obtained by the histogram calculation unit, a code allocating unit that assigns a code having a shorter code length to a table that associates a code and a numerical value with a higher appearance frequency,
It is more preferable to include a second encoding unit that performs entropy encoding on the data encoded by the first encoding unit using the table to which the code is allocated by the code allocation unit. preferable.

また、上記差分生成部などを備えた好ましいデータ圧縮装置は、
上記下位データ圧縮部が、符号と数値を対応づけるテーブルを用いて下位データにエントロピー符号化を施すものであることが好ましい。
Moreover, a preferable data compression apparatus including the difference generation unit and the like is as follows.
The lower data compression unit preferably performs entropy coding on the lower data using a table that associates codes and numerical values.

ここで、本発明のデータ圧縮装置において、上記の下位データ圧縮部は、ハフマンテーブルを用いて下位データにハフマン符号化を施すものであってもよい。   Here, in the data compression device of the present invention, the lower data compression unit may perform Huffman coding on the lower data using a Huffman table.

また、上記差分生成部などを備えた好ましいデータ圧縮装置は、
上記下位データ圧縮部が、圧縮省略の指示を受けて下位データを無圧縮で出力するものであることも好適である。
Moreover, a preferable data compression apparatus including the difference generation unit and the like is as follows.
It is also preferable that the low-order data compression unit outputs a low-order data without compression in response to an instruction to omit compression.

上記目的を達成する本発明のデータ圧縮プログラムは、
プログラムを実行する情報処理装置内に組み込まれて該情報処理装置に、所定の単位ビット数で表わされる数値の連続からなる被圧縮データに対するデータ圧縮処理を実行させるデータ圧縮プログラムにおいて、
上記情報処理装置上に、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで該被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第2の被圧縮データとを作成する間引き処理部と、
上記間引き処理部で作成された第1の被圧縮データに可逆圧縮処理を施す可逆圧縮部と、
上記間引き処理部で作成された第2の被圧縮データに非可逆圧縮処理を施す非可逆圧縮部とを構築することを特徴とする。
A data compression program of the present invention that achieves the above object is as follows.
In a data compression program that is incorporated in an information processing apparatus that executes a program and causes the information processing apparatus to execute data compression processing on data to be compressed consisting of a series of numerical values represented by a predetermined number of unit bits.
On the information processing apparatus,
By periodically decimating a numerical value from a series of numerical values constituting the compressed data, the first compressed data consisting of a series of numerical values extracted from the compressed data by the thinning and a continuation of the remaining numerical values A decimation processing unit for creating second compressed data;
A lossless compression unit that performs a lossless compression process on the first compressed data created by the thinning processing unit;
And a lossy compression unit configured to perform an irreversible compression process on the second compressed data generated by the thinning processing unit.

なお、本発明にいうデータ圧縮プログラムについては、ここではその基本形態のみを示すのにとどめるが、これは単に重複を避けるためであり、本発明にいうデータ圧縮プログラムには、上記の基本形態のみではなく、前述したデータ圧縮装置の各形態に対応する各種の形態が含まれる。   The data compression program referred to in the present invention is only shown in its basic form here, but this is only for avoiding duplication, and the data compression program referred to in the present invention includes only the above basic form. Instead, various forms corresponding to each form of the data compression apparatus described above are included.

また、本発明のデータ圧縮プログラムがコンピュータ上に構成する差分生成部などといった要素は、1つの要素が1つのプログラム部品によって構築されるものであってもよく、1つの要素が複数のプログラム部品によって構築されるものであってもよく、複数の要素が1つのプログラム部品によって構築されるものであってもよい。また、これらの要素は、そのような作用を自分自身で実行するものとして構築されてもよく、あるいは、コンピュータに組み込まれている他のプログラムやプログラム部品に指示を与えて実行するものとして構築されても良い。   In addition, the element such as a difference generation unit configured on the computer by the data compression program of the present invention may be one element constructed by one program part, and one element by a plurality of program parts. It may be constructed, or a plurality of elements may be constructed by one program part. In addition, these elements may be constructed so as to execute such actions by themselves, or constructed by giving instructions to other programs and program components incorporated in the computer. May be.

上記本発明のデータ圧縮装置ないしデータ圧縮プログラムによれば、被圧縮データが、周期的に間引かれた第1の被圧縮データと残りの第2の被圧縮データに分けられ、第1の被圧縮データには可逆圧縮処理が施されて第2の被圧縮データには非可逆圧縮処理が施される。第2の被圧縮データについては非可逆圧縮によって元の情報は一部失われるが、CT画像は隣接画素間の相関が強いので、その相関を前提とすることで、第2の被圧縮データを大幅に圧縮しても元の画像の画質を高く維持することができる。   According to the data compression apparatus or data compression program of the present invention, the data to be compressed is divided into the first data to be compressed and the remaining second data to be compressed which are periodically thinned out. The compressed data is subjected to a lossless compression process, and the second compressed data is subjected to an irreversible compression process. As for the second compressed data, a part of the original information is lost by irreversible compression, but the CT image has a strong correlation between adjacent pixels. The image quality of the original image can be maintained high even if the image is greatly compressed.

また、上記非可逆圧縮部が、第2の被圧縮データを圧縮する際に、第1の被圧縮データの間の値であるか否かで圧縮方式を切り換えるものであると、隣接画素との相関がある部分では大幅な圧縮を実現すると共に、相関がない部分については圧縮を控えることで画質を維持することができる。   Further, when the irreversible compression unit compresses the second compressed data, the compression method is switched depending on whether or not it is a value between the first compressed data. The image quality can be maintained by realizing significant compression in a portion having a correlation and by suppressing compression in a portion having no correlation.

また、上記可逆圧縮部が、差分生成部などを備えると、この可逆圧縮部では、元の被圧縮データから差分生成部によって生成されてオフセット部によって数値がオフセットされた新たな被圧縮データが上位データと下位データとに分割され、それぞれ上位データ圧縮部と下位データ圧縮部とで可逆圧縮処理が施される。一般に、CTデータから得られる新たな被圧縮データの場合には、後で詳述するように、上位データと下位データとではデータ中の数値の分布傾向が顕著に異なっているので、各データに適した可逆圧縮処理が存在し、本発明による圧縮処理によって全体として大きな圧縮率が達成される。また、各データに施される可逆圧縮処理としては、アルゴリズムが単純な処理が適用可能であるため、圧本発明による圧縮処理は処理時間が短い。このように、差分生成部などを備えた可逆圧縮部によれば、CTデータの圧縮に適用すると特に好ましい可逆圧縮処理が実現される。   Further, when the lossless compression unit includes a difference generation unit or the like, in the lossless compression unit, new compression target data generated by the difference generation unit from the original compression target data and numerical values are offset by the offset unit is higher. The data is divided into data and lower data, and reversible compression processing is performed by the upper data compression unit and the lower data compression unit, respectively. In general, in the case of new compressed data obtained from CT data, as will be described in detail later, the distribution tendency of numerical values in the data is significantly different between the upper data and the lower data. There is a suitable lossless compression process, and the compression process according to the present invention achieves a large compression ratio as a whole. In addition, as a lossless compression process performed on each data, a process with a simple algorithm can be applied. Therefore, the compression process according to the present invention has a short processing time. As described above, according to the lossless compression unit including the difference generation unit or the like, particularly preferable lossless compression processing is realized when applied to the compression of CT data.

また、上記の上位データ圧縮部が第1の符号化部を備えると、圧縮対象数値のみが、その圧縮対象数値と連続数とを表わす数値とに符号化されるため、原データよりも冗長度が増すという事態が回避され、圧縮率が向上する。   Further, when the upper data compression unit includes the first encoding unit, only the numerical value to be compressed is encoded into the numerical value representing the numerical value to be compressed and the continuous number, and therefore, the redundancy is higher than that of the original data. Is avoided, and the compression rate is improved.

また、上記の上位データ圧縮部が第2の符号化部を備えると、エントロピー符号化(典型的にはハフマン符号化)による、圧縮率の更なる向上が見込まれる。   Further, when the upper data compression unit includes the second encoding unit, further improvement of the compression rate is expected by entropy encoding (typically Huffman encoding).

さらに、上記の上位データ圧縮部が、ヒストグラム算出部と符号割当部とを備え、第2の符号化部が、符号割当部で符号が割り当てられたテーブルを用いてエントロピー符号化(例えばハフマン符号化)を施すものであると、符号の割り当てが固定されたテーブルを用いたエントロピー符号化と比べ、圧縮率をさらに大きく向上させることができる。   Further, the higher-order data compression unit includes a histogram calculation unit and a code allocation unit, and the second encoding unit uses entropy coding (for example, Huffman coding) using a table to which codes are allocated by the code allocation unit. ), The compression ratio can be further improved as compared with entropy coding using a table in which code assignment is fixed.

また、上記の下位データ圧縮部が、エントロピー符号化を施すものであると、エントロピー符号化(典型的にはハフマン符号化)による、圧縮率の更なる向上が見込まれる。   Further, if the lower data compression unit performs entropy coding, further improvement of the compression rate by entropy coding (typically Huffman coding) is expected.

さらに、上記の下位データ圧縮部が、圧縮省略の指示を受けて下位データを無圧縮で出力するものであると、そのような指示によってより高速な圧縮処理を選択することができる。   Furthermore, when the lower data compression unit receives an instruction to omit compression and outputs the lower data without compression, it is possible to select a higher-speed compression process according to such an instruction.

以下において説明する実施形態は、図1に示す全体システムの中のホストコントローラに組み込まれる画像圧縮装置であり、さらに具体的には、図2に示すホストコントローラ内のCTのビットマップデータ12Aについてデータ圧縮を行なう処理に関するものである。したがって、ここでは、図1,図2を参照して説明したCTデータについてのデータ圧縮処理が以下に説明する本発明の実施形態としてのデータ圧縮処理に置き換わり、インターフェース機器内でのデータ伸長(解凍)処理もその本発明の実施形態としてのデータ圧縮処理に対応したデータ伸長(解凍)処理に置き換わるものと理解し、図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, data about CT bitmap data 12A in the host controller shown in FIG. The present invention relates to compression processing. Therefore, here, the data compression processing for CT 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 data expansion (decompression) in the interface device is performed. ) Processing is also replaced with data decompression (decompression) processing corresponding to the data compression processing according to the embodiment of the present invention, and the entire system shown in FIG. 1 and the processing flow shown in FIG. Description is omitted.

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

この図3に示す画像圧縮装置500は、間引き処理部505、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、Hプレーン圧縮部550、およびFAKE画素圧縮部560を備えている。各部505〜560の詳細は後述するが、この画像圧縮装置500内での画像データの流れは以下のとおりである。   The image compression apparatus 500 shown in FIG. 3 includes a thinning processing unit 505, a differential encoding unit 510, an offset unit 520, a plane division unit 530, an L plane compression unit 540, an H plane compression unit 550, and a FAKE pixel compression unit 560. I have. Although details of the respective units 505 to 560 will be described later, the flow of image data in the image compression apparatus 500 is as follows.

入力画像ファイルD0(本実施形態では、図2に示すように、ビットマップに展開されたCTデータ12Aが格納されたファイル)は、図4に示すデータ圧縮装置500の間引き処理部505に入力されて、画像データから、画像中の周期的な画素部分に相当するTRUE画素データが間引かれる。間引かれた残りはFAKE画素データとなる。これらTRUE画素データおよびFAKE画素データが、それぞれ、本発明にいう第1の被圧縮データおよび第2の被圧縮データの各一例に相当する。   The input image file D0 (in this embodiment, a file storing CT data 12A expanded into a bitmap as shown in FIG. 2) is input to the thinning processing unit 505 of the data compression apparatus 500 shown in FIG. Thus, TRUE pixel data corresponding to periodic pixel portions in the image is thinned out from the image data. The remainder thinned out becomes FAKE pixel data. These TRUE pixel data and FAKE pixel data correspond to examples of the first compressed data and the second compressed data, respectively, according to the present invention.

TRUE画素データは差分符号化部510に入力されて、差分符号化処理、すなわち、入力されてきたデータを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす8ビットの数値の連続からなる画像データを生成する処理が行なわれる。この差分符号化部510は、本発明にいう差分生成部の一例に相当する。   The TRUE pixel data is input to the differential encoding unit 510 and is subjected to differential encoding processing, that is, an 8-bit representing the difference is obtained by obtaining a difference between adjacent numerical values for a series of numerical values constituting the input data. Processing for generating image data consisting of a series of numerical values is performed. The difference encoding unit 510 corresponds to an example of a difference generation unit referred to in the present invention.

差分符号化部510で生成された、差分を表わす数値の連続からなる画像データは、オフセット部520に入力されて所定値だけオフセットされる。その後、プレーン分割部530で、画像データ中の8ビットの各数値が下位4ビットと上位4ビットとに分けられることにより、画像データは、下位4ビットの数値の連続からなる下位サブプレーンD1Lと上位4ビットの数値の連続からなる上位サブプレーンD1Hに分割される。このオフセット部520は、本発明にいうオフセット部の一例に相当し、プレーン分割部530は、本発明にいう分割部の一例に相当する。また、下位サブプレーンD1Lおよび上位サブプレーンD1Hは、それぞれ、本発明にいう下位データおよび上位データの各一例に相当する。   The image data composed of a series of numerical values representing the difference generated by the differential encoding unit 510 is input to the offset unit 520 and offset by a predetermined value. Thereafter, the plane division unit 530 divides each numerical value of 8 bits in the image data into lower 4 bits and upper 4 bits, so that the image data is converted into a lower subplane D1L composed of a sequence of lower 4 bits. It is divided into an upper subplane D1H consisting of a sequence of upper 4 bits. The offset unit 520 corresponds to an example of an offset unit according to the present invention, and the plane division unit 530 corresponds to an example of a division unit according to the present invention. Further, the lower subplane D1L and the upper subplane D1H correspond to examples of the lower data and the upper data according to the present invention, respectively.

プレーン分割部530で分割された下位サブプレーンD1Lおよび上位サブプレーンD1Hは、それぞれ、Lプレーン圧縮部540およびHプレーン圧縮部550に入力されて可逆圧縮が施される。これらLプレーン圧縮部540およびHプレーン圧縮部550は、それぞれ、本発明にいう下位データ圧縮部および上位データ圧縮部の各一例に相当する。   The lower subplane D1L and the upper subplane D1H divided by the plane division unit 530 are input to the L plane compression unit 540 and the H plane compression unit 550, respectively, and subjected to lossless compression. The L plane compression unit 540 and the H plane compression unit 550 correspond to examples of the lower data compression unit and the upper data compression unit according to the present invention, respectively.

Lプレーン圧縮部540のハフマン符号化部541では、数値と符号とを対応づける固定的なハフマンテーブルに従って、そのハフマン符号化部541に入力されてきた下位サブプレーンD1Lを構成する数値をそのハフマンテーブルに従う符号に置き換える符号化処理が行なわれる。このハフマン符号化は、エントロピー符号化の一種である。なお、Lプレーン圧縮部540にはモード切換部542が組み込まれており、このモード切換部542は、ユーザから、高速モードと通常モードとの切り換えを指示されて、上記のハフマン符号化部541によるハフマン符号化を経る通常モードと、ハフマン符号化を省略して下位サブプレーンD1Lをそのまま出力する高速モードとを切り換える。このようなLプレーン圧縮部540からは、下位サブプレーンD1Lが圧縮された下位圧縮データD2Lが出力されるが、高速モードの場合には下位圧縮データD2Lは下位サブプレーンD1Lそのものである。   In the Huffman coding unit 541 of the L plane compression unit 540, in accordance with a fixed Huffman table that associates a numerical value with a code, the numerical value constituting the lower subplane D1L input to the Huffman coding unit 541 is displayed in the Huffman table. An encoding process for replacing with a code according to the above is performed. This Huffman coding is a kind of entropy coding. Note that a mode switching unit 542 is incorporated in the L plane compression unit 540, and the mode switching unit 542 is instructed by the user to switch between the high speed mode and the normal mode, and is performed by the Huffman coding unit 541. Switching between a normal mode that undergoes Huffman coding and a high-speed mode that omits Huffman coding and outputs the lower subplane D1L as it is. The L-plane compression unit 540 outputs lower-order compressed data D2L obtained by compressing the lower-order subplane D1L. In the high-speed mode, the lower-order compressed data D2L is the lower-order subplane D1L itself.

一方、Hプレーン圧縮部550には、ランレングス符号化部551と、データスキャニング部552と、ハフマン符号化部553が備えられており、上位サブプレーンD1Hはランレングス符号化部551に入力される。   On the other hand, the H plane compression unit 550 includes a run length encoding unit 551, a data scanning unit 552, and a Huffman encoding unit 553, and the upper subplane D1H is input to the run length encoding unit 551. .

ランレングス符号化部551では、先ず、入力されてきた上位サブプレーンD1Hのデータの中から1つもしくは複数の圧縮対象数値の存在及び同一の圧縮対象数値の連続数が検出される。次いで、ランレングス符号化部551では、その検出結果を受けて、上位サブプレーンD1Hのデータ中、圧縮対象数値を除く数値についてはそのまま出力すると共に、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力するという符号化処理が行なわれる。このランレングス符号化部551では、その符号化処理にあたっては、同一の圧縮対象数値の連続数に応じ、その連続数を異なるビット数で表現する符号化が行なわれる。ここでは、具体的には、同一の圧縮対象数値の連続数が所定数以下のときはその連続数を1単位ビット数で表現し、その連続数が所定数を越えるときは2単位ビット数で表現する符号化が行なわれる。本実施形態では、このランレングス符号化部551が、本発明にいう第1の符号化部の一例に相当する。   In the run-length encoding unit 551, first, the presence of one or a plurality of compression target numerical values and the continuous number of the same compression target numerical values are detected from the input data of the upper subplane D1H. Next, the run-length encoding unit 551 receives the detection result, and outputs the numerical values excluding the numerical values to be compressed in the data of the upper subplane D1H as they are, and the numerical values to be compressed with the numerical values to be compressed, An encoding process is performed in which the compression target numerical value is encoded and output as a numerical value representing the number of consecutive compression target numerical values. In the run-length encoding unit 551, in the encoding process, encoding is performed in which the continuous number is expressed by a different number of bits according to the continuous number of the same numerical value to be compressed. More specifically, when the number of consecutive compression target numerical values is less than or equal to a predetermined number, the number of consecutive numbers is expressed by one unit bit number, and when the number of consecutive values exceeds the predetermined number, it is expressed by two unit bit numbers. Encoding to represent is performed. In the present embodiment, the run-length encoding unit 551 corresponds to an example of the first encoding unit referred to in the present invention.

また、ランレングス符号化部551での符号化後のデータは、次に、データスキャニング部552とハフマン符号化部553との双方に入力される。データスキャニング部552では、ランレングス符号化部551で符号化された後のデータの全てをスキャニングして、そのデータ中に出現する全ての数値の出現頻度(ヒストグラム)が求められる。ここで、この出現頻度を求める処理は、本実施形態では、図3に示す上位サブプレーンD1Hの1つずつを単位として実行され、各上位サブプレーンD1Hの、ランレングス符号化部551で符号化された後のデータ中の数値の出現頻度が求められる。さらに、データスキャニング部552では、求められたデータヒストグラム(数値の出現頻度)に基づき、ハフマンテーブルに、出現頻度の高い数値ほど符号長の短かい符号を割り当てる。このデータスキャニング部552は、本発明にいうヒストグラム算出部および符号割当部の各一例を兼ね備えたものに相当する。   The data encoded by the run-length encoding unit 551 is then input to both the data scanning unit 552 and the Huffman encoding unit 553. The data scanning unit 552 scans all of the data encoded by the run length encoding unit 551, and obtains the appearance frequency (histogram) of all the numerical values appearing in the data. Here, in the present embodiment, the processing for obtaining the appearance frequency is performed in units of one of the upper subplanes D1H illustrated in FIG. 3, and is encoded by the run length encoding unit 551 of each upper subplane D1H. The frequency of appearance of the numerical value in the data after being processed is obtained. Furthermore, the data scanning unit 552 assigns a code having a shorter code length to a Huffman table based on the obtained data histogram (numerical frequency appearance frequency). The data scanning unit 552 corresponds to a combination of examples of the histogram calculation unit and the code allocation unit according to the present invention.

データスキャニング部552で数値に符号が割り当てられてなるハフマンテーブルは、ハフマン符号化部553に渡され、ハフマン符号化部553では、その渡されたハフマンテーブルに従って、そのハフマン符号化部553に入力されてきたデータを構成する数値を、そのハフマンテーブルに従う符号、すなわち、出現頻度の高い数値ほど短かいビット長で表わされる符号に置き換える符号化処理が行なわれる。このハフマン符号化部553は、本発明にいう第2の符号化部の一例に相当する。   The Huffman table in which a code is assigned to a numerical value by the data scanning unit 552 is passed to the Huffman coding unit 553, and the Huffman coding unit 553 inputs the Huffman coding unit 553 according to the passed Huffman table. An encoding process is performed in which numerical values constituting the received data are replaced with codes according to the Huffman table, that is, codes represented by shorter bit lengths as numerical values having a higher appearance frequency. The Huffman encoding unit 553 corresponds to an example of the second encoding unit referred to in the present invention.

ハフマン符号化部553でハフマン符号化された後のデータは、データスキャニング部552で割り当てられた数値と符号との割当テーブルを含む圧縮情報が添付され、上位サブプレーンD1Hが圧縮された上位圧縮データD2HとしてHプレーン圧縮部550から出力される。   The data after the Huffman coding by the Huffman coding unit 553 is attached with compression information including an assignment table of numerical values and codes assigned by the data scanning unit 552, and the upper compressed data in which the upper subplane D1H is compressed. It is output from the H plane compression unit 550 as D2H.

このようにLプレーン圧縮部540およびHプレーン圧縮部550のそれぞれから出力される下位圧縮データD2Lと上位圧縮データD2Hとの組は、TRUE画素データが可逆圧縮された可逆圧縮データを構成する。   Thus, the set of the lower-order compressed data D2L and the higher-order compressed data D2H output from each of the L-plane compression unit 540 and the H-plane compression unit 550 constitutes reversible compression data in which TRUE pixel data is reversibly compressed.

一方、上記の間引き処理部505で得られたFAKE画素データは、FAKE画素圧縮部560に入力されて非可逆圧縮処理が施される。このFAKE画素圧縮部560には、ビット短縮部561と、ランレングス符号化部562と、ハフマン符号化部563とが備えられており、FAKE画素データを構成する数値はビット短縮部561で1ビットまたは4ビットの符号に置換される。そして、ランレングス符号化部562およびハフマン符号化部563によって、上記Hプレーン圧縮部550における処理と全く同様の処理が実行される。この結果、FAKE画素圧縮部560からは、FAKE画素データが非可逆圧縮された非可逆圧縮データD3が出力される。   On the other hand, the FAKE pixel data obtained by the thinning processing unit 505 is input to the FAKE pixel compression unit 560 and subjected to irreversible compression processing. The FAKE pixel compression unit 560 includes a bit shortening unit 561, a run length coding unit 562, and a Huffman coding unit 563, and the numerical values constituting the FAKE pixel data are 1 bit by the bit shortening unit 561. Alternatively, it is replaced with a 4-bit code. Then, the run length encoding unit 562 and the Huffman encoding unit 563 perform processing exactly the same as the processing in the H plane compression unit 550. As a result, the FAKE pixel compression unit 560 outputs lossy compressed data D3 obtained by irreversibly compressing the FAKE pixel data.

TRUE画素データの可逆圧縮データとFAKE画素データの非可逆圧縮データとで、元の画像データに対する圧縮データが構成される。この圧縮データは、図1に示すSCSI等の汎用インターフェース150を経由してインターフェース機器200に転送される。インターフェース機器200では、その受け取った圧縮データにデータ伸長処理が施されるが、このデータ伸長処理にあたっては、図3で説明した各種の符号化処理に対応する復号化処理が施されて元の入力画像ファイル中の画像データとほぼ同一の画像データが復元される。   The reversible compressed data of TRUE pixel data and the irreversible compressed data of FAKE pixel data constitute compressed data for the original image data. This compressed data 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. In this data decompression processing, decoding processing corresponding to the various encoding processing described in FIG. Image data that is almost the same as the image data in the image file is restored.

図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 corresponding to an embodiment of the data compression program of the present invention.

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

この画像圧縮プログラム600は、間引き処理部605、差分符号化部610、オフセット部620、プレーン分割部630、Lプレーン圧縮部640、Hプレーン圧縮部650、およびFAKE画素圧縮部660から構成されている。このCDROM140には、ここに示す画像圧縮プログラム600のほか、図1に示すホストコントローラ100における一連の処理を実行するための各種プログラムが記憶されているが、それらについては従来と同様であるため図示および説明は省略する。   The image compression program 600 includes a thinning processing unit 605, a differential encoding unit 610, an offset unit 620, a plane division unit 630, an L plane compression unit 640, an H plane compression unit 650, and a FAKE pixel compression unit 660. . 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を実現するものであり、間引き処理部605、差分符号化部610、オフセット部620、プレーン分割部630、Lプレーン圧縮部640、Hプレーン圧縮部650、およびFAKE画素圧縮部660は、CPU111で実行されることにより、そのホストコントローラ100を、図3に示す画像圧縮装置500を構成する、それぞれ、間引き処理部505、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、Hプレーン圧縮部550、およびFAKE画素圧縮部560として動作させるプログラム部品である。つまり、これらのプログラム部品により、画像圧縮装置500の構成要素がホストコントローラ100上に実質的に構築されることとなる。   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 processing unit 605, the differential encoding unit 610, the offset unit 620, the plane division unit 630, the L plane compression unit 640, the H plane compression unit 650, and the FAKE pixel compression unit 660 are executed by the CPU 111, so that the host controller 100, which constitute the image compression apparatus 500 shown in FIG. 3, respectively, a decimation processing unit 505, a differential encoding unit 510, an offset unit 520, a plane division unit 530, an L plane compression unit 540, an H plane compression unit 550, and Operates as FAKE pixel compression unit 560 Is a program parts. That is, the components of the image compression apparatus 500 are substantially constructed on the host controller 100 by these program parts.

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

図6は、図3のデータ圧縮装置500に入力される入力画像ファイル中の画像データのデータ構造および間引き処理の概念を示す図である。   FIG. 6 is a diagram showing the data structure of the image data in the input image file input to the data compression apparatus 500 in FIG. 3 and the concept of thinning processing.

図6に示すように、図3に示すデータ圧縮装置500に入力される画像データは、所定の主走査方向(図の横方向)とその主走査方向とは直角な副走査方向(図の縦方向)とに画素が並んでおり、主走査方向に並ぶ画素の列はラインと称される。ここでは8ライン分の画素が示されており、画素と画素との間隔は600dpiの解像度に相当する。   As shown in FIG. 6, the image data input to the data compression apparatus 500 shown in FIG. 3 includes a predetermined main scanning direction (horizontal direction in the figure) and a sub-scanning direction (vertical direction in the figure) perpendicular to the main scanning direction. Pixels arranged in the main scanning direction are referred to as lines. Here, pixels for 8 lines are shown, and the interval between the pixels corresponds to a resolution of 600 dpi.

各画素の位置は、画素値を表す符号T,Fに付された添え字で表現される。例えば3番目のラインについて、主走査方向に並ぶ各画素の画素値には、その並び順に、
3_1,3_2,3_3,3_4,…
という添え字が付されている。
The position of each pixel is represented by a subscript attached to codes T and F representing pixel values. For example, for the third line, the pixel values of the pixels arranged in the main scanning direction are
3_1, 3_2, 3_3, 3_4, ...
The subscript is attached.

図3に示すデータ圧縮装置500を構成する間引き処理部505には、このように並んだ画素値からなる画像データが入力され、各画素を、TRUE画素とFAKE画素とに分類する。この図6に示す各画素のうちTRUE画素は画素値が符号Tで表され、FAKE画素は画素値が符号Fで表されている。TRUE画素は、画素の並びの中から周期的に間引かれた画素であり、ここでは一例として、副走査方向に1ラインおきの各ライン(奇数番目のライン)について、主走査方向に1画素おきの各画素(奇数番目の画素)がTRUE画素として間引き出されている。この結果、この図6に示す例ではTRUE画素は、元の600dpiの解像度から300dpiの解像度に低下した画像を構成する画素に相当しており、元の画像データの4分の1に相当する画素が間引き出されたこととなる。このように間引き出されたTRUE画素は、そのようなTRUE画素の連続からなるTRUE画素データを構成し、そのTRUE画素データの構造は、元の画像データと同様に、主走査方向と副走査方向に画素が並んだ構造となっている。TRUE画素の間引きによって残ったFAKE画素についても、そのFAKE画素の連続からなるFAKE画素データを構成する。   The thinning processing unit 505 constituting the data compression apparatus 500 shown in FIG. 3 receives image data composed of pixel values arranged in this way, and classifies each pixel into a TRUE pixel and a FAKE pixel. Among the pixels shown in FIG. 6, the TRUE pixel has a pixel value represented by T, and the FAKE pixel has a pixel value represented by F. The TRUE pixel is a pixel that is periodically thinned out from the arrangement of the pixels. Here, as an example, for each line (odd-numbered line) every other line in the sub-scanning direction, one pixel in the main scanning direction. Every other pixel (odd-numbered pixel) is thinned out as a TRUE pixel. As a result, in the example shown in FIG. 6, the TRUE pixel corresponds to a pixel constituting an image that has been reduced from the original 600 dpi resolution to the 300 dpi resolution, and a pixel corresponding to a quarter of the original image data. Will be thinned out. The TRUE pixels thus thinned out constitute TRUE pixel data consisting of a series of such TRUE pixels, and the structure of the TRUE pixel data is similar to the original image data in the main scanning direction and the sub-scanning direction. It has a structure in which pixels are lined up. For FAKE pixels remaining after thinning out TRUE pixels, FAKE pixel data consisting of a series of the FAKE pixels is configured.

TRUE画素の間引きだしとしては、このほかに例えば、副走査方向に2ラインおきの各ラインについて、主走査方向に2画素おきの各画素を間引き出すことによって元の画像データの9分の1に相当する画素を間引き出す方式や、主走査方向と副走査方向とでは間引きだしの周期が異なる方式なども採用可能であるが、以下では、図6に示すように、奇数番ラインの奇数番画素が間引き出されたものとして説明を続ける。   In addition to the TRUE pixel decimation, for example, for every second line in the sub-scanning direction, every second pixel in the main scanning direction is thinned out to one-ninth of the original image data. A method of thinning out the corresponding pixels or a method of different thinning-out periods in the main scanning direction and the sub-scanning direction can be adopted, but in the following, as shown in FIG. The explanation will be continued on the assumption that was thinned out.

このようにして得られたTRUE画素データは、図3のデータ圧縮装置500を構成する差分符号化部510に入力され、差分符号化処理が施される。   The TRUE pixel data obtained in this way is input to the differential encoding unit 510 constituting the data compression apparatus 500 in FIG. 3 and subjected to differential encoding processing.

図7は、図3のデータ圧縮装置500を構成する差分符号化部510における差分符号化処理を例示して示す図である。   FIG. 7 is a diagram illustrating a differential encoding process in the differential encoding unit 510 included in the data compression apparatus 500 of FIG.

ここでは、図6に示す副走査方向に並ぶある縦一列の画素値が、図7の「画像データ」
の欄に示すように、
「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. 6 are the “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.

以下、これと同じ演算を繰り返すことにより、図8の「差分エンコード(下位8ビット)」の欄に表わされている
「(12) EF 01 FD 65 … L0 00 FF …」
が出力される。
Hereinafter, by repeating the same operation, “(12) EF 01 FD 65... L0 00 FF...” Shown in the “difference encoding (lower 8 bits)” field of FIG.
Is output.

図1に示すインターフェース機器200では、この差分符号化されたデータを復号化するにあたり、図8の右側に示す演算が行なわれる。   In decoding the differentially encoded data, the interface device 200 shown in FIG. 1 performs an operation 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.

図3の差分符号化部510では、以上説明したような差分符号化がTRUE画素データに施される。この差分符号化によって得られるデータは、図3のオフセット部520に入力され、そのデータの各数値について所定のオフセット値が加算される。   In the differential encoding unit 510 in FIG. 3, the differential encoding as described above is performed on the TRUE pixel data. Data obtained by this differential encoding is input to the offset unit 520 in FIG. 3, and a predetermined offset value is added to each numerical value of the data.

ここで、このような差分符号化およびオフセットの効果について、具体的なCTの画像データを例に用いて説明する。   Here, the effects of such differential encoding and offset will be described using specific CT image data as an example.

図8は、CTの画像データの例を示す図である。   FIG. 8 is a diagram illustrating an example of CT image data.

この図8のパート(A)には、CTの画像データが表しているCT画像の一例としてモノクロの風景画像が示されており、本実施形態では、このようなCT画像の各画素における色の濃度が8ビットの数値で表現された画像データが用いられる。図8のパート(B)には、パート(A)に示す風景画像を表す画像データにおけるデータ値のヒストグラムが示されており、このヒストグラムの横軸はデータ値、縦軸はデータ数(画素数)を表している。CT画像では一般に、ヒストグラムの幅が広く、ヒストグラム中でデータ数の山谷は生じてもヒストグラムの途中にデータ数が「0」の領域が生じることは極めてまれである。   Part (A) of FIG. 8 shows a monochrome landscape image as an example of a CT image represented by CT image data. In this embodiment, the color of each pixel of such a CT image is changed. Image data represented by numerical values having a density of 8 bits is used. Part (B) of FIG. 8 shows a histogram of data values in the image data representing the landscape image shown in Part (A). The horizontal axis of this histogram is the data value, and the vertical axis is the number of data (number of pixels). ). In general, in a CT image, the width of a histogram is wide, and even if there are peaks and valleys in the number of data in the histogram, it is extremely rare that an area with the number of data “0” occurs in the middle of the histogram.

図9は、CTの画像データに対する差分符号化およびオフセットの効果を示す図である。   FIG. 9 is a diagram illustrating the effect of differential encoding and offset on CT image data.

この図9のパート(A)には、図8に示したCTの画像データに対して差分符号化が施されて得られるデータのヒストグラムが示されており、このヒストグラムの横軸はデータ値、縦軸は出現頻度を表している。CTの画像データに対して、図6および図7で説明した差分符号化が施されると、データのヒストグラムは、一般に、この図9のパート(A)に示すような、最小データ値と最大データ値の双方に鋭いピークを有するヒストグラムとなる。そして、このようなデータに対してオフセットが施されると、データのヒストグラムは、図9のパート(B)に示すような、オフセット値のところに鋭いピークを持つヒストグラムとなる。本実施形態ではオフセット値として「8」が用いられており、オフセットの結果、値が「16」以上となるデータの頻度はほとんど「0」となっている。   In part (A) of FIG. 9, a histogram of data obtained by performing differential encoding on the CT image data shown in FIG. 8 is shown. The vertical axis represents the appearance frequency. When the differential encoding described with reference to FIGS. 6 and 7 is performed on the CT image data, the data histogram generally has a minimum data value and a maximum data as shown in part (A) of FIG. A histogram with sharp peaks on both data values. When such data is offset, the data histogram becomes a histogram having a sharp peak at the offset value as shown in part (B) of FIG. In the present embodiment, “8” is used as the offset value, and the frequency of data whose value is “16” or more is almost “0” as a result of the offset.

このように差分符号化およびオフセットによってヒストグラムが変形されたデータは、図3のプレーン分割部530によって下位サブプレーンと上位サブプレーンとに分割される。   The data in which the histogram is deformed by differential encoding and offset in this way is divided into a lower subplane and an upper subplane by the plane dividing unit 530 in FIG.

図10は、プレーン分割部530によるデータ分割の効果を説明する図である。   FIG. 10 is a diagram for explaining the effect of data division by the plane division unit 530.

この図10には、図9のパート(B)に示すヒストグラムがデータ値「15」とデータ値「16」との間で切り離されたヒストグラムが示されており、図3のプレーン分割部530によるデータ分割は、まさにこのようなヒストグラムの分割に相当する効果を生じる。すなわち、本実施形態では、データを構成している8ビットの各数値が上位4ビットと下位4ビットとに分割されることで、下位4ビットが表す数値の連続からなる下位サブプレーンと上位4ビットが表す数値の連続からなる上位サブプレーンとが得られる。そして、下位サブプレーンを構成する4ビットの数値が値「0」から値「15」までの各数値をそのまま表現していて、上位サブプレーンを構成する4ビットの数値の場合は、値「16」から値「256」までの、16間隔16種類の数値を表現していると解釈すると、下位サブプレーンのヒストグラムは、この図10の左側に示されたヒストグラムとほぼ同じものとなり、上位サブプレーンのヒストグラムは、図10の右側に示されたヒストグラムとほぼ同じものとなる。ただし、上位サブプレーンのヒストグラムについては、図10の右側に示されたヒストグラムのデータ値「16」のところに、図10の左側に示されたヒストグラムの面積に等しい高さのピークが付加されたものとなる。   FIG. 10 shows a histogram in which the histogram shown in Part (B) of FIG. 9 is separated between the data value “15” and the data value “16”. The plane dividing unit 530 in FIG. Data division produces an effect equivalent to such a histogram division. In other words, in this embodiment, each 8-bit numerical value constituting the data is divided into upper 4 bits and lower 4 bits, so that the lower subplane and the upper 4 An upper subplane consisting of a series of numerical values represented by bits is obtained. Then, the 4-bit numerical value constituting the lower subplane directly represents the numerical values from the value “0” to the value “15”, and in the case of the 4-bit numerical value constituting the upper subplane, the value “16” is used. ”To the value“ 256 ”, the histogram of the lower subplane is substantially the same as the histogram shown on the left side of FIG. Is substantially the same as the histogram shown on the right side of FIG. However, for the histogram of the upper subplane, a peak having a height equal to the area of the histogram shown on the left side of FIG. 10 is added to the data value “16” of the histogram shown on the right side of FIG. It will be a thing.

このような上位サブプレーンは、図3に示すHプレーン圧縮部550を構成するランレングス符号化部551に入力される。   Such higher order subplanes are input to the run length encoding unit 551 constituting the H plane compression unit 550 shown in FIG.

本実施形態では、処理の都合上、ランレングス符号化部551で、上位サブプレーンを構成する連続した4ビットの数値が2つで1つの8ビットの数値として取り扱われ、16進数表示で値「00」から値「FF」までの数値の連続に対して以下の符号化処理が適用される。   In this embodiment, for convenience of processing, the run-length encoding unit 551 treats two consecutive 4-bit numerical values constituting the upper subplane as one 8-bit numerical value, and displays the value “ The following encoding process is applied to a series of numerical values from “00” to the value “FF”.

この符号化処理では、複数の8ビットの数値のうちの特定の数値についてのみ符号化処理が行なわれる。このため、このランレングス符号化部551では、受け取ったデータの中から、符号化処理を行なう数値(ここでは、この数値を「圧縮対象数値」と称する)と、その圧縮対象数値の連続数が検出される。   In this encoding process, the encoding process is performed only for a specific numerical value among a plurality of 8-bit numerical values. For this reason, in the run length encoding unit 551, 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は、図3に示すランレングス符号化部551での符号化の説明図である。   FIG. 11 is an explanatory diagram of encoding in the run-length encoding unit 551 shown in FIG.

図11の上のラインは、上位サブプレーンを構成するデータ、下のラインは、ランレングス符号化部551での符号化処理を行なった後のデータである。   The upper line in FIG. 11 is data constituting the upper subplane, and the lower line is data after the encoding process in the run-length encoding unit 551 is performed.

ここでは、図11の上のラインに示すように、量子化処理部551からは、
「06 02 02 02 01 01 01 01 04 05 00 … 」
なるデータが入力されたものとする。このとき、図3のランレングス符号化部551では、先頭の「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 551,
"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 551 in FIG. 3, the leading “06” is not a compression target value, and the subsequent “02 02 02” is not a compression target value, and is next a compression target 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」であり、さらにそれに続く「XX…」は、1つの「X」が1ビットを表わしており、この「XX…」で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 “XX...” That follows “XY” represents one bit. This “XX...” Represents 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.

図3のプレーン分割部530から入力されてきた上位サブプレーンのデータ(上のライン)を構成する先頭の数値「06」は圧縮対象数値ではないため、その「06」のまま出力される。また、それに続く「02 02 02」も、「02」は圧縮対象数値ではなく、これら3つの「02」もそのまま出力される。次に、圧縮対象数値である「01」が4個連続するため、「01 04」に符号化される。次の「04」及び「05」は圧縮対象数値ではないため、そのまま「04 05」が出力される。   Since the first numerical value “06” constituting the upper subplane data (upper line) input from the plane division unit 530 in FIG. 3 is not a compression target numerical value, it is output as it is. 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は、図3のランレングス符号化部551における、連続数に応じた符号化処理の例を示す図である。
・「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 continuations in the run-length encoding unit 551 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 consecutive, they are encoded into "FF 8F 80" using 3 bytes.

図3に示すランレングス符号化部551では、上記のような符号化処理が行なわれる。   In the run length encoding unit 551 shown in FIG. 3, the above encoding process is performed.

本実施形態によるランレングス符号化部551によれば、最大圧縮率は、3/32895=1/10,965にまで向上する。また、このランレングス符号化部551が符号化処理の対象としている上位サブプレーンのデータは、図10のヒストグラムで説明したように、4ビットの数値のほとんどが、データ値「16」を表現した数値「0」であり、その4ビットの数値から作られる8ビットの数値も、多くが、16進数表示で数値「00」となる。このためランレングス符号化部551における符号化処理によって大幅なデータ圧縮が期待される。   According to the run-length encoding unit 551 according to the present embodiment, the maximum compression rate is improved to 3/32895 = 1 / 10,965. In addition, as described in the histogram of FIG. 10, most of the 4-bit numerical values of the data of the upper subplane that is the target of the encoding process by the run length encoding unit 551 represent the data value “16”. The numerical value is “0”, and many 8-bit numerical values created from the 4-bit numerical value are also “00” in hexadecimal notation. For this reason, significant data compression is expected by the encoding process in the run-length encoding unit 551.

図3のランレングス符号化部551で上記の符号化処理の行なわれた後のデータは、次に図3のHプレーン圧縮部550を構成するデータスキャニング部552とハフマン符号化部553に入力される。   The data after the above-described encoding processing is performed by the run-length encoding unit 551 in FIG. 3 is then input to the data scanning unit 552 and the Huffman encoding unit 553 that constitute the H-plane compression unit 550 in FIG. The

このデータスキャニング部552では、先ず、ランレングス符号化部551から出力されたデータの全体がスキャニングされてデータ値の出現頻度が求められる。   In the data scanning unit 552, first, the entire data output from the run-length encoding unit 551 is scanned to determine the appearance frequency of the data value.

図14は、データスキャニング部552によるスキャニング結果の例を示す図である。   FIG. 14 is a diagram illustrating an example of a scanning result by the data scanning unit 552.

ここでは、「A1」の出現頻度が最も強く、以下順に、「A2」、「A3」、「A4」、…の順であるとする。尚、これら「A1」、「A2」等は数値を直接表わしている訳ではなく、数値を表わす符号である。すなわち、「A1」は例えば数値「00」、「A2」は数値「FF」等である。また、ここでは、簡単のため、図3のランレングス符号化部551から送られてくるデータは全てのデータ値が「A1」〜「A16」の16個の数値のうちのいずれかの数値であるものとする。そして、このような16個の数値それぞれに対して、データスキャニング部552では、出現頻度に応じた符号が割り当てられてハフマンテーブルが作成される。即ち、出現頻度の最も高い「A1」には、2ビットで表わされた符号「00」が割り当てられ、次の「A2」には、やはり2ビットで表わされた符号「01」が割り当てられ、次の「A3」、さらに次の「A4」には、3ビットで表わされる、それぞれ、符号「100」、符号「101」が割り当てられ、次の「A5」〜「A8」には、5ビットで表わされる各符号が割り当てられ、以下同様に、出現頻度が低い数値ほど多くのビット数で表わされた符号が割り当てられる。   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. Further, here, for the sake of simplicity, the data sent from the run-length encoding unit 551 in FIG. 3 is any one of 16 numerical values “A1” to “A16”. It shall be. Then, the data scanning unit 552 assigns a code corresponding to the appearance frequency to each of these 16 numerical values to create a Huffman table. That is, “A1” having the highest appearance frequency is assigned the code “00” represented by 2 bits, and the next “A2” is assigned the code “01” also represented by 2 bits. The next “A3” and the next “A4” are each assigned a code “100” and a code “101” represented by 3 bits, and the next “A5” to “A8” Each code represented by 5 bits is assigned. Similarly, a code represented by a larger number of bits is assigned to a numerical value with a lower appearance frequency.

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

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

図3のHプレーン圧縮部550を構成するハフマン符号化部553では、このようなハフマンテーブルに従ってデータの数値が符号化され、その結果、多くの数値が短かいビット数の符号に置き換えられることとなってデータ圧縮が実現される。   In the Huffman encoding unit 553 constituting the H plane compression unit 550 of FIG. 3, the numerical value of the data is encoded according to such a Huffman table, and as a result, many numerical values are replaced with a code having a short bit number. Thus, data compression is realized.

このように、図3のHプレーン圧縮部550に入力される上位サブプレーンD1Hについては、ランレングス符号化部551による符号化とハフマン符号化部553による符号化が施されることにより高い圧縮率で圧縮されて上位圧縮データD2Hとなる。   As described above, the high-order subplane D1H input to the H plane compression unit 550 in FIG. 3 is encoded by the run length encoding unit 551 and the encoding by the Huffman encoding unit 553, thereby achieving a high compression rate. Is compressed into higher-order compressed data D2H.

図3のLプレーン圧縮部540のハフマン符号化部541では、Hプレーン圧縮部550のランレングス符号化部551と同様に、4ビットの数値の2つ分が1つの8ビットの数値とみなされて処理される。また、このハフマン符号化部541による符号化処理では、固定的なハフマンテーブルが用いられる点を除いて、Hプレーン圧縮部550のハフマン符号化部553による符号化処理と同様な処理が実行される。この結果、下位サブプレーンD1Lは下位圧縮データD2Lとなる。   In the Huffman coding unit 541 of the L-plane compression unit 540 in FIG. 3, two 4-bit numerical values are regarded as one 8-bit numerical value, similarly to the run-length coding unit 551 of the H-plane compression unit 550. Processed. In the encoding process by the Huffman encoding unit 541, the same process as the encoding process by the Huffman encoding unit 553 of the H plane compression unit 550 is executed except that a fixed Huffman table is used. . As a result, the lower subplane D1L becomes the lower compressed data D2L.

以上説明したような各種の処理が図3に示す差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、およびHプレーン圧縮部550で実行されることにより、TRUE画素データは可逆圧縮によって圧縮され、特にCT画像のデータについては大幅な圧縮が実現される。   Various processes as described above are executed by the differential encoding unit 510, the offset unit 520, the plane division unit 530, the L plane compression unit 540, and the H plane compression unit 550 shown in FIG. Is compressed by reversible compression, and in particular, significant compression is realized for CT image data.

一方、上述した間引き処理部505で得られたFAKE画素データについては、図3に示すFAKE画素圧縮部560に入力されて非可逆圧縮が施される。   On the other hand, the FAKE pixel data obtained by the thinning processing unit 505 described above is input to the FAKE pixel compression unit 560 shown in FIG. 3 and subjected to irreversible compression.

このFAKE画素圧縮部560に入力されたFAKE画素データは、ビット短縮部561に渡され、ビット短縮部561では、まず、FAKE画素データを構成する各FAKE画素の画素値について、元の画像データ上でそのFAKE画素を挟んでいる2つのTRUE画素の画素値が求められ、FAKE画素の画素値がこれらのTRUE画素の画素値と比較される。ここで、図6に示す各FAKE画素は、TRUE画素との位置関係で3系統に区分される。すなわち、TRUE画素の画素値をTn_kと表現した場合にFAKE画素の画素値はFn_k+1,Fn+1_k,Fn+1_k+1という3種類に表現される。このような3種類のFAKE画素のうち、画素値がFn_k+1と表現されるFAKE画素の画素値については、そのFAKE画素を主走査方向に挟む2つのTRUE画素の画素値Tn_k,Tn_k+2と比較される。また、画素値がFn+1_kと表現されるFAKE画素の画素値については、そのFAKE画素を副走査方向に挟む2つのTRUE画素の画素値Tn_k,Tn+2_kと比較される。更に、画素値がFn+1_k+1と表現されるFAKE画素の画素値については、そのFAKE画素を斜め方向に挟む2つのTRUE画素の画素値Tn_k,Tn+2_k+2と比較される。 The FAKE pixel data input to the FAKE pixel compression unit 560 is transferred to the bit shortening unit 561. First, the bit shortening unit 561 first adds the pixel value of each FAKE pixel constituting the FAKE pixel data to the original image data. The pixel values of the two TRUE pixels sandwiching the FAKE pixel are obtained, and the pixel values of the FAKE pixel are compared with the pixel values of these TRUE pixels. Here, each FAKE pixel shown in FIG. 6 is divided into three systems according to the positional relationship with the TRUE pixel. That is, the pixel value of the FAKE pixel is represented in three of F n _ k + 1, F n + 1 _ k, F n + 1 _ k + 1 if the pixel value of TRUE pixels is expressed as T n_k . Among these three types of FAKE pixels, regarding the pixel value of the FAKE pixel whose pixel value is expressed as F n_k + 1 , the pixel values T n_k and T of two TRUE pixels sandwiching the FAKE pixel in the main scanning direction. Compared with n_k + 2 . The pixel value for a pixel value of FAKE pixels is expressed as F n + 1_k, compared the FAKE pixel pixel value T n_k two TRUE pixels bounding the sub-scanning direction, and T n + 2_k. Further, the pixel value of the FAKE pixel whose pixel value is expressed as F n + 1_k + 1 is compared with the pixel values T n_k and T n + 2_k + 2 of two TRUE pixels sandwiching the FAKE pixel in an oblique direction. The

ビット短縮部591では、次に、比較結果に応じて、FAKE画素の画素値を1ビットの符号「0」または「1」から始まる4ビットの符号に符号化する。   Next, the bit shortening unit 591 encodes the pixel value of the FAKE pixel into a 4-bit code starting from a 1-bit code “0” or “1” according to the comparison result.

図16は、ビット短縮部における符号化の概念を示す図である。   FIG. 16 is a diagram illustrating the concept of encoding in the bit shortening unit.

ここでは、上述した3種類のFAKE画素のうち、画素値がFn+1_kと表現されるFAKE画素を代表として説明する。このFAKE画素の画素値Fn+1_kが、2つのTRUE画素の画素値Tn_k,Tn+2_kの間のレギュラーFAKE画素ゾーンに存在している場合には、レギュラーFAKE画素ゾーンに存在していることを表した1ビットの符号「0」に符号化される。また、8ビットで表現可能な0〜255の数値範囲のうちレギュラーFAKE画素ゾーンを除いた残りのイレギュラーFAKE画素ゾーンにFAKE画素の画素値Fn+1_kが存在している場合には、その画素値は、以下説明するように、「1」で始まる4ビットの符号に符号化される。 Here, among the above-described three types of FAKE pixels, a FAKE pixel whose pixel value is expressed as F n + 1 — k will be described as a representative. When the pixel value F n + 1_k of the FAKE pixel is present in the regular FAKE pixel zone between the pixel values T n_k and T n + 2_k of the two TRUE pixels, the pixel value F n + 1_k is present in the regular FAKE pixel zone. It is encoded into a 1-bit code “0” indicating that it is present. Further, when the pixel value F n + 1_k of the FAKE pixel exists in the remaining irregular FAKE pixel zone excluding the regular FAKE pixel zone in the numerical range of 0 to 255 that can be expressed by 8 bits, The pixel value is encoded into a 4-bit code starting with “1” as described below.

図17は、4ビットの符号への第1の符号化方式を表す図である。   FIG. 17 is a diagram illustrating a first encoding method into a 4-bit code.

この第1の符号化方式では、FAKE画素の画素値Fn_k+1は、その画素値Fn_k+1を表した8ビットのビット値の下位5桁が切り捨てられ、残った上位3桁の先頭に「1」が付加されることで「1000」〜「1111」の符号に符号化される。従って、この図の表に示すように、符号化前の「0」〜「255」の数値のうち「0」〜「31」の数値は「1000」に符号化され、「22」〜「63」の数値は「1001」に符号化される。以下同様に、「64」〜「95」、「96」〜「127」、「128」〜「159」、「160」〜「191」、「192」〜「223」、「224」〜「255」の数値は、それぞれ、「1010」、「1011」、「1100」、「1101」、「1110」、「1111」に符号化される。このような第1の符号化方式は、ビット値の桁の切り捨てというごく単純な処理で実現される。 In this first encoding method, the lower five digits of the 8-bit bit value representing the pixel value F n_k + 1 are truncated in the pixel value F n_k + 1 of the FAKE pixel, and the remaining upper three digits start. When “1” is added to, the codes are encoded into codes “1000” to “1111”. Therefore, as shown in the table of this figure, among the values “0” to “255” before encoding, the values “0” to “31” are encoded to “1000”, and “22” to “63”. "Is encoded as" 1001 ". Similarly, “64” to “95”, “96” to “127”, “128” to “159”, “160” to “191”, “192” to “223”, “224” to “255”. Are encoded into “1010”, “1011”, “1100”, “1101”, “1110”, and “1111”, respectively. Such a first encoding method is realized by a very simple process of truncating the digit of the bit value.

図3のビット短縮部561におけるこのような符号化によって、FAKE画素の8ビットの画素値は1ビットまたは4ビットに短縮化される。また、CT画像の場合には、隣接画素間の相関が高いので、多くのFAKE画素について画素値がレギュラーFAKE画素ゾーンに存在し、大幅な圧縮が可能であると考えられる。   By such encoding in the bit shortening unit 561 in FIG. 3, the 8-bit pixel value of the FAKE pixel is shortened to 1 bit or 4 bits. In the case of a CT image, since the correlation between adjacent pixels is high, pixel values for many FAKE pixels exist in the regular FAKE pixel zone, and it is considered that significant compression is possible.

なお、本実施形態では、この4ビット符号への符号化に際し、上述した第1の符号化方式が用いられているが、本発明にいうビット短縮部では、以下説明する第2の符号化方式が採用されてもよい。   In the present embodiment, the first encoding method described above is used for the encoding to the 4-bit code, but the bit shortening unit according to the present invention uses the second encoding method described below. May be adopted.

図18は、4ビットの符号への第2の符号化方式を表す図である。   FIG. 18 is a diagram illustrating a second encoding method into a 4-bit code.

この第2の符号化方式では、上述したイレギュラーFAKE画素ゾーンの数値範囲を8ステップに分割し、上述した8個の4ビット符号に割り振って符号化する。例えば、レギュラーFAKE画素ゾーンが「36」〜「128」であったとすると、
{255−(128−36)}/8=20.37,INT(20.38)=20
という計算式から、ステップサイズが20となり、この図18に示すように、「0」〜「20」の数値は「1000」に符号化され、「21」〜「36」の数値は「1001」に符号化される。また、「128」〜「128+20」の数値は「1010」に符号化され、以下同様に、「128+21」〜「128+40」、「128+41」〜「128+60」、「128+61」〜「128+80」、「128+81」〜「128+100」、「128+101」〜「255」の数値は、それぞれ、「1011」、「1100」、「1101」、「1110」、「1111」に符号化される。このような第2の符号化方式では、必要な数値範囲に絞った符号化となるので精度が高い。
In the second encoding method, the numerical range of the irregular FAKE pixel zone described above is divided into eight steps, and the above four 4-bit codes are allocated and encoded. For example, if the regular FAKE pixel zone is “36” to “128”,
{255- (128-36)} / 8 = 20.37, INT (20.38) = 20
As shown in FIG. 18, the numerical value of “0” to “20” is encoded as “1000” and the numerical values of “21” to “36” are “1001”. Is encoded. The numerical values “128” to “128 + 20” are encoded to “1010”, and similarly “128 + 21” to “128 + 40”, “128 + 41” to “128 + 60”, “128 + 61” to “128 + 80”, “128 + 81”. ”To“ 128 + 100 ”and“ 128 + 101 ”to“ 255 ”are encoded as“ 1011 ”,“ 1100 ”,“ 1101 ”,“ 1110 ”, and“ 1111 ”, respectively. Such a second encoding method is highly accurate because encoding is limited to a necessary numerical range.

図3のビット短縮部561で符号化されたデータは1ビットの符号と4ビットの符号が混在したものであるが、その後の処理のために8ビット単位に区切られ(バイトパッキング)、図3のランレングス符号化部562およびハフマン符号化部563によって、上記Hプレーン圧縮部550における処理と全く同様の処理が実行される。ここで、ハフマン符号化部563は、上述したデータスキャニング部552とハフマン符号化部553との双方の役割を兼ねている。   The data encoded by the bit shortening unit 561 in FIG. 3 is a mixture of 1-bit code and 4-bit code, but is divided into 8-bit units (byte packing) for subsequent processing, and FIG. The run-length encoding unit 562 and the Huffman encoding unit 563 perform processing exactly the same as the processing in the H-plane compression unit 550. Here, the Huffman coding unit 563 also serves as both the data scanning unit 552 and the Huffman coding unit 553 described above.

CT画像の場合は、ビット短縮部561の符号化によって多くの画素値が「0」に符号化されているので、その後、ランレングス符号化部562で更に大幅に圧縮されると期待される。   In the case of a CT image, since many pixel values are encoded to “0” by the encoding of the bit shortening unit 561, it is expected that the run length encoding unit 562 will further compress the pixel value after that.

なお、上記説明では、本発明の実施形態としてのデータ圧縮がCT画像のデータのみに施される例が示されているが、本発明のデータ圧縮装置は、CT画像とLW画像との双方のデータに対してデータ圧縮を施すものであってもよく、さらには、画像以外の情報を表したデータに対してデータ圧縮を施すものであってもよい。   In the above description, an example in which data compression as an embodiment of the present invention is performed only on CT image data is shown. However, the data compression apparatus of the present invention is compatible with both CT images and LW images. Data compression may be performed on data, and further data compression may be performed on data representing information other than images.

また、上記説明では、本発明にいう差分生成部の一例として、副走査方向の差分を求めるものが示されているが、本発明にいう差分生成部は、主走査方向の差分を求めるものであってもよい。また、上記説明では、本発明にいう差分生成部の一例として、いわば1次元的な差分演算を用いて差分を求めるものが示されているが、本発明にいう差分生成部は、画像の縦横双方の差分を複合したいわば2次元的な差分演算を用いて差分を求めるものであってもよい。   Further, in the above description, as an example of the difference generation unit referred to in the present invention, the one that calculates the difference in the sub-scanning direction is shown, but the difference generation unit referred to in the present invention calculates the difference in the main scanning direction. There may be. Further, in the above description, as an example of the difference generation unit according to the present invention, the one for obtaining the difference by using a one-dimensional difference calculation is shown, but the difference generation unit according to the present invention is a vertical and horizontal image. In other words, the difference between the two may be calculated by using a two-dimensional difference calculation.

データ圧縮技術が適用されたプリントシステムの一例を示す図である。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 the image compression apparatus corresponded to one Embodiment of the data 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 equivalent to one Embodiment of the data compression program of this invention. 図3のデータ圧縮装置に入力される入力画像ファイル中の画像データのデータ構造および間引き処理の概念を示す図である。It is a figure which shows the data structure of the image data in the input image file input into the data compression apparatus of FIG. 3, and the concept of a thinning process. 図3のデータ圧縮装置を構成する差分符号化部における差分符号化処理を例示して示す図である。It is a figure which illustrates and illustrates the differential encoding process in the differential encoding part which comprises the data compression apparatus of FIG. CTの画像データの例を示す図である。It is a figure which shows the example of the image data of CT. CTの画像データに対する差分符号化およびオフセットの効果を示す図である。It is a figure which shows the effect of the differential encoding and offset with respect to the image data of CT. プレーン分割部によるデータ分割の効果を説明する図である。It is a figure explaining the effect of the data division by a plane division part. 図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. 図3のランレングス符号化部における、連続数に応じた符号化処理の例を示す図である。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. データスキャニング部によるスキャニング結果の例を示す図である。It is a figure which shows the example of the scanning result by a data scanning part. ハフマンテーブルの一例を示す図である。It is a figure which shows an example of a Huffman table. ビット短縮部における符号化の概念を示す図である。It is a figure which shows the concept of the encoding in a bit shortening part. 4ビットの符号への第1の符号化方式を表す図である。It is a figure showing the 1st encoding system to a 4-bit code | symbol. 4ビットの符号への第2の符号化方式を表す図である。It is a figure showing the 2nd encoding system to a 4-bit code.

符号の説明Explanation of symbols

11 画像のデータ
12A,12B,13A,13B ビットマップデータ
14 非可逆の圧縮データ
15 可逆の圧縮データ
100 ホストコントローラ
140 CDROM
150 汎用インターフェースケーブル
200 インターフェース機器
250 専用インターフェースケーブル
300 プリンタ
500 画像圧縮装置
505 間引き処理部
510 差分符号化部
520 オフセット部
530 プレーン分割部
540 Lプレーン圧縮部
541 ハフマン符号化部
542 モード切換部
550 Hプレーン圧縮部
551 ランレングス符号化部
552 データスキャニング部
553 ハフマン符号化部
560 FAKE画素圧縮部
561 ビット短縮部
562 ランレングス符号化部
563 ハフマン符号化部
600 画像圧縮プログラム
605 間引き処理部
610 差分符号化部
620 オフセット部
630 プレーン分割部
640 Lプレーン圧縮部
650 Hプレーン圧縮部
660 FAKE画素圧縮部
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 505 Thinning process part 510 Differential encoding part 520 Offset part 530 Plane division part 540 L plane compression part 541 Huffman encoding part 542 Mode switching part 550 H plane Compression unit 551 Run length coding unit 552 Data scanning unit 553 Huffman coding unit 560 FAKE pixel compression unit 561 Bit shortening unit 562 Run length coding unit 563 Huffman coding unit 600 Image compression program 605 Thinning processing unit 610 Difference coding unit 620 Offset unit 630 Plane division unit 640 L plane compression unit 650 H plane compression unit 660 FAKE pixel compression unit

Claims (13)

所定の単位ビット数で表わされる数値の連続からなる被圧縮データにデータ圧縮処理を施すデータ圧縮装置において、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで該被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第2の被圧縮データとを作成する間引き処理部と、
前記間引き処理部で作成された第1の被圧縮データに可逆圧縮処理を施す可逆圧縮部と、
前記間引き処理部で作成された第2の被圧縮データに非可逆圧縮処理を施す非可逆圧縮部とを備えたことを特徴とするデータ圧縮装置。
In a data compression apparatus that performs data compression processing on data to be compressed consisting of a series of numerical values represented by a predetermined number of unit bits,
By periodically decimating a numerical value from a series of numerical values constituting the compressed data, the first compressed data consisting of a series of numerical values extracted from the compressed data by the thinning and a continuation of the remaining numerical values A decimation processing unit for creating second compressed data;
A lossless compression unit that performs a lossless compression process on the first data to be compressed created by the thinning processing unit;
A data compression apparatus comprising: an irreversible compression unit that performs irreversible compression processing on the second compressed data created by the thinning processing unit.
前記非可逆圧縮部が、
前記間引き処理部で作成された第2の被圧縮データを構成する数値について、前記間引き処理部の間引きによってその数値の前後それぞれで間引かれた各数値の間の値を有するものか否かを判定し、間の値を有する場合には、間の値であることを表す符号を出力し、間の値でない場合には、その数値を前記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであることを特徴とする請求項1記載のデータ圧縮装置。
The lossy compression unit is
Whether or not the numerical value constituting the second compressed data created by the thinning processing unit has a value between the numerical values thinned out before and after the numerical value by thinning out the thinning processing unit. If there is an intermediate value, a sign indicating that it is an intermediate value is output, and if it is not an intermediate value, the numerical value is re-expressed with a smaller number of bits than the unit bit number. 2. The data compression apparatus according to claim 1, wherein the numerical value is output.
前記非可逆圧縮部が、数値を前記少ビット数で表現し直すに当たり、前記単位ビット数のビット値の下位桁を切り捨てるものであることを特徴とする請求項2記載のデータ圧縮装置。   3. The data compression apparatus according to claim 2, wherein the lossy compression unit truncates a lower digit of the bit value of the unit bit number when re-expressing a numerical value with the small number of bits. 前記非可逆圧縮部が、数値を前記少ビット数で表現し直すに当たり、その単位ビット数で表現される数値範囲のうち、前記各所定場所から間引かれた数値の数値幅を除く残りの数値範囲を、該少ビット数に割り振って表現し直すものであることを特徴とする請求項2記載のデータ圧縮装置。   When the irreversible compression unit re-expresses the numerical value with the small number of bits, the remaining numerical value excluding the numerical value width of the numerical value thinned out from each predetermined place in the numerical range expressed with the unit bit number 3. A data compression apparatus according to claim 2, wherein the range is re-expressed by allocating the range to the small number of bits. 前記可逆圧縮部が、
前記間引き処理部で作成された第1の被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることにより該差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
前記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
前記オフセット部によって数値がオフセットされた被圧縮データの各数値を、前記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、該被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
前記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
前記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであることを特徴とする請求項1記載のデータ圧縮装置。
The lossless compression unit is
Difference generation for generating new compressed data composed of a series of numerical values representing the difference by obtaining a difference between adjacent numerical values for a series of numerical values constituting the first compressed data generated by the thinning processing unit And
An offset unit for offsetting each numerical value constituting the new compressed data generated by the difference generation unit by a predetermined value;
By dividing each numerical value of the compressed data whose numerical value is offset by the offset unit into an upper bit part and a lower bit part at a predetermined number of divided bits smaller than the unit bit number, the compressed data is A dividing unit that divides the upper data consisting of a continuation of the upper bit part in each numerical value and the lower data consisting of a continuation of the lower bit part of each numerical value;
An upper data compression unit that performs a lossless compression process on the upper data divided by the dividing unit;
The data compression apparatus according to claim 1, further comprising: a lower data compression unit that performs a lossless compression process on the lower data divided by the division unit.
前記上位データ圧縮部が、上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部を備えたものであることを特徴とする請求項5記載のデータ圧縮装置。   The upper data compression unit outputs the numerical value excluding one or a plurality of predetermined compression target numerical values in the upper data as it is, and the compression target numerical value is the same as the compression target numerical value and the compression target numerical value. 6. The data compression apparatus according to claim 5, further comprising a first encoding unit that encodes and outputs a numerical value representing a continuous number of numerical values to be compressed. 前記上位データ圧縮部が、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
符号と数値を対応づけるテーブルを用いて、前記第1の符号化部で符号化された後のデータにエントロピー符号化を施す第2の符号化部を備えたものであることを特徴とする請求項5記載のデータ圧縮装置。
The upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target numerical values is output as it is, and for the compression target numerical value, the compression target numerical value and the number of consecutive compression target numerical values that are the same as the compression target numerical value are set. A first encoding unit that encodes and outputs a numerical value to be represented;
A second encoding unit that performs entropy encoding on data after being encoded by the first encoding unit using a table that associates codes and numerical values is provided. Item 6. The data compression device according to Item 5.
前記上位データ圧縮部が、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
ハフマンテーブルを用いて、前記第1の符号化部で符号化された後のデータにハフマン符号化を施す第2の符号化部を備えたものであることを特徴とする請求項5記載のデータ圧縮装置。
The upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target numerical values is output as it is, and for the compression target numerical value, the compression target numerical value and the number of consecutive compression target numerical values that are the same as the compression target numerical value are set. A first encoding unit that encodes and outputs a numerical value to be represented;
6. The data according to claim 5, further comprising a second encoding unit that performs Huffman encoding on the data after being encoded by the first encoding unit using a Huffman table. Compression device.
前記上位データ圧縮部が、
上位データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する第1の符号化部と、
前記第1のデータ圧縮部で符号化された後のデータ中に出現する数値のヒストグラムを求めるヒストグラム算出部と、
前記ヒストグラム算出部で求められたヒストグラムに基づき、符号と数値を対応づけるテーブルに、出現頻度の高い数値ほど符号長の短かい符号を割り当てる符号割当部と、
前記符号割当部で符号が割り当てられたテーブルを用いて、前記第1の符号化部で符号化された後のデータにエントロピー符号化を施す第2の符号化部を備えたものであることを特徴とする請求項5記載のデータ圧縮装置。
The upper data compression unit is
In the upper data, the numerical value excluding one or a plurality of predetermined compression target numerical values is output as it is, and for the compression target numerical value, the compression target numerical value and the number of consecutive compression target numerical values that are the same as the compression target numerical value are set. A first encoding unit that encodes and outputs a numerical value to be represented;
A histogram calculation unit for obtaining a histogram of numerical values appearing in the data after being encoded by the first data compression unit;
Based on the histogram obtained by the histogram calculation unit, a code allocating unit that allocates a code having a shorter code length to a table that associates codes and numerical values with a higher appearance frequency,
Using a table in which codes are allocated by the code allocation unit, and a second encoding unit that performs entropy encoding on the data encoded by the first encoding unit. 6. The data compression apparatus according to claim 5, wherein
前記下位データ圧縮部が、符号と数値を対応づけるテーブルを用いて下位データにエントロピー符号化を施すものであることを特徴とする請求項5記載のデータ圧縮装置。   6. The data compression apparatus according to claim 5, wherein the lower data compression unit performs entropy coding on the lower data using a table associating codes with numerical values. 前記下位データ圧縮部が、ハフマンテーブルを用いて下位データにハフマン符号化を施すものであることを特徴とする請求項5記載のデータ圧縮装置。   6. The data compression apparatus according to claim 5, wherein the lower data compression unit performs Huffman coding on the lower data using a Huffman table. 前記下位データ圧縮部が、圧縮省略の指示を受けて下位データを無圧縮で出力するものであることを特徴とする請求項5記載のデータ圧縮装置。   6. The data compression apparatus according to claim 5, wherein the lower data compression unit outputs the lower data without compression in response to an instruction to omit compression. プログラムを実行する情報処理装置内に組み込まれて該情報処理装置に、所定の単位ビット数で表わされる数値の連続からなる被圧縮データに対するデータ圧縮処理を実行させるデータ圧縮プログラムにおいて、
前記情報処理装置上に、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで該被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第2の被圧縮データとを作成する間引き処理部と、
前記間引き処理部で作成された第1の被圧縮データに可逆圧縮処理を施す可逆圧縮部と、
前記間引き処理部で作成された第2の被圧縮データに非可逆圧縮処理を施す非可逆圧縮部とを構築することを特徴とするデータ圧縮プログラム。
In a data compression program that is incorporated in an information processing apparatus that executes a program and causes the information processing apparatus to execute data compression processing on data to be compressed consisting of a series of numerical values represented by a predetermined number of unit bits.
On the information processing apparatus,
By periodically decimating a numerical value from a series of numerical values constituting the compressed data, the first compressed data consisting of a series of numerical values extracted from the compressed data by the thinning and a continuation of the remaining numerical values A decimation processing unit for creating second compressed data;
A lossless compression unit that performs a lossless compression process on the first data to be compressed created by the thinning processing unit;
A data compression program for constructing an irreversible compression unit that performs irreversible compression processing on the second compressed data created by the thinning processing unit.
JP2005174772A 2005-06-15 2005-06-15 Data compression apparatus and data compression program Active JP4181147B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005174772A JP4181147B2 (en) 2005-06-15 2005-06-15 Data compression apparatus and data compression program
US11/453,172 US7826670B2 (en) 2005-06-15 2006-06-15 Data compression apparatus and data compression program storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005174772A JP4181147B2 (en) 2005-06-15 2005-06-15 Data compression apparatus and data compression program

Publications (3)

Publication Number Publication Date
JP2006352417A true JP2006352417A (en) 2006-12-28
JP2006352417A5 JP2006352417A5 (en) 2008-05-22
JP4181147B2 JP4181147B2 (en) 2008-11-12

Family

ID=37647789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005174772A Active JP4181147B2 (en) 2005-06-15 2005-06-15 Data compression apparatus and data compression program

Country Status (1)

Country Link
JP (1) JP4181147B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019008A (en) * 2009-07-07 2011-01-27 Fujifilm Corp Device, program and method for compressing/transmitting moving image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019008A (en) * 2009-07-07 2011-01-27 Fujifilm Corp Device, program and method for compressing/transmitting moving image

Also Published As

Publication number Publication date
JP4181147B2 (en) 2008-11-12

Similar Documents

Publication Publication Date Title
JP4689545B2 (en) Data compression apparatus and data compression program
US7826670B2 (en) Data compression apparatus and data compression program storage medium
US7183950B2 (en) Data compression apparatus, and data compression program storage medium
JP2006121645A (en) Image compression apparatus and image compression program
JP3461309B2 (en) Huffman coded data compression device
JP3278298B2 (en) Bitmap data compression method and compression apparatus
JP4633576B2 (en) Data compression apparatus and data compression program
JP2008311792A (en) Device for encoding image and control method therefor
JP4173498B2 (en) Data compression apparatus and data compression program
JP4173505B2 (en) Data compression apparatus and data compression program
JP4181147B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4377351B2 (en) Data compression apparatus and data compression program
JP4131969B2 (en) Data compression apparatus and data compression program
JP2008035230A (en) Data compression apparatus and data compression program
JP4741317B2 (en) Data compression apparatus and data compression program
JP4131970B2 (en) Data compression apparatus and data compression program
JP2005277932A (en) Device and program for compressing data
JP4435586B2 (en) Data compression apparatus and data compression program
JP4633577B2 (en) Data compression apparatus and data compression program
JP4377352B2 (en) Data compression apparatus and data compression program
JP4699307B2 (en) Data compression apparatus and data compression program
JP2005252531A (en) Device and program for compressing data
JP2005260408A (en) Data compression apparatus and data compression program
JP4579793B2 (en) Data compression apparatus and data compression program

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061215

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080403

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20080403

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20080421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080603

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080801

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080826

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080828

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4181147

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110905

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120905

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130905

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250