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

Data compression apparatus and data compression program Download PDF

Info

Publication number
JP2006352548A
JP2006352548A JP2005176447A JP2005176447A JP2006352548A JP 2006352548 A JP2006352548 A JP 2006352548A JP 2005176447 A JP2005176447 A JP 2005176447A JP 2005176447 A JP2005176447 A JP 2005176447A JP 2006352548 A JP2006352548 A JP 2006352548A
Authority
JP
Japan
Prior art keywords
data
compression
unit
compressed
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005176447A
Other languages
Japanese (ja)
Other versions
JP4629512B2 (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 JP2005176447A priority Critical patent/JP4629512B2/en
Priority to US11/453,172 priority patent/US7826670B2/en
Publication of JP2006352548A publication Critical patent/JP2006352548A/en
Application granted granted Critical
Publication of JP4629512B2 publication Critical patent/JP4629512B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data compression apparatus for carrying out novel and preferable compression processing capable of compressing CT data and LW data without distinguishing them. <P>SOLUTION: The data compression apparatus includes: a first lossless compression processing section for applying first lossless compression processing suitable for compression to be applied to one of the CT data and the WL data to data to be compressed; a second reversible compression processing section for applying second lossless compression processing suitable for compression to be applied to the other of the CT data and the WL data to the data to be compressed when the result of data compression by the first lossless compression processing section dose not reach a prescribed target compression rate; and an lossy compression processing section that applies lossy compression processing to the data to be compressed when the result of data compression by the second lossless compression processing section dose not reach the target compression rate. <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.

また、JPEG等は非可逆な圧縮処理であるため画質の劣化を必然的に伴うが、近年、高画質化への要求がますます高まってきており、CTデータについても画質の劣化を招かないよう可逆圧縮を行うことが検討されてきている。   In addition, JPEG and the like are irreversible compression processes, and therefore there is a inevitably deterioration in image quality. However, in recent years, there has been an increasing demand for higher image quality, and CT data will not deteriorate. It has been studied to perform lossless compression.

本発明は上記事情に鑑み、CTデータとLWデータとを区別せずに圧縮することができる新たな好ましい圧縮処理を行うデータ圧縮装置およびデータ圧縮プログラムを提供することを目的とする。   In view of the above circumstances, an object of the present invention is to provide a data compression apparatus and a data compression program that perform a new preferable compression process that can compress CT data and LW data without distinguishing them.

上記目的を達成する本発明のデータ圧縮装置は、
所定の単位ビット数で表わされる数値の連続からなる被圧縮データにデータ圧縮処理を施すデータ圧縮装置において、
上記被圧縮データに第1の可逆圧縮処理を施す第1の可逆圧縮処理部と、
上記第1の可逆圧縮処理部によるデータ圧縮の結果が所定の目標圧縮率に達しない場合に、上記被圧縮データに第2の可逆圧縮処理を施す第2の可逆圧縮処理部と、
上記第2の可逆圧縮処理部によるデータ圧縮の結果が上記目標圧縮率に達しない場合に、上記被圧縮データに非可逆圧縮処理を施す非可逆圧縮処理部とを備え、
上記第1の可逆圧縮処理部および上記第2の可逆圧縮処理部のうちの一方が、
上記被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
上記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
上記オフセット部によって数値がオフセットされた被圧縮データの各数値を、上記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、その被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
上記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
上記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであり、
上記第1の可逆圧縮処理部および上記第2の可逆圧縮処理部のうちの上記一方に対する他方が、
大本の被圧縮データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであり、
上記非可逆圧縮処理部が、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第1の被圧縮データとを作成する間引き処理部と、
上記間引き処理部で作成された第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,
A first lossless compression processor that performs a first lossless compression process on the data to be compressed;
A second lossless compression processing unit that applies a second lossless compression process to the data to be compressed when a result of data compression by the first lossless compression processing unit does not reach a predetermined target compression rate;
An irreversible compression processing unit that performs irreversible compression processing on the data to be compressed when a result of data compression by the second lossless compression processing unit does not reach the target compression rate;
One of the first lossless compression processor and the second lossless compression processor is
A difference generating unit 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 compressed data;
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;
A lower data compression unit that performs a lossless compression process on the lower data divided by the dividing unit,
The other of the first lossless compression processing unit and the second lossless compression processing unit with respect to the one is
In the large data to be compressed, numerical values other than one or a plurality of predetermined compression target values are output as they are, and for the compression target numerical values, the compression target numerical value and the same compression target numerical value as the compression target numerical value are output. A lossless compression process including an encoding process for encoding and outputting a numerical value representing the continuous number of
The lossy compression processing unit is
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 one 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次元画像データが1次元ストリーム状のデータとして扱われている場合であれば、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. Further, “difference between adjacent numerical values” means not only a one-dimensional difference but also a multi-dimensional difference of two or more dimensions. The same applies to the following.

この本発明のデータ圧縮装置は、
上記非可逆圧縮処理部の前記可逆圧縮部が、上記第1の可逆圧縮処理部および上記第2の可逆圧縮処理部のうちの上記一方における可逆圧縮処理と同等の可逆圧縮処理を上記第1の被圧縮データに施すものであることが好ましい。
This data compression apparatus of the present invention is
The reversible compression unit of the irreversible compression processing unit performs a reversible compression process equivalent to the reversible compression process in the one of the first reversible compression process unit and the second reversible compression process unit in the first It is preferable to apply it to the data to be compressed.

また、本発明のデータ圧縮装置は、
上記非可逆圧縮処理部の上記非可逆圧縮部が、
上記間引き処理部で作成された第2の被圧縮データを構成する数値について、上記間引き処理部の間引きによってその数値の前後それぞれで間引かれた各数値の間の値を有するものか否かを判定し、間の値を有する場合には、間の値であることを表す符号を出力し、間の値でない場合には、その数値を上記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであるという形態であってもよいし、あるいは、
上記被圧縮データが、上記単位ビット数で表わされる数値の連続で2次元的な画像を表したものであり、
上記非可逆圧縮処理部が、上記画像中のエッジ部分を判定する判定部を備えたものであり、
上記非可逆圧縮処理部の上記非可逆圧縮部が、上記間引き処理部で作成された第2の被圧縮データを構成する数値について、上記判定部で判定されたエッジ部分でない場合には、上記単位ビット数よりも少ないビット数の所定符号を出力し、エッジ部分である場合には、その数値を上記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであるという形態であってもよい。
The data compression apparatus of the present invention
The irreversible compression unit of the irreversible compression processing 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 intervening value, a sign indicating that it is an intervening value is output. If not, the numerical value is re-expressed with a smaller number of bits than the unit bit number. It may be in a form that outputs a numerical value that has been
The compressed data represents a continuous two-dimensional image of the numerical value represented by the number of unit bits,
The lossy compression processing unit includes a determination unit that determines an edge portion in the image,
When the irreversible compression unit of the irreversible compression processing unit is not the edge portion determined by the determination unit with respect to the numerical value constituting the second compressed data created by the thinning processing unit, the unit In a form that outputs a predetermined code having a bit number smaller than the number of bits and outputs a numerical value obtained by re-expressing the numerical value with a smaller number of bits smaller than the unit bit number in the case of an edge portion. There may be.

ここで、上記所定符号には、0ビットの符号(即ち実質的には何も出力しない状態)も含まれる。このように0ビットの符号が用いられる場合に対する復号化は、例えば次のような手順で行われる。即ち、復号化されたTRUE画素に基づいてエッジ部分であるか否かを確認し、エッジ部分である場合には上記少ビット数の数値からFAKE画素を復号化し、エッジ部分でない場合にはTRUE画素を用いた補間処理によりFAKE画素を生成する。   Here, the predetermined code includes a 0-bit code (that is, a state in which substantially nothing is output). Decoding for the case where a 0-bit code is used in this way is performed, for example, in the following procedure. That is, based on the decoded TRUE pixel, it is confirmed whether or not it is an edge portion. If it is an edge portion, the FAKE pixel is decoded from the numerical value of the small number of bits. FAKE pixels are generated by interpolation processing using.

上記目的を達成する本発明のデータ圧縮プログラムは、
プログラムを実行する情報処理装置内に組み込まれて該情報処理装置に、所定の単位ビット数で表わされる数値の連続からなる被圧縮データに対するデータ圧縮処理を実行させるデータ圧縮プログラムにおいて、
上記情報処理装置上に、
上記被圧縮データに第1の可逆圧縮処理を施す第1の可逆圧縮処理部と、
上記第1の可逆圧縮処理部によるデータ圧縮の結果が所定の目標圧縮率に達しない場合に、上記被圧縮データに第2の可逆圧縮処理を施す第2の可逆圧縮処理部と、
上記第2の可逆圧縮処理部によるデータ圧縮の結果が上記目標圧縮率に達しない場合に、上記被圧縮データに非可逆圧縮処理を施す非可逆圧縮処理部とを構築し、
上記第1の可逆圧縮処理部および上記第2の可逆圧縮処理部のうちの一方が、
上記被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
上記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
上記オフセット部によって数値がオフセットされた被圧縮データの各数値を、上記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、その被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
上記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
上記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであり、
上記第1の可逆圧縮処理部および上記第2の可逆圧縮処理部のうちの上記一方に対する他方が、
大本の被圧縮データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、その圧縮対象数値と、その圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであり、
上記非可逆圧縮処理部が、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第1の被圧縮データとを作成する間引き処理部と、
上記間引き処理部で作成された第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,
A first lossless compression processor that performs a first lossless compression process on the data to be compressed;
A second lossless compression processing unit that applies a second lossless compression process to the data to be compressed when a result of data compression by the first lossless compression processing unit does not reach a predetermined target compression rate;
When the result of data compression by the second lossless compression processing unit does not reach the target compression rate, a lossy compression processing unit that performs lossy compression processing on the compressed data is constructed,
One of the first lossless compression processor and the second lossless compression processor is
A difference generating unit 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 compressed data;
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;
A lower data compression unit that performs a lossless compression process on the lower data divided by the dividing unit,
The other of the first lossless compression processing unit and the second lossless compression processing unit with respect to the one is
In the large data to be compressed, numerical values other than one or a plurality of predetermined compression target values are output as they are, and for the compression target numerical values, the compression target numerical value and the same compression target numerical value as the compression target numerical value are output. A lossless compression process including an encoding process for encoding and outputting a numerical value representing the continuous number of
The lossy compression processing unit is
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 one 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.

なお、本発明にいうデータ圧縮プログラムについては、ここではその基本形態のみを示すのにとどめるが、これは単に重複を避けるためであり、本発明にいうデータ圧縮プログラムには、上記の基本形態のみではなく、前述したデータ圧縮装置の各形態に対応する各種の形態が含まれる。   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の可逆圧縮処理部、および非可逆圧縮処理部における圧縮処理は、いずれも単純な処理手順からなる高速な処理であるため、ある圧縮処理で目標圧縮率に達しないときに別の圧縮処理で圧縮をやり直すこととなっても処理時間は従来のJPEG方式などよりも短時間となる。また、第1の可逆圧縮処理部および第2の可逆圧縮処理部では、一方で、CTデータの圧縮に適した可逆圧縮処理が実行され、他方で、LWデータの圧縮に適した可逆圧縮処理が実行される。このため、多くの画像データが第1の可逆圧縮処理部および第2の可逆圧縮処理部のどちらかで大幅に圧縮され、元の画像データの画質が完全に維持されたまま目標圧縮率に達すると期待される。そして、どちらの可逆圧縮処理でも目標圧縮率に達しないような特殊なタイプの画像データが被圧縮データとなった場合や圧縮目標が特に高い場合などにのみ非可逆圧縮が実行されることとなる。   According to the data compression device or the data compression program of the present invention, each of the first lossless compression processing unit, the second lossless compression processing unit, and the irreversible compression processing unit described above is used so that the target compression rate is obtained. To compress uncompressed data. The compression processing in the first lossless compression processing unit, the second lossless compression processing unit, and the irreversible compression processing unit is a high-speed process including a simple processing procedure. Even if the compression is performed again by another compression process when it does not reach the above, the processing time is shorter than the conventional JPEG method or the like. In the first lossless compression processing unit and the second lossless compression processing unit, on the one hand, lossless compression processing suitable for CT data compression is executed, and on the other hand, lossless compression processing suitable for LW data compression is performed. Executed. Therefore, a large amount of image data is greatly compressed by either the first lossless compression processing unit or the second lossless compression processing unit, and the target compression rate is reached while the image quality of the original image data is completely maintained. It is expected. Then, irreversible compression is executed only when image data of a special type that does not reach the target compression rate in either lossless compression process becomes data to be compressed or when the compression target is particularly high. .

また、上記の2つの可逆圧縮処理で目標圧縮率に達しない被圧縮データは、どちらかといえばCTデータに近いタイプであると考えられ、上記非可逆圧縮処理部の可逆圧縮部が、CTデータの圧縮に適した上記の可逆圧縮処理を実行するものであると、そのようなタイプの被圧縮データが効率よく圧縮されることとなる。   In addition, the data to be compressed that does not reach the target compression rate by the above two lossless compression processes is considered to be a type close to CT data, and the lossless compression unit of the irreversible compression processing unit uses the CT data. If the above-described lossless compression process suitable for compression is performed, such type of compressed data is efficiently compressed.

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

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

この図3に示す画像圧縮装置500は、第1の可逆圧縮処理部501、第2の可逆圧縮処理部502、非可逆圧縮処理部503、および判定部504を備えている。各部501〜503の詳細は後述するが、この画像圧縮装置500内での画像データの流れは以下のとおりである。   The image compression apparatus 500 illustrated in FIG. 3 includes a first lossless compression processing unit 501, a second lossless compression processing unit 502, an irreversible compression processing unit 503, and a determination unit 504. Although details of each of the units 501 to 503 will be described later, the flow of image data in the image compression apparatus 500 is as follows.

入力画像ファイルD0(本実施形態では、図2に示すように、ビットマップに展開されたCTデータ12AあるいはLWデータ13Aが格納されたファイル)は、図4に示すデータ圧縮装置500の第1の可逆圧縮処理部501に入力される。この第1の可逆圧縮処理部501では、入力画像ファイルD0中の画像データに第1の可逆圧縮処理が施される。本実施形態では、この第1の可逆圧縮処理として、CTデータの圧縮に好適な可逆圧縮処理が施され、入力画像の8ライン分を1単位として圧縮処理が施される。この第1の可逆圧縮処理部501は、本発明にいう第1の可逆圧縮処理部の一例の相当する。   The input image file D0 (in this embodiment, a file storing CT data 12A or LW data 13A expanded in a bitmap as shown in FIG. 2) is the first of the data compression apparatus 500 shown in FIG. The data is input to the lossless compression processing unit 501. In the first lossless compression processing unit 501, the first lossless compression processing is performed on the image data in the input image file D0. In the present embodiment, as the first lossless compression process, a lossless compression process suitable for CT data compression is performed, and the compression process is performed with 8 lines of the input image as one unit. The first lossless compression processing unit 501 corresponds to an example of a first lossless compression processing unit according to the present invention.

第1の可逆圧縮処理部501で可逆圧縮処理が施された8ライン分のデータは判定部504に入力される。この判定部504にはあらかじめ要求圧縮率が通知されており、判定部504では、入力されてきた圧縮データがその要求圧縮率を満たすレベルにまで圧縮されたデータであるか否かが判定される。この判定も入力画像8ライン分を一単位として行なわれる。8ライン分の圧縮データがその要求圧縮率を満たすデータがあったときは、この可逆圧縮処理の段階で圧縮率が満足され、これ以上圧縮する必要がなく、そのまま可逆圧縮データD10として出力される。この可逆圧縮データD10の出力にあたっては、その可逆圧縮データD10の入力画像上の位置や、後の伸長処理に必要な情報等が記述されたヘッダが付されて出力される。   The data for 8 lines subjected to the reversible compression processing by the first reversible compression processing unit 501 is input to the determination unit 504. The determination unit 504 is notified in advance of the requested compression rate, and the determination unit 504 determines whether or not the input compressed data is data that has been compressed to a level that satisfies the requested compression rate. . This determination is also performed with the input image 8 lines as a unit. When the compressed data for 8 lines has data that satisfies the required compression ratio, the compression ratio is satisfied at the stage of the lossless compression processing, and no further compression is required, and the data is output as it is as lossless compression data D10. . When the reversible compressed data D10 is output, a header describing the position of the reversible compressed data D10 on the input image, information necessary for subsequent decompression processing, and the like is added and output.

判定部504において、圧縮データが要求圧縮率を満足しないデータであると判定されると、その判定結果が第2の可逆圧縮処理部502に通知され、その第2の可逆圧縮処理部502では、元々の入力画像ファイルD0中の画像データに第2の可逆圧縮処理が施される。本実施形態では、この第2の可逆圧縮処理として、LWデータの圧縮に好適な可逆圧縮処理が施され、ここでも入力画像の8ライン分を1単位として圧縮処理が施される。   When the determination unit 504 determines that the compressed data is data that does not satisfy the required compression rate, the determination result is notified to the second lossless compression processing unit 502, and the second lossless compression processing unit 502 A second lossless compression process is performed on the image data in the original input image file D0. In the present embodiment, as the second lossless compression process, a lossless compression process suitable for compression of LW data is performed, and again, the compression process is performed with 8 lines of the input image as one unit.

第2の可逆圧縮処理部502で可逆圧縮処理が施された8ライン分のデータも判定部504に入力され、そのデータが要求圧縮率を満たすレベルにまで圧縮されたデータであるか否かが判定される。この時点における8ライン分の圧縮データがその要求圧縮率を満たすデータがあったときは、この可逆圧縮処理の段階で圧縮率が満足され、これ以上圧縮する必要がなく、そのまま可逆圧縮データD20として出力される。この可逆圧縮データD20の出力にあたってもヘッダが付されて出力される。   The data for 8 lines subjected to the reversible compression processing by the second reversible compression processing unit 502 is also input to the determination unit 504, and whether or not the data is compressed to a level that satisfies the required compression rate. Determined. If there is data in which the compressed data for 8 lines at this time satisfies the required compression rate, the compression rate is satisfied at the stage of the lossless compression process, and no further compression is required, and the lossless compression data D20 is used as it is. Is output. The output of the lossless compressed data D20 is also appended with a header.

判定部504において、第2の可逆圧縮処理を経た圧縮データも要求圧縮率を満足しないデータであると判定されると、その判定結果が非可逆圧縮処理部503に通知され、その非可逆圧縮処理部503では、元々の入力画像ファイルD0中の画像データに非可逆圧縮処理が施される。ここでも入力画像の8ライン分を1単位として圧縮処理が施され、非可逆圧縮データD30が出力される。この非可逆圧縮データD30にも必要なヘッダが付されている。   If the determination unit 504 determines that the compressed data that has undergone the second lossless compression process is also data that does not satisfy the required compression rate, the determination result is notified to the lossy compression processing unit 503, and the lossy compression process is performed. In unit 503, lossy compression processing is performed on the image data in the original input image file D0. Again, compression processing is performed with 8 lines of the input image as one unit, and lossy compressed data D30 is output. A necessary header is also attached to the lossy compressed data D30.

図3に示す画像圧縮装置500において以上のようにして得られた圧縮データD10,D20,D30は、図1に示すSCSI等の汎用インターフェース150を経由してインターフェース機器200に転送される。インターフェース機器200では、その受け取った可逆圧縮データにデータ伸長処理が施されるが、このデータ伸長処理にあたっては、図3で説明した各種の符号化処理に対応する復号化処理が施されて元の入力画像ファイル中の画像データと同一の画像データ、若しくはほぼ同一の画像データが復元される。   The compressed data D10, D20, D30 obtained as described above in the image compression apparatus 500 shown in FIG. 3 is transferred to the interface device 200 via the general-purpose interface 150 such as SCSI shown in FIG. In the interface device 200, the received lossless compressed data is subjected to data decompression processing. In this data decompression processing, decoding processing corresponding to the various encoding processing described in FIG. The same or almost the same image data as the image data in the input 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は、第1の可逆圧縮処理部610、第2の可逆圧縮処理部620、非可逆圧縮処理部630、および判定部640から構成されている。このCDROM140には、ここに示す画像圧縮プログラム600のほか、図1に示すホストコントローラ100における一連の処理を実行するための各種プログラムが記憶されているが、それらについては従来と同様であるため図示および説明は省略する。   The image compression program 600 includes a first lossless compression processing unit 610, a second lossless compression processing unit 620, an irreversible compression processing unit 630, and a determination unit 640. In addition to the image compression program 600 shown here, the CDROM 140 stores various programs for executing a series of processes in the host controller 100 shown in FIG. The description is omitted.

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

ここで、図5に示す画像圧縮プログラム600は、ホストコントローラ100にインストールされてCPU111で実行されることにより、そのホストコントローラ100内に図3に示す画像圧縮装置500を実現するものであり、第1の可逆圧縮処理部610、第2の可逆圧縮処理部620、非可逆圧縮処理部630、および判定部640は、CPU111で実行されることにより、そのホストコントローラ100を、図3に示す画像圧縮装置500を構成する、それぞれ、第1の可逆圧縮処理部501、第2の可逆圧縮処理部502、非可逆圧縮処理部503、および判定部504として動作させるプログラム部品である。つまり、これらのプログラム部品により、画像圧縮装置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 first reversible compression processing unit 610, the second reversible compression processing unit 620, the irreversible compression processing unit 630, and the determination unit 640 are executed by the CPU 111 so that the host controller 100 can perform image compression shown in FIG. These are program parts that operate as the first lossless compression processing unit 501, the second lossless compression processing unit 502, the irreversible compression processing unit 503, and the determination unit 504, respectively, constituting the device 500. That is, the components of the image compression apparatus 500 are substantially constructed on the host controller 100 by these program parts.

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

先ず、第1の可逆圧縮処理部501について説明する。   First, the first lossless compression processing unit 501 will be described.

図6は、第1の可逆圧縮処理部501を示すブロック構成図である。   FIG. 6 is a block configuration diagram showing the first lossless compression processing unit 501.

この第1の可逆圧縮処理部501は、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、およびHプレーン圧縮部550を備えている。各部510〜550における処理の詳細については後に回し、ここでは、この第1の可逆圧縮処理部501内でのデータの流れについて説明する。   The first lossless compression processing unit 501 includes a differential encoding unit 510, an offset unit 520, a plane division unit 530, an L plane compression unit 540, and an H plane compression unit 550. Details of the processing in each of the units 510 to 550 will be described later. Here, the flow of data in the first lossless compression processing unit 501 will be described.

この第1の可逆圧縮処理部501に入力された入力画像ファイルD0中の画像データは差分符号化部510に入力されて、差分符号化処理、すなわち、入力されてきたデータを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす8ビットの数値の連続からなる画像データを生成する処理が行なわれる。この差分符号化部510は、本発明にいう差分生成部の一例に相当する。   The image data in the input image file D0 input to the first lossless compression processing unit 501 is input to the differential encoding unit 510 to perform differential encoding processing, that is, a series of numerical values constituting the input data. By calculating the difference between adjacent numerical values, a process of generating image data consisting of a series of 8-bit numerical values representing the difference 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単位ビット数で表現する符号化が行なわれる。   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.

また、ランレングス符号化部551での符号化後のデータは、次に、データスキャニング部552とハフマン符号化部553との双方に入力される。データスキャニング部552では、ランレングス符号化部551で符号化された後のデータの全てをスキャニングして、そのデータ中に出現する全ての数値の出現頻度(ヒストグラム)が求められる。ここで、この出現頻度を求める処理は、本実施形態では、図3に示す上位サブプレーンD1Hの1つずつを単位として実行され、各上位サブプレーンD1Hの、ランレングス符号化部551で符号化された後のデータ中の数値の出現頻度が求められる。さらに、データスキャニング部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).

データスキャニング部552で数値に符号が割り当てられてなるハフマンテーブルは、ハフマン符号化部553に渡され、ハフマン符号化部553では、その渡されたハフマンテーブルに従って、そのハフマン符号化部553に入力されてきたデータを構成する数値を、そのハフマンテーブルに従う符号、すなわち、出現頻度の高い数値ほど短かいビット長で表わされる符号に置き換える符号化処理が行なわれる。   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.

ハフマン符号化部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との組は、元々の画像データが可逆圧縮された、図3に示す可逆圧縮データD10を構成する。なお、ここではヘッダの詳細説明は省略したが、このヘッダには、例えば、ハフマン符号化に用いられたハフマンテーブル等が格納される。   As described above, the set of the low-order compressed data D2L and the high-order compressed data D2H output from each of the L plane compression unit 540 and the H plane compression unit 550 is the lossless compression shown in FIG. 3 in which the original image data is reversibly compressed. Data D10 is configured. Although a detailed description of the header is omitted here, for example, a Huffman table used for Huffman coding is stored in this header.

この第1の可逆圧縮処理部501の各部510〜550における処理の詳細については更に後に回し、次に、図3に示す第2の可逆圧縮処理部502について説明する。   Details of the processing in each of the units 510 to 550 of the first lossless compression processing unit 501 will be further described later, and then the second lossless compression processing unit 502 shown in FIG. 3 will be described.

図7は、第2の可逆圧縮処理部502を示すブロック構成図である。   FIG. 7 is a block configuration diagram showing the second lossless compression processing unit 502.

この第2の可逆圧縮処理部502には、差分符号化部560とランレングス符号化部570とハフマン符号化部580が備えられている。この第2の可逆圧縮処理部502の各部560〜580における処理の詳細についても、上述した第1の可逆圧縮処理部の各部における処理の詳細とともに後で説明することとし、ここでは、この第2の可逆圧縮処理部502内でのデータの流れについて説明する。   The second lossless compression processing unit 502 includes a differential encoding unit 560, a run length encoding unit 570, and a Huffman encoding unit 580. Details of the processing in the respective units 560 to 580 of the second lossless compression processing unit 502 will also be described later together with the details of the processing in the respective units of the first lossless compression processing unit described above. The flow of data in the lossless compression processing unit 502 will be described.

この第2の可逆圧縮処理部502に入力された入力画像ファイルD0中の画像データは差分符号化部560に入力されて、図6の差分符号化部510における差分符号化処理と同様の差分符号化処理が施される。すなわち、入力されてきたデータを構成する数値の連続について隣接する数値どうしの差分を求めることによりその差分を表わす8ビットの数値の連続からなる画像データを生成する処理が行なわれる。   The image data in the input image file D0 input to the second lossless compression processing unit 502 is input to the differential encoding unit 560, and the same differential code as the differential encoding processing in the differential encoding unit 510 of FIG. Processing is performed. That is, a process of generating image data composed of a series of 8-bit numerical values representing the difference is obtained by obtaining a difference between adjacent numerical values for a series of numerical values constituting the input data.

差分符号化処理が施されたデータはランレングス符号化部570に入力され、図6のHプレーン圧縮部550のランレングス符号化部551における符号化処理と同様の符号化処理が施される。そして、符号化後のデータはハフマン符号化部580に入力され、予め用意されている所定のハフマンテーブルに従う符号化処理が施される。   The data subjected to the differential encoding process is input to the run-length encoding unit 570, and the encoding process similar to the encoding process in the run-length encoding unit 551 of the H plane compression unit 550 in FIG. Then, the encoded data is input to the Huffman encoder 580 and subjected to an encoding process according to a predetermined Huffman table prepared in advance.

第2の可逆圧縮処理部502では、これらの符号化により図3にも示した可逆圧縮データD20が生成されて出力される。   The second lossless compression processing unit 502 generates and outputs the lossless compressed data D20 shown in FIG. 3 by these encodings.

次に、図3に示す非可逆圧縮処理部503について説明する。   Next, the lossy compression processing unit 503 illustrated in FIG. 3 will be described.

図8は、非可逆圧縮処理部503を示すブロック構成図である。   FIG. 8 is a block diagram showing the lossy compression processing unit 503.

この非可逆圧縮処理部503は、間引き処理部505、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、Hプレーン圧縮部550、およびFAKE画素圧縮部590を備えている。ここでも、まず、非可逆圧縮処理部503での画像データの流れについて説明する。   The lossy compression processing unit 503 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 590. Yes. Also here, the flow of image data in the lossy compression processing unit 503 will be described first.

非可逆圧縮処理部503に入力された入力画像ファイルD0中の画像データは間引き処理部505に入力されて、画像データから、画像中の周期的な画素部分に相当するTRUE画素データが間引かれる。間引かれた残りはFAKE画素データとなる。これらTRUE画素データおよびFAKE画素データが、それぞれ、本発明にいう第1の被圧縮データおよび第2の被圧縮データの各一例に相当する。   The image data in the input image file D0 input to the lossy compression processing unit 503 is input to the thinning processing unit 505, and TRUE pixel data corresponding to a periodic pixel portion 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に入力され、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、Hプレーン圧縮部550の各処理が施されて下位圧縮データD2Lと上位圧縮データD2Hが得られる。このTRUE画素データの流れは、図6で説明した第1の可逆圧縮処理部501における画像データの流れと全く同様である。この図8に示す要素のうち図6に示す要素と同様の要素については、図6で付されている符号と同じ符号をこの図8でも付している。下位圧縮データD2Lと上位圧縮データD2Hとの組は、TRUE画素データが可逆圧縮された可逆圧縮データを構成する。   The TRUE pixel data is input to the differential encoding unit 510, and each process of 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 is performed, and the lower-order compressed data D2L The upper compressed data D2H is obtained. The flow of TRUE pixel data is exactly the same as the flow of image data in the first lossless compression processing unit 501 described with reference to FIG. Among the elements shown in FIG. 8, the same elements as those shown in FIG. 6 are given the same reference numerals as those shown in FIG. A set of the lower-order compressed data D2L and the higher-order compressed data D2H constitutes reversible compressed data obtained by reversibly compressing TRUE pixel data.

一方、上記の間引き処理部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画素データが可逆圧縮された可逆圧縮データを構成する下位圧縮データD2Lと上位圧縮データD2Hとの組、およびFAKE画素データが非可逆圧縮された非可逆圧縮データD3は、全体として、入力画像ファイルD0中の画像データが非可逆圧縮された、図3に示す非可逆圧縮データD30を構成している。   A set of low-order compressed data D2L and high-order compressed data D2H that constitute reversible compressed data in which TRUE pixel data is reversibly compressed, and irreversible compressed data D3 in which FAKE pixel data is irreversibly compressed are as a whole input image file. The irreversible compression data D30 shown in FIG. 3 is configured in which the image data in D0 is irreversibly compressed.

以下、上述した第1の可逆圧縮処理部、第2の可逆圧縮処理部、および非可逆圧縮処理部を構成している各部における処理の詳細について説明する。   In the following, details of processing in each of the parts constituting the first lossless compression processing unit, the second lossless compression processing unit, and the lossy compression processing unit described above will be described.

まず、図6に示す第1の可逆圧縮処理部501の差分符号化部510の処理について説明する。   First, the processing of the differential encoding unit 510 of the first lossless compression processing unit 501 illustrated in FIG. 6 will be described.

図9は、図6に示す第1の可逆圧縮処理部501に入力される入力画像ファイル中の画像データのデータ構造および差分符号化の概念を示す図である。   FIG. 9 is a diagram showing the data structure of the image data in the input image file input to the first lossless compression processing unit 501 shown in FIG. 6 and the concept of differential encoding.

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

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

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

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

図10は、図6に示す第1の可逆圧縮処理部501を構成する差分符号化部510における差分符号化処理を例示して示す図である。   FIG. 10 is a diagram illustrating a differential encoding process in the differential encoding unit 510 included in the first lossless compression processing unit 501 illustrated in FIG.

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

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

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

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

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

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

以下、これと同じ演算を繰り返すことにより、図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では、この差分符号化されたデータを復号化するにあたり、図10の右側に示す演算が行なわれる。   In decoding the differentially encoded data, the interface device 200 shown in FIG. 1 performs the operation shown on the right side of FIG.

先ず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.

図6の差分符号化部510では、以上説明したような差分符号化が画像データに施される。この差分符号化によって得られるデータは、図6のオフセット部520に入力され、そのデータの各数値について所定のオフセット値が加算される。   In the differential encoding unit 510 of FIG. 6, the differential encoding as described above is performed on the image data. The data obtained by this differential encoding is input to the offset unit 520 in FIG. 6, 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.

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

この図11のパート(A)には、CTの画像データが表しているCT画像の一例としてモノクロの風景画像が示されており、本実施形態では、このようなCT画像の各画素における色の濃度が8ビットの数値で表現された画像データが用いられる。図11のパート(B)には、パート(A)に示す風景画像を表す画像データにおけるデータ値のヒストグラムが示されており、このヒストグラムの横軸はデータ値、縦軸はデータ数(画素数)を表している。CT画像では一般に、ヒストグラムの幅が広く、ヒストグラム中でデータ数の山谷は生じてもヒストグラムの途中にデータ数が「0」の領域が生じることは極めてまれである。   In part (A) of FIG. 11, a monochrome landscape image is shown 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 shown. Image data represented by numerical values having a density of 8 bits is used. Part (B) of FIG. 11 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.

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

この図12のパート(A)には、図11に示したCTの画像データに対して差分符号化が施されて得られるデータのヒストグラムが示されており、このヒストグラムの横軸はデータ値、縦軸は出現頻度を表している。CTの画像データに対して、図9および図10で説明した差分符号化が施されると、データのヒストグラムは、一般に、この図12のパート(A)に示すような、最小データ値と最大データ値の双方に鋭いピークを有するヒストグラムとなる。そして、このようなデータに対してオフセットが施されると、データのヒストグラムは、図12のパート(B)に示すような、オフセット値のところに鋭いピークを持つヒストグラムとなる。本実施形態ではオフセット値として「8」が用いられており、オフセットの結果、値が「16」以上となるデータの頻度はほとんど「0」となっている。   In part (A) of FIG. 12, a histogram of data obtained by performing differential encoding on the CT image data shown in FIG. 11 is shown. The vertical axis represents the appearance frequency. When the differential encoding described with reference to FIGS. 9 and 10 is performed on 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.

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

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

この図13には、図12のパート(B)に示すヒストグラムがデータ値「15」とデータ値「16」との間で切り離されたヒストグラムが示されており、図6のプレーン分割部530によるデータ分割は、まさにこのようなヒストグラムの分割に相当する効果を生じる。すなわち、本実施形態では、データを構成している8ビットの各数値が上位4ビットと下位4ビットとに分割されることで、下位4ビットが表す数値の連続からなる下位サブプレーンと上位4ビットが表す数値の連続からなる上位サブプレーンとが得られる。そして、下位サブプレーンを構成する4ビットの数値が値「0」から値「15」までの各数値をそのまま表現していて、上位サブプレーンを構成する4ビットの数値の場合は、値「16」から値「256」までの、16間隔16種類の数値を表現していると解釈すると、下位サブプレーンのヒストグラムは、この図13の左側に示されたヒストグラムとほぼ同じものとなり、上位サブプレーンのヒストグラムは、図13の右側に示されたヒストグラムとほぼ同じものとなる。ただし、上位サブプレーンのヒストグラムについては、図13の右側に示されたヒストグラムのデータ値「16」のところに、図13の左側に示されたヒストグラムの面積に等しい高さのピークが付加されたものとなる。   FIG. 13 shows a histogram in which the histogram shown in Part (B) of FIG. 12 is separated between the data value “15” and the data value “16”. The plane dividing unit 530 of 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“ 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. 13 is added to the data value “16” of the histogram shown on the right side of FIG. It will be a thing.

このような上位サブプレーンは、図6に示す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.

図14は、図6に示すランレングス符号化部551でのランレングス符号化処理の説明図である。   FIG. 14 is an explanatory diagram of the run-length encoding process in the run-length encoding unit 551 shown in FIG.

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

ここでは、図14の上のラインに示すように、量子化処理部551からは、
「06 02 02 02 01 01 01 01 04 05 00 … 」
なるデータが入力されたものとする。このとき、図6のランレングス符号化部551では、先頭の「06」は圧縮対象数値ではなく、次に続く「02 02 02」も圧縮対象数値ではなく、次に、圧縮対象数値である「01」が4つ連続していること、次に、圧縮対象数値ではない「04」、「05」を間に置いて、圧縮対象数値である「00」が32767個連続していることが検出される。
Here, as shown in the upper line of FIG. 14, 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. 6, the leading “06” is not a compression target value, and the subsequent “02 02 02” is not a compression target value but is 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.

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

この図15中、Zは同一の圧縮対象数値の連続数、例えば図14の上のラインの「01」についてはZ=4、「00」についてはZ=32767である。   In FIG. 15, 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. 14, and Z = 32767 for “00”.

また、図15中、「YY」は、16進2桁で表わされた圧縮対象数値自体を表わしている。その「YY」に続く、「0」又は「1」は1ビットで表現された「0」又は「1」であり、さらにそれに続く「XX…」は、1つの「X」が1ビットを表わしており、この「XX…」でZの値を表現している。   In FIG. 15, “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.

すなわち、図15は、圧縮対象数値「YY」がZ<128連続するときは、1バイト目で圧縮対象数値「YY」を表現し、それに続く1バイトで、先頭ビットが「0」、それに続く7ビットでZの値を表現すること、また、圧縮対象数値「YY」がZ≧128連続するときは、1バイト目で圧縮対象数値「YY」を表現し、それに続く2バイト(16ビット)のうちの先頭の1ビットを「1」とすることで2バイトに跨って表現されていることを表現し、それに続く15ビットで、Zの値を表現することを意味している。   That is, in FIG. 15, 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.

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

図6のプレーン分割部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 dividing unit 530 in FIG. 6 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”.

図16は、図6のランレングス符号化部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. 16 is a diagram illustrating an example of an encoding process according to the number of consecutive steps 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.

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

本実施形態によるランレングス符号化部551によれば、最大圧縮率は、3/32895=1/10,965にまで向上する。また、このランレングス符号化部551が符号化処理の対象としている上位サブプレーンのデータは、図13のヒストグラムで説明したように、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. 13, most of the 4-bit numerical values represented the data value “16” in the upper subplane data that is the target of the encoding process by the run-length encoding unit 551. 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.

図6のランレングス符号化部551で上記の符号化処理の行なわれた後のデータは、次に図6のHプレーン圧縮部550を構成するデータスキャニング部552とハフマン符号化部553に入力される。   The data after the above-described encoding process is performed by the run-length encoding unit 551 in FIG. 6 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.

図17は、データスキャニング部552によるスキャニング結果の例を示す図である。   FIG. 17 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.

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

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

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

このように、図6のHプレーン圧縮部550に入力される上位サブプレーンD1Hについては、ランレングス符号化部551による符号化とハフマン符号化部553による符号化が施されることにより高い圧縮率で圧縮されて上位圧縮データD2Hとなる。   As described above, the high-order subplane D1H input to the H-plane compression unit 550 in FIG. 6 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.

図6の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. 6, as in the run length coding unit 551 of the H plane compression unit 550, two 4-bit numerical values are regarded as one 8-bit numerical value. 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.

以上説明したような各種の処理が図6に示す第1の可逆圧縮処理部501の各部で実行されることにより、第1の可逆圧縮処理部501は、画像データを可逆圧縮によって圧縮することができ、特にCT画像のデータについては大幅な圧縮が実現される。また、以上説明したような各種の処理は、単純なアルゴリズムによる処理であるため高速処理が可能である。   Various processes as described above are executed by the respective units of the first lossless compression processing unit 501 shown in FIG. 6, so that the first lossless compression processing unit 501 can compress the image data by lossless compression. In particular, significant compression is realized for CT image data. Moreover, since various processes as described above are processes based on simple algorithms, high-speed processing is possible.

次に、図7に示す第2の可逆圧縮処理部502の各部における処理の詳細について説明する。   Next, details of processing in each unit of the second lossless compression processing unit 502 illustrated in FIG. 7 will be described.

この第2の可逆圧縮処理部502に入力された画像データは、図7に示す差分符号化部560に入力される。この差分符号化部560は、図6に示す差分符号化部510と全く同様のものであり、第2の可逆圧縮処理部502の差分符号化部560でも、図9および図10で説明した差分符号化処理が実行される。差分符号化処理が施されたデータは、図7に示すランレングス符号化部570に入力される。このランレングス符号化部570では、図14〜図16で説明した符号化処理と同様の符号化処理が実行される。   The image data input to the second lossless compression processing unit 502 is input to the differential encoding unit 560 shown in FIG. This difference encoding unit 560 is exactly the same as the difference encoding unit 510 shown in FIG. 6, and the difference encoding unit 560 of the second lossless compression processing unit 502 also uses the difference described in FIGS. 9 and 10. An encoding process is executed. The data subjected to the differential encoding process is input to a run length encoding unit 570 shown in FIG. In the run-length encoding unit 570, an encoding process similar to the encoding process described with reference to FIGS.

第2の可逆圧縮処理部502では、第1の可逆圧縮処理部とは異なり、差分符号化処理の直後にランレングス符号化処理が実行される。このような処理手順は、特にLWデータの処理に適している。即ち、LW画像では差分符号化処理後のデータは、いくつかの特定値に極めて集中したデータとなっており、このようなデータに対して上述したようなランレングス符号化処理が施されることによって大幅な圧縮が実現されると期待される。   Unlike the first lossless compression processing unit, the second lossless compression processing unit 502 executes a run-length encoding process immediately after the differential encoding process. Such a processing procedure is particularly suitable for processing LW data. That is, in the LW image, the data after the differential encoding process is extremely concentrated on some specific values, and the run-length encoding process as described above is performed on such data. Is expected to achieve significant compression.

このようにランレングス符号化処理が施されたデータは、図7のハフマン符号化部580に入力される。このハフマン符号化部580では、図17および図18で説明したデータスキャニングとハフマン符号化が実行され、データが更に圧縮される。   The data that has been subjected to the run-length encoding process is input to the Huffman encoding unit 580 in FIG. The Huffman encoding unit 580 performs the data scanning and Huffman encoding described with reference to FIGS. 17 and 18, and further compresses the data.

以上説明したように各種の処理が図7に示す第2の可逆圧縮処理部502の各部で実行されることにより、第2の可逆圧縮処理部502は、画像データを可逆圧縮によって圧縮することができ、特にLW画像のデータについては大幅な圧縮が実現される。また、第2の可逆圧縮処理部502における各種の処理も単純なアルゴリズムによる処理であり、高速処理が可能である。   As described above, various processes are executed by the respective units of the second lossless compression processing unit 502 shown in FIG. 7, so that the second lossless compression processing unit 502 can compress image data by lossless compression. In particular, significant compression is realized for LW image data. Various processes in the second lossless compression processing unit 502 are also simple algorithm processes, and can be performed at high speed.

最後に、図8に示す非可逆圧縮処理部503の各部における処理の詳細について説明する。   Finally, details of processing in each unit of the lossy compression processing unit 503 illustrated in FIG. 8 will be described.

この図8に示す非可逆圧縮処理部503に入力された画像データは、間引き処理部505に入力され、間引き処理が施される。   The image data input to the irreversible compression processing unit 503 shown in FIG. 8 is input to the thinning processing unit 505 and subjected to thinning processing.

図19は、図8に示す非可逆圧縮処理部503に入力される入力画像ファイル中の画像データのデータ構造および間引き処理の概念を示す図である。   FIG. 19 is a diagram showing the data structure of image data in the input image file input to the lossy compression processing unit 503 shown in FIG. 8 and the concept of thinning processing.

データ構造については図9でも説明したが、ここでは、間引き処理の概念説明のために、上述した説明における画素値の表現とは別の表現を用いる。   Although the data structure has been described with reference to FIG. 9, here, for the purpose of explaining the concept of the thinning process, an expression different from the expression of the pixel value in the above description is used.

図19に示すように、図8に示す非可逆圧縮処理部503に入力される画像データは、所定の主走査方向(図の横方向)とその主走査方向とは直角な副走査方向(図の縦方向)とに画素が並んでおり、主走査方向に並ぶ画素の列はラインと称される。ここでは8ライン分の画素が示されており、画素と画素との間隔は600dpiの解像度に相当する。   As shown in FIG. 19, the image data input to the irreversible compression processing unit 503 shown in FIG. 8 includes a predetermined main scanning direction (horizontal direction in the figure) and a sub-scanning direction (see FIG. 19) perpendicular to the main scanning direction. Pixels in the vertical direction), and a column of pixels arranged in the main scanning direction is called a line. 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.

図8に示す非可逆圧縮処理部503を構成する間引き処理部505には、このように並んだ画素値からなる画像データが入力され、各画素を、TRUE画素とFAKE画素とに分類する。この図19に示す各画素のうちTRUE画素は画素値が符号Tで表され、FAKE画素は画素値が符号Fで表されている。TRUE画素は、画素の並びの中から周期的に間引かれた画素であり、ここでは一例として、副走査方向に1ラインおきの各ライン(奇数番目のライン)について、主走査方向に1画素おきの各画素(奇数番目の画素)がTRUE画素として間引き出されている。この結果、この図19に示す例ではTRUE画素は、元の600dpiの解像度から300dpiの解像度に低下した画像を構成する画素に相当しており、元の画像データの4分の1に相当する画素が間引き出されたこととなる。このように間引き出されたTRUE画素は、そのようなTRUE画素の連続からなるTRUE画素データを構成し、そのTRUE画素データの構造は、元の画像データと同様に、主走査方向と副走査方向に画素が並んだ構造となっている。TRUE画素の間引きによって残ったFAKE画素についても、そのFAKE画素の連続からなるFAKE画素データを構成する。   The thinning-out processing unit 505 constituting the irreversible compression processing unit 503 shown in FIG. 8 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. 19, 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. 19, 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 corresponds 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に相当する画素を間引き出す方式や、主走査方向と副走査方向とでは間引きだしの周期が異なる方式なども採用可能であるが、以下では、図19に示すように、奇数番ラインの奇数番画素が間引き出されたものとして説明を続ける。   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 corresponding pixels or a method of different thinning-out cycles in the main scanning direction and the sub-scanning direction can be adopted. However, in the following, as shown in FIG. The explanation will be continued on the assumption that was thinned out.

このようにして得られたTRUE画素データは、図8に示す非可逆圧縮処理部503を構成する差分符号化部510に入力され、差分符号化部510、オフセット部520、プレーン分割部530、Lプレーン圧縮部540、Hプレーン圧縮部550の各処理が施される。これらの各部510〜550における処理の詳細は、図6に示す各部510〜550における処理と全く同様であるので重複説明は省略する。なお、これらの各部510〜550における処理が施されると、上述したように、CTデータが効率よく圧縮される。上述した2つの可逆圧縮処理部で目標の圧縮率に達しない場合には、画像データが表す画像がCT画像とLW画像とのどちらとも言えないタイプの画像であるという状況もあり得るが、CT画像のデータとLW画像データとでは、CT画像のデータの方が圧縮率が上がりにくいので、2つの可逆圧縮処理部で目標の圧縮率に達しない場合は、しばしば、CT画像のデータで圧縮率が不足したという状況が生じていると考えられる。このため、TRUE画素データに対する圧縮処理がCT画像のデータの圧縮に適した上記の各処理であると、TRUE画素データが効率良く圧縮されると期待される。   The TRUE pixel data obtained in this way is input to the differential encoding unit 510 constituting the irreversible compression processing unit 503 shown in FIG. 8, and the differential encoding unit 510, the offset unit 520, the plane division unit 530, L Each process of the plane compression unit 540 and the H plane compression unit 550 is performed. Details of the processing in these units 510 to 550 are exactly the same as the processing in each unit 510 to 550 shown in FIG. Note that when the processing in each of these units 510 to 550 is performed, the CT data is efficiently compressed as described above. If the two lossless compression processing units described above do not reach the target compression rate, the image represented by the image data may be a type of image that cannot be said to be a CT image or an LW image. In the case of image data and LW image data, the compression rate of the CT image data is less likely to increase. Therefore, when the two lossless compression processing units do not reach the target compression rate, the compression rate of the CT image data is often used. It is thought that there was a situation where there was a shortage. For this reason, it is expected that the TRUE pixel data is efficiently compressed when the compression process for the TRUE pixel data is each of the above processes suitable for the compression of the CT image data.

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

このFAKE画素圧縮部590に入力されたFAKE画素データは、ビット短縮部591に渡され、ビット短縮部591では、まず、FAKE画素データを構成する各FAKE画素の画素値について、元の画像データ上でそのFAKE画素を挟んでいる2つのTRUE画素の画素値が求められ、FAKE画素の画素値がこれらのTRUE画素の画素値と比較される。ここで、図19に示す各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 590 is transferred to the bit shortening unit 591. The bit shortening unit 591 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. 19 is divided into three systems according to the positional relationship with the TRUE pixel. That is, when the pixel value of the TRUE pixel is expressed as T n_k , the pixel value of the FAKE pixel is expressed in three types, F n_k + 1 , F n + 1_k , and F n + 1_k + 1 . 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.

図20は、ビット短縮部における符号化の概念を示す図である。   FIG. 20 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.

図21は、4ビットの符号への第1の符号化方式を表す図である。   FIG. 21 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.

図8のビット短縮部591におけるこのような符号化によって、FAKE画素の8ビットの画素値は1ビットまたは4ビットに短縮化される。また、CT画像の場合には、隣接画素間の相関が高いので、多くのFAKE画素について画素値がレギュラーFAKE画素ゾーンに存在し、大幅な圧縮が可能であると考えられる。   By such encoding in the bit shortening unit 591 of FIG. 8, 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.

図22は、4ビットの符号への第2の符号化方式を表す図である。   FIG. 22 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.

図8のビット短縮部591で符号化されたデータは1ビットの符号と4ビットの符号が混在したものであるが、その後の処理のために8ビット単位に区切られ(バイトパッキング)、図8のランレングス符号化部592およびハフマン符号化部593によって、図6および図8に示すHプレーン圧縮部550における処理と全く同様の処理が実行される。ここで、ハフマン符号化部593は、上述したデータスキャニング部552とハフマン符号化部553との双方の役割を兼ねている。   The data encoded by the bit shortening unit 591 in FIG. 8 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 592 and the Huffman encoding unit 593 perform processing exactly the same as the processing in the H-plane compression unit 550 shown in FIGS. Here, the Huffman encoding unit 593 also serves as both the data scanning unit 552 and the Huffman encoding unit 553 described above.

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

以上説明したような各種の処理が図8に示す非可逆圧縮処理部503の各部で実行されることにより、非可逆圧縮処理部503は、画像データを非可逆圧縮によって圧縮することができ、特にCT画像のデータについては、第1の可逆圧縮処理部における圧縮よりも大幅な圧縮が実現される。この非可逆圧縮処理部503における各種の処理も単純なアルゴリズムによる処理であり、高速処理が可能である。   The various processes as described above are executed by the respective units of the irreversible compression processing unit 503 shown in FIG. 8, so that the irreversible compression processing unit 503 can compress the image data by irreversible compression. The CT image data is compressed more greatly than the compression in the first lossless compression processing unit. Various processes in the irreversible compression processing unit 503 are also processes by a simple algorithm, and high-speed processing is possible.

このように、図3に示す画像圧縮装置500は、第1の可逆圧縮処理部501、第2の可逆圧縮処理部502、および非可逆圧縮処理部503を備えることによって、種々のタイプの画像データについて高速かつ大幅な圧縮を行うことができる。   As described above, the image compression apparatus 500 illustrated in FIG. 3 includes various types of image data by including the first lossless compression processing unit 501, the second lossless compression processing unit 502, and the lossy compression processing unit 503. High speed and significant compression can be performed.

なお、上記説明では、本発明にいう第1の可逆圧縮処理部の一例として、CTデータの圧縮に適した処理を行う第1の可逆圧縮処理部501が示され、本発明にいう第2の可逆圧縮処理部の一例として、LWデータの圧縮に適した処理を行う第2の可逆圧縮処理部502が示されているが、本発明にいう第1の可逆圧縮処理部および本発明にいう第1の可逆圧縮処理部は、第1の可逆圧縮処理部でLWデータの圧縮に適した処理を行い、第2の可逆圧縮処理部でCTデータの圧縮に適した処理を行うものであってもよい。   In the above description, as an example of the first lossless compression processing unit according to the present invention, the first lossless compression processing unit 501 that performs processing suitable for compression of CT data is shown, and the second loss referred to in the present invention. As an example of the reversible compression processing unit, a second reversible compression processing unit 502 that performs processing suitable for compression of LW data is shown, but the first reversible compression processing unit according to the present invention and the first reversible compression processing unit according to the present invention. Even if the first lossless compression processing unit performs processing suitable for compression of LW data in the first lossless compression processing unit and performs processing suitable for compression of CT data in the second lossless compression processing unit. Good.

また、上記説明では、本発明にいう差分生成部の一例として、副走査方向の差分を求めるものが示されているが、本発明にいう差分生成部は、主走査方向の差分を求めるものであってもよい。また、上記説明では、本発明にいう差分生成部の一例として、いわば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. 第1の可逆圧縮処理部を示すブロック構成図である。It is a block block diagram which shows a 1st lossless compression process part. 第2の可逆圧縮処理部を示すブロック構成図である。It is a block block diagram which shows a 2nd lossless compression process part. 非可逆圧縮処理部を示すブロック構成図である。It is a block block diagram which shows an irreversible compression process part. 図6に示す第1の可逆圧縮処理部に入力される入力画像ファイル中の画像データのデータ構造および差分符号化の概念を示す図である。It is a figure which shows the data structure of the image data in the input image file input into the 1st lossless compression process part shown in FIG. 6, and the concept of differential encoding. 図6に示す第1の可逆圧縮処理部を構成する差分符号化部における差分符号化処理を例示して示す図である。It is a figure which illustrates and illustrates the differential encoding process in the differential encoding part which comprises the 1st lossless compression process part shown in 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. 図6に示すランレングス符号化部での符号化の説明図である。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. 図6のランレングス符号化部における、連続数に応じた符号化処理の例を示す図である。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. 図8に示す非可逆圧縮処理部に入力される入力画像ファイル中の画像データのデータ構造および間引き処理の概念を示す図である。It is a figure which shows the data structure of the image data in the input image file input into the lossy compression process part shown in FIG. 8, and the concept of a thinning process. ビット短縮部における符号化の概念を示す図である。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 画像圧縮装置
501 第1の可逆圧縮処理部
502 第2の可逆圧縮処理部
503 非可逆圧縮処理部
504 判定部
505 間引き処理部
510 差分符号化部
520 オフセット部
530 プレーン分割部
540 Lプレーン圧縮部
541 ハフマン符号化部
542 モード切換部
550 Hプレーン圧縮部
551 ランレングス符号化部
552 データスキャニング部
553 ハフマン符号化部
560 差分符号化部
570 ランレングス符号化部
580 ハフマン符号化部
590 FAKE画素圧縮部
591 ビット短縮部
592 ランレングス符号化部
593 ハフマン符号化部
600 画像圧縮プログラム
610 第1の可逆圧縮処理部
620 第2の可逆圧縮処理部
630 非可逆圧縮処理部
640 判定部
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 501 1st lossless compression process part 502 2nd lossless compression process part 503 Lossy compression process part 504 Judgment part 505 Thinning process part 510 Difference encoding Section 520 Offset section 530 Plane division section 540 L plane compression section 541 Huffman coding section 542 Mode switching section 550 H plane compression section 551 Run length coding section 552 Data scanning section 553 Huffman coding section 560 Differential coding section 570 Run length Coding unit 580 Huffman coding unit 590 FAKE pixel compression unit 591 Bit shortening unit 592 Run length coding unit 593 Huffman coding unit 600 Image compression program 61 The first reversible compression processing unit 620 second lossless compression processing unit 630 lossy compression processing unit 640 determination unit

Claims (5)

所定の単位ビット数で表わされる数値の連続からなる被圧縮データにデータ圧縮処理を施すデータ圧縮装置において、
前記被圧縮データに第1の可逆圧縮処理を施す第1の可逆圧縮処理部と、
前記第1の可逆圧縮処理部によるデータ圧縮の結果が所定の目標圧縮率に達しない場合に、前記被圧縮データに第2の可逆圧縮処理を施す第2の可逆圧縮処理部と、
前記第2の可逆圧縮処理部によるデータ圧縮の結果が前記目標圧縮率に達しない場合に、前記被圧縮データに非可逆圧縮処理を施す非可逆圧縮処理部とを備え、
前記第1の可逆圧縮処理部および前記第2の可逆圧縮処理部のうちの一方が、
前記被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることにより該差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
前記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
前記オフセット部によって数値がオフセットされた被圧縮データの各数値を、前記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、該被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
前記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
前記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであり、
前記第1の可逆圧縮処理部および前記第2の可逆圧縮処理部のうちの前記一方に対する他方が、
大本の被圧縮データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであり、
前記非可逆圧縮処理部が、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで該被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第1の被圧縮データとを作成する間引き処理部と、
前記間引き処理部で作成された第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,
A first lossless compression processor that performs a first lossless compression process on the data to be compressed;
A second lossless compression processing unit that applies a second lossless compression process to the data to be compressed when a result of data compression by the first lossless compression processing unit does not reach a predetermined target compression rate;
An irreversible compression processing unit that performs irreversible compression processing on the data to be compressed when the result of data compression by the second lossless compression processing unit does not reach the target compression rate;
One of the first lossless compression processor and the second lossless compression processor is
A difference generating unit that generates 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 compressed data;
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;
A lower data compression unit that performs a lossless compression process on the lower data divided by the dividing unit;
The other of the first lossless compression processing unit and the second lossless compression processing unit with respect to the one is:
In the large data to be compressed, numerical values other than one or a plurality of predetermined compression target values are output as they are, and for the compression target numerical values, the compression target numerical values and the same compression target numerical values as the compression target numerical values are output. A lossless compression process including an encoding process for encoding and outputting a numerical value representing the continuous number of
The irreversible compression processing unit
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 first 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.
前記非可逆圧縮処理部の前記可逆圧縮部が、前記第1の可逆圧縮処理部および前記第2の可逆圧縮処理部のうちの前記一方における可逆圧縮処理と同等の可逆圧縮処理を前記第1の被圧縮データに施すものであることを特徴とする請求項1記載のデータ圧縮装置。   The lossless compression unit of the irreversible compression processing unit performs a lossless compression process equivalent to the lossless compression process in the one of the first lossless compression process unit and the second lossless compression process unit. 2. The data compression apparatus according to claim 1, wherein the data compression apparatus is applied to data to be compressed. 前記非可逆圧縮処理部の前記非可逆圧縮部が、
前記間引き処理部で作成された第2の被圧縮データを構成する数値について、前記間引き処理部の間引きによってその数値の前後それぞれで間引かれた各数値の間の値を有するものか否かを判定し、間の値を有する場合には、間の値であることを表す符号を出力し、間の値でない場合には、その数値を前記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであることを特徴とする請求項1記載のデータ圧縮装置。
The irreversible compression unit of the irreversible compression processing unit,
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次元的な画像を表したものであり、
前記非可逆圧縮処理部が、前記画像中のエッジ部分を判定する判定部を備えたものであり、
前記非可逆圧縮処理部の前記非可逆圧縮部が、前記間引き処理部で作成された第2の被圧縮データを構成する数値について、前記判定部で判定されたエッジ部分でない場合には、前記単位ビット数よりも少ないビット数の所定符号を出力し、エッジ部分である場合には、その数値を前記単位ビット数よりも少ない少ビット数で表現し直した数値を出力するものであることを特徴とする請求項1記載のデータ圧縮装置。
The compressed data represents a continuous and two-dimensional image of a numerical value represented by the number of unit bits,
The lossy compression processing unit includes a determination unit that determines an edge portion in the image;
When the irreversible compression unit of the irreversible compression processing unit is not the edge portion determined by the determination unit with respect to the numerical value constituting the second compressed data created by the thinning processing unit, the unit A predetermined code having a smaller number of bits than the number of bits is output, and in the case of an edge portion, a numerical value obtained by re-expressing the numerical value with a smaller number of bits than the unit bit number is output. The data compression apparatus according to claim 1.
プログラムを実行する情報処理装置内に組み込まれて該情報処理装置に、所定の単位ビット数で表わされる数値の連続からなる被圧縮データに対するデータ圧縮処理を実行させるデータ圧縮プログラムにおいて、
前記情報処理装置上に、
前記被圧縮データに第1の可逆圧縮処理を施す第1の可逆圧縮処理部と、
前記第1の可逆圧縮処理部によるデータ圧縮の結果が所定の目標圧縮率に達しない場合に、前記被圧縮データに第2の可逆圧縮処理を施す第2の可逆圧縮処理部と、
前記第2の可逆圧縮処理部によるデータ圧縮の結果が前記目標圧縮率に達しない場合に、前記被圧縮データに非可逆圧縮処理を施す非可逆圧縮処理部とを構築し、
前記第1の可逆圧縮処理部および前記第2の可逆圧縮処理部のうちの一方が、
前記被圧縮データを構成する数値の連続について隣接する数値どうしの差分を求めることにより該差分を表わす数値の連続からなる新たな被圧縮データを生成する差分生成部と、
前記差分生成部によって生成された新たな被圧縮データを構成する各数値を所定値だけオフセットさせるオフセット部と、
前記オフセット部によって数値がオフセットされた被圧縮データの各数値を、前記単位ビット数よりも小さい所定の分割ビット数のところで上位ビット部分と下位ビット部分とに分けることによって、該被圧縮データを、各数値における上位ビット部分の連続からなる上位データと各数値の下位ビット部分の連続からなる下位データとに分割する分割部と、
前記分割部によって分割された上位データに対して可逆圧縮処理を施す上位データ圧縮部と、
前記分割部によって分割された下位データに対して可逆圧縮処理を施す下位データ圧縮部とを備えたものであり、
前記第1の可逆圧縮処理部および前記第2の可逆圧縮処理部のうちの前記一方に対する他方が、
大本の被圧縮データ中、1つもしくは複数の所定の圧縮対象数値を除く数値についてはそのまま出力するとともに、圧縮対象数値については、該圧縮対象数値と、該圧縮対象数値と同一の圧縮対象数値の連続数を表わす数値とに符号化して出力する符号化処理を含む可逆圧縮処理を施すものであり、
前記非可逆圧縮処理部が、
被圧縮データを構成する数値の連続から周期的に数値を間引くことにより、その間引きで該被圧縮データから取り出された数値の連続からなる第1の被圧縮データと、残りの数値の連続からなる第1の被圧縮データとを作成する間引き処理部と、
前記間引き処理部で作成された第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,
A first lossless compression processor that performs a first lossless compression process on the data to be compressed;
A second lossless compression processing unit that applies a second lossless compression process to the data to be compressed when a result of data compression by the first lossless compression processing unit does not reach a predetermined target compression rate;
When a result of data compression by the second lossless compression processing unit does not reach the target compression rate, a lossy compression processing unit that performs lossy compression processing on the data to be compressed is constructed,
One of the first lossless compression processor and the second lossless compression processor is
A difference generating unit that generates 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 compressed data;
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;
A lower data compression unit that performs a lossless compression process on the lower data divided by the dividing unit;
The other of the first lossless compression processing unit and the second lossless compression processing unit with respect to the one is:
In the large data to be compressed, numerical values other than one or a plurality of predetermined compression target values are output as they are, and for the compression target numerical values, the compression target numerical values and the same compression target numerical values as the compression target numerical values are output. A lossless compression process including an encoding process for encoding and outputting a numerical value representing the continuous number of
The irreversible compression processing unit
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 first 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 comprising: an irreversible compression unit that performs irreversible compression processing on the second compressed data created by the thinning processing unit.
JP2005176447A 2005-06-15 2005-06-16 Data compression apparatus and data compression program Active JP4629512B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005176447A JP4629512B2 (en) 2005-06-16 2005-06-16 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
JP2005176447A JP4629512B2 (en) 2005-06-16 2005-06-16 Data compression apparatus and data compression program

Publications (2)

Publication Number Publication Date
JP2006352548A true JP2006352548A (en) 2006-12-28
JP4629512B2 JP4629512B2 (en) 2011-02-09

Family

ID=37647899

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP4629512B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013146907A (en) * 2012-01-18 2013-08-01 Kyocera Document Solutions Inc Image forming apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62247677A (en) * 1986-04-18 1987-10-28 Fuji Photo Film Co Ltd Compression processing method for picture data
JPH05183443A (en) * 1991-12-27 1993-07-23 Pfu Ltd Code conversion method
JPH08265752A (en) * 1995-03-24 1996-10-11 Nec Corp Picture data transfer system
JPH1198512A (en) * 1997-09-18 1999-04-09 Sanyo Electric Co Ltd Image coder and image coding method
JPH11243343A (en) * 1998-02-25 1999-09-07 Victor Co Of Japan Ltd Variable-length encoding method, variable-length decoding method and variable-length code recording medium
JP2004200893A (en) * 2002-12-17 2004-07-15 Fuji Xerox Co Ltd Encoder, encoding method, and encoding program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62247677A (en) * 1986-04-18 1987-10-28 Fuji Photo Film Co Ltd Compression processing method for picture data
JPH05183443A (en) * 1991-12-27 1993-07-23 Pfu Ltd Code conversion method
JPH08265752A (en) * 1995-03-24 1996-10-11 Nec Corp Picture data transfer system
JPH1198512A (en) * 1997-09-18 1999-04-09 Sanyo Electric Co Ltd Image coder and image coding method
JPH11243343A (en) * 1998-02-25 1999-09-07 Victor Co Of Japan Ltd Variable-length encoding method, variable-length decoding method and variable-length code recording medium
JP2004200893A (en) * 2002-12-17 2004-07-15 Fuji Xerox Co Ltd Encoder, encoding method, and encoding program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013146907A (en) * 2012-01-18 2013-08-01 Kyocera Document Solutions Inc Image forming apparatus

Also Published As

Publication number Publication date
JP4629512B2 (en) 2011-02-09

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
US20060176196A1 (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
JP4173498B2 (en) Data compression apparatus and data compression program
JP4173505B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4181147B2 (en) Data compression apparatus and data compression program
JP4377351B2 (en) Data compression apparatus and data compression program
JP2008035230A (en) Data compression apparatus and data compression program
JP4131969B2 (en) Data compression apparatus and data compression program
JP4131970B2 (en) Data compression apparatus and data compression program
JP4741317B2 (en) Data compression apparatus and data compression program
JP2005277932A (en) Device and program for compressing data
JP4699307B2 (en) Data compression apparatus and data compression program
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
JP2005252531A (en) Device and program for compressing data
JP4579793B2 (en) Data compression apparatus and data compression program
JP2005260408A (en) Data compression apparatus and data compression program
JP2006060490A (en) Image compressor and image 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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100927

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

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

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

Free format text: PAYMENT UNTIL: 20131119

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4629512

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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