JPH08204970A - Image data compressing and expanding device - Google Patents

Image data compressing and expanding device

Info

Publication number
JPH08204970A
JPH08204970A JP1089395A JP1089395A JPH08204970A JP H08204970 A JPH08204970 A JP H08204970A JP 1089395 A JP1089395 A JP 1089395A JP 1089395 A JP1089395 A JP 1089395A JP H08204970 A JPH08204970 A JP H08204970A
Authority
JP
Japan
Prior art keywords
block
compressed data
quantization
amount
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1089395A
Other languages
Japanese (ja)
Inventor
Toshiki Ichikawa
俊樹 市川
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 Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP1089395A priority Critical patent/JPH08204970A/en
Publication of JPH08204970A publication Critical patent/JPH08204970A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE: To attain the target compressibility through a single compression processing by quantizing the block image data which underwent the discrete cosine transformation(DCT) based on the quantization tables that satisfy the necessary conditions and applying the entropy coding to the transformation coefficients to compress them. CONSTITUTION: The multilevel image data are divided at a block division part 1, undergo the DCT through a DCT part 2, and are quantized at a quantization part 3 based on plural quantization tables 4. The DCT coefficients are compressed at an entropy coding part 7 and outputted. At the same time, the quantity of compressed data measured at a compressed data quantity measurement part 9 is compared with the target compressed data quantity of a target compressed data quantity storage device 10 to select one of those corresponding tables 4 at a comparison processing part 11. Thus the target compressibility is attained by a single compression processing not by two operations carried out for every block.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、デジタル的に画像を処
理する装置に関するものである。例えば、スキャナー等
の画像読取装置などから読み込まれた多値の画像データ
を符号化することにより画像データを圧縮する装置、及
び、この圧縮された画像データを伸長する装置に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital image processing apparatus. For example, the present invention relates to an apparatus for compressing image data by encoding multi-valued image data read from an image reading apparatus such as a scanner, and an apparatus for decompressing the compressed image data.

【0002】[0002]

【従来の技術】高解像度のフルカラーデータなどを印刷
する事ができるプリント装置や、表示する事できる表示
装置などが近年普及してきたが、高解像度のフルカラー
データは、情報量が大きい為、記憶装置に保存する為に
は大量の格納するエリアが必要になる。
2. Description of the Related Art Printing devices capable of printing high-resolution full-color data and display devices capable of displaying have become popular in recent years. However, since high-resolution full-color data has a large amount of information, storage devices A large amount of storage area is required to save in.

【0003】例えば、A3の用紙サイズで、画素色がイ
エロー,マゼンタ,シアン及び黒の4色からなり、各画
素色が8ビットで表現される解像度が400dpi(d
otper inch)のフルカラーの画像データで
は、128Mbyteの格納するエリアが必要になり、
これをメモリに保存しようとすると、非常に大容量のメ
モリが必要となり、製造コストの上昇を招く。
For example, with a paper size of A3, the pixel color is composed of four colors of yellow, magenta, cyan and black, and the resolution in which each pixel color is represented by 8 bits is 400 dpi (d).
The area for storing 128 Mbytes is required for full-color image data of
If this is to be stored in the memory, a very large capacity memory is required, resulting in an increase in manufacturing cost.

【0004】そこで、画像を符号化して圧縮し、画像の
情報量を減らし、画像の格納するエリアを減らすことに
より、コストを下げる工夫が従来からなされてきた。
Therefore, there has been conventionally devised a method of reducing the cost by encoding and compressing the image to reduce the information amount of the image and the area for storing the image.

【0005】特に、画像を圧縮する符号化方式として、
国際標準化方式としてJPEG(Joint Phot
ograph Experts Group)で、提案
されたベースラインシステムがある。この方式は、画像
データを離散コサイン変換(以下DCT変換と称する)
した後の量子化係数をHuffman符号化してデータ
量を減らす方式である。これについて詳細に述べる。
Particularly, as an encoding method for compressing an image,
As an international standardization method, JPEG (Joint Photo)
There is a proposed baseline system at ograph Experts Group). In this method, image data is subjected to discrete cosine transform (hereinafter referred to as DCT transform).
In this method, the quantized coefficient after the Huffman coding is performed to reduce the data amount. This will be described in detail.

【0006】図10は、従来のJPEGで提案された圧
縮方式を模式的に示すブロック図である。先ず、画像デ
ータを8×8画素の単位で読み込む。これをpixel
(x,y)とする(但し、x=0〜7、y=0〜7)。
この画像データの例を図11に示す。次に、図10のD
CT演算部2では、下記の式(1)で示すDCT演算を
施して、空間周波数成分DCT係数であるDCT(i,
j)を得る(但し、i=0〜7、j=0〜7)。
FIG. 10 is a block diagram schematically showing a compression method proposed by the conventional JPEG. First, the image data is read in units of 8 × 8 pixels. This is pixel
(X, y) (where x = 0 to 7, y = 0 to 7).
An example of this image data is shown in FIG. Next, D in FIG.
In the CT calculation unit 2, DCT calculation represented by the following equation (1) is performed, and DCT (i,
j) is obtained (however, i = 0 to 7, j = 0 to 7).

【0007】[0007]

【数1】 このDCT演算結果は図12で示される。ここで、DC
T演算の性質から原点DCT(0,0)から離れるに従
って、高い周波数を表すようになる。ここで、原点DC
T(0,0)は、DC成分と呼び、それ以外をAC成分
と呼ぶことにする。
[Equation 1] The result of this DCT calculation is shown in FIG. Where DC
Due to the nature of the T calculation, the higher the frequency, the higher the frequency becomes. Where origin DC
T (0,0) is called a DC component, and the other components are called AC components.

【0008】人間の視覚の性質から、低周波成分は知覚
されやすいためより重要であり、高周波成分はあまり知
覚されない。そこで、高周波成分を0にするようにし、
低周波成分は残すことにより画像圧縮するという手法が
考えられる。JPEGでは、DCT(i,j)の高周波
成分(すなわち、i+jがより大きい成分)を、なるべ
く0にするような量子化を施す。量子化された結果をQ
V(i,j)とし、量子化テーブルをQuantum
(i,j)とすると、 QV(i,j)=Round[DCT(i,j)/Qu
antum(i,j)] という式で表される。但しRound〔 〕は、丸め関
数である。量子化テーブルの例を図13に示す。図13
から判るように、高周波ほど(すなわち、i+jが大き
いほど)テーブルの値が大きくなっている。つまり、量
子化テーブルの値で、DCT成分を割った結果のQV
は、高周波成分ほど0になるように、テーブルを作って
いる。図14は、量子化された後のDCT係数の値を示
す。図14から、高周波成分がほとんど0になっている
のが判る。この量子化されたデータQVに対して、Hu
ffman符号化などのエントロピー圧縮処理を施すこ
とにより、1/10〜1/100の画像圧縮をする事が
できる。
Due to the nature of human vision, low-frequency components are more important because they are easily perceived, and high-frequency components are less perceptible. Therefore, set the high frequency component to 0,
A method of compressing the image by leaving the low frequency component is conceivable. In JPEG, quantization is performed so that the high frequency component of DCT (i, j) (that is, the component with larger i + j) is set to 0 as much as possible. Q is the quantized result
Let V (i, j) be the quantization table Quantum
If (i, j), then QV (i, j) = Round [DCT (i, j) / Qu
Quantum (i, j)]. However, Round [] is a rounding function. FIG. 13 shows an example of the quantization table. FIG.
As can be seen from the above, the higher the frequency (that is, the larger i + j is), the larger the table value is. That is, the QV obtained by dividing the DCT component by the value in the quantization table.
Creates a table so that the higher the frequency component, the closer to zero. FIG. 14 shows the value of the DCT coefficient after being quantized. It can be seen from FIG. 14 that the high frequency component is almost zero. For this quantized data QV, Hu
By performing entropy compression processing such as ffman encoding, image compression of 1/10 to 1/100 can be performed.

【0009】圧縮された画像を復元するためには、量子
化したデータを逆量子化して、DCT係数を導き出す。
但し、圧縮時にDCT係数を量子化テーブルの値で割っ
た値に丸めてている為、DCT係数は完全には復元しな
い。これが画質の劣化になるが、量子化テーブルの値が
大きければ大きいほど、まるめ誤差が大きいため、画質
の劣化が大きくなる。それに逆比例して、量子化テーブ
ルの値が大きければ、大きいほど圧縮率が大きいという
関係が成り立つ。復元されたDCT係数に対して下記の
式(2)に示す逆DCT演算を施すことにより、圧縮デ
ータは元の画像に戻る。
In order to restore the compressed image, the quantized data is dequantized to derive the DCT coefficient.
However, since the DCT coefficient is rounded to a value divided by the value in the quantization table during compression, the DCT coefficient is not completely restored. Although this causes deterioration of image quality, the larger the value of the quantization table is, the larger the rounding error is, and thus the deterioration of image quality becomes larger. In inverse proportion to this, the larger the value of the quantization table, the larger the compression ratio. The compressed data is restored to the original image by performing the inverse DCT operation shown in the following equation (2) on the restored DCT coefficient.

【0010】[0010]

【数2】 上記の例で判る通りに、圧縮率は、画像データの性質と
量子化テーブルの値で決まる。画像データの性質で考え
れば、雲一つない青い空の写真を圧縮する場合には、ほ
とんどが低周波成分で、高周波成分がない為圧縮率が高
い。逆に、1ビットごとに色が変化するような画像の場
合には、高周波成分が多いため、圧縮率は相対的に低く
なる。
[Equation 2] As can be seen from the above example, the compression rate is determined by the property of the image data and the value of the quantization table. Considering the nature of the image data, when compressing a blue sky without clouds, most of the images have low frequency components, and there is no high frequency component, so the compression rate is high. On the contrary, in the case of an image in which the color changes bit by bit, there are many high frequency components, and the compression rate is relatively low.

【0011】また、上述したように、量子化テーブルの
値を大きくすれば、丸めて捨てられるデータが多い分だ
け、相対的に圧縮率が高くなる。そのかわりに、画質の
劣化は大きくなる。この圧縮と画質の関係を示したもの
が表1と表2である。
Further, as described above, if the value of the quantization table is increased, the compression rate becomes relatively high as much data is rounded and discarded. Instead, the image quality is greatly degraded. Tables 1 and 2 show the relationship between this compression and image quality.

【0012】[0012]

【表1】 [Table 1]

【表2】 ここで、JPEGの圧縮方式を使用して、ある大きさの
記憶容量を持つ記憶装置にカラー画像データを格納する
為に、目標の圧縮率を実現する場合を考える。この時に
問題になるのは、表1と表2の関係である。注目しなけ
ればならないのは、一つは、入力画像データによって圧
縮率が大きく違うということである。二つ目は、圧縮率
を上げようとして量子化テーブルの値を上げると画質が
劣化することである。ある目標の圧縮率を実現する場合
に、あらゆる画像データで、満足する量子化テーブルを
選ぼうとすれば、最も圧縮率の悪い画像データを満足す
る量子化テーブルを選ばなければならない為、画質を犠
牲にする事になる。逆に、画質を優先すれば、圧縮率を
満足できない場合がでてくる。
[Table 2] Here, consider a case where a target compression rate is realized in order to store color image data in a storage device having a certain storage capacity using the JPEG compression method. The problem at this time is the relationship between Table 1 and Table 2. One thing to note is that the compression rate varies greatly depending on the input image data. The second is that if the value of the quantization table is increased in order to increase the compression rate, the image quality will deteriorate. In order to achieve a certain target compression rate, if you want to select a quantization table that satisfies all image data, you have to select the quantization table that satisfies the image data with the worst compression rate. It will be a sacrifice. On the contrary, if the image quality is prioritized, the compression rate may not be satisfied.

【0013】そこで、考えられるのは、入力画像に応じ
て量子化テーブルを変える事によって、画質と圧縮率を
満足させる方法である。たとえば、大部分が低周波成分
の画像は量子化テーブルの値が小さいものを選び、高周
波成分の多い画像は量子化テーブルの値が大きいものを
選ぶ。しかし、この場合に問題になるのは、画像データ
を圧縮し終わらないと、どの程度の圧縮率になるのか把
握できないので、どの量子化テーブルを使えば最適な量
子化を行なうことができるか分からないことである。
Therefore, a conceivable method is to satisfy the image quality and the compression rate by changing the quantization table according to the input image. For example, an image with mostly low frequency components is selected with a small value in the quantization table, and an image with many high frequency components is selected with a large value in the quantization table. However, the problem in this case is that it is impossible to know what the compression ratio will be until the image data is compressed, so it is difficult to know which quantization table can be used for optimal quantization. That is not the case.

【0014】この問題を回避する為に、まず1回、ある
平均的な量子化テーブルを使って画像データを圧縮して
圧縮率を測定し、もし満足のいく圧縮率でなければ、再
度良い値が得られると予測される量子化テーブルを選ん
で圧縮を行うことが考えられる。このように、2回圧縮
する手間をかければ、ほぼ目標の圧縮率に到達する事が
できる。
In order to avoid this problem, the image data is first compressed using a certain average quantization table and the compression ratio is measured. If the compression ratio is not satisfactory, a good value is re-established. It is conceivable to select a quantization table that is predicted to obtain In this way, if it takes time to compress twice, the target compression rate can be almost reached.

【0015】しかしながら、圧縮処理を2回行なうとい
う手間をかけることは、圧縮時間のロスになる為、1回
で目標の圧縮率に到達する方式が望まれる。このような
1回の処理で目標の圧縮率に到達する方式が特開平6−
22152号公報で提案されている。同公報に記載の画
像処理装置における例を図15に示す。この方式では、
まず画像データをブロック分割部1でいくつかの同じ大
きさのブロックに分ける。分ける単位は、装置によって
任意に設定すればよいが、最小単位は、8×8のJPE
G圧縮の単位ブロック以上でなければならない。また、
圧縮していく順番に、連続的に連なったブロックでなけ
ればならない。ここでは、便宜的に4×4の16区画に
分割し、圧縮していく順番に、B(1),B(2),B
(3),......,B(16)と名前を付ける。画
像データはブロック分割部1で複数ブロックに分割さ
れ、ブロック単位でDCT演算部2よりDCT変化され
DCT係数が生成される。このDCT係数は、複数の量
子化テーブル4のいずれかを使用して量子化された後、
エントロピー符号化部7により符号化される。また、圧
縮後のデータのブロック毎の累積が累積計測部8で計測
され、この計測結果に基づいて量子化テーブル4がダイ
ナミックに切り替えられる。以下、この量子化テーブル
の切替え制御について、図16を参照して説明する。
However, since it takes a lot of time and effort to perform the compression process, the compression time is lost. Therefore, it is desirable that the target compression rate be reached once. A method in which the target compression rate is reached by such one-time processing is disclosed in Japanese Patent Laid-Open No. 6-
22152 publication. An example of the image processing apparatus described in the publication is shown in FIG. With this method,
First, the image data is divided by the block division unit 1 into several blocks of the same size. The unit to be divided may be arbitrarily set depending on the device, but the minimum unit is 8 × 8 JPE.
It must be greater than or equal to the unit block for G compression. Also,
It must be a continuous block in the order of compression. Here, for the sake of convenience, B (1), B (2), and B (1), B (2), and B
(3) ,. . . . . . , B (16). The image data is divided into a plurality of blocks by the block division unit 1, and the DCT operation unit 2 performs DCT change on a block-by-block basis to generate DCT coefficients. The DCT coefficient is quantized using one of the plurality of quantization tables 4,
It is encoded by the entropy encoding unit 7. Further, the cumulative measurement unit 8 measures the accumulation of the compressed data for each block, and the quantization table 4 is dynamically switched based on the measurement result. Hereinafter, this quantization table switching control will be described with reference to FIG.

【0016】画像全体を圧縮した時に、目標にする圧縮
されたデータ量をMとすると、平均の1ブロックデータ
量はM/16となる。Nブロック目まで圧縮された時の
B(1)〜B(N)までのトータルの圧縮データ量MT
(N)が(M/16)×N=MT (N)(実線A参照)
になるように圧縮率を制御すれば、最終的なデータ量は
目標のデータ量になる。圧縮量を制御する為には、量子
化テーブル4を適宜切り替える必要がある。この為に、
圧縮後のデータの累積が累積計測部8で計測され、Nブ
ロック目の圧縮が終了した時に、目標累積圧縮量M
T (N)と、実際のB(1)〜B(N)までのトータル
の圧縮データ量M(N)を比較し、もし、MT (N)>
M(N)であれば(破線B参照)、圧縮量が目標値より
も小さいので、より圧縮率が小さくなるような量子化テ
ーブルを選択して、次のN+1ブロック目の圧縮率を制
御する。逆に、MT (N)<M(N)であれば(一点鎖
線C参照)圧縮量が目標値よりも大きいので、より圧縮
率が高くなるような量子化テーブルを選択して、次のN
+1ブロック目の圧縮率を制御する。
When the target compressed data amount is M when the entire image is compressed, the average one block data amount is M / 16. Total compressed data amount M T of B (1) to B (N) when compressed to the Nth block
(N) is (M / 16) × N = M T (N) (see solid line A)
If the compression ratio is controlled so that the final data amount becomes the target data amount. In order to control the amount of compression, it is necessary to switch the quantization table 4 appropriately. Because of this,
The cumulative measurement unit 8 measures the cumulative amount of data after compression, and when the compression of the Nth block is completed, the target cumulative compression amount M
T (N) is compared with the actual total compressed data amount M (N) of B (1) to B (N), and if M T (N)>
If it is M (N) (see the broken line B), the compression amount is smaller than the target value, so that a quantization table that reduces the compression rate is selected to control the compression rate of the next N + 1th block. . On the contrary, if M T (N) <M (N) (see the alternate long and short dash line C), the compression amount is larger than the target value. Therefore, a quantization table that gives a higher compression rate is selected and N
The compression rate of the + 1st block is controlled.

【0017】このように、予め設定された圧縮データの
累積の程度と、実際の圧縮データの累積の程度とを比較
し、その比較結果に応じて次のブロックの圧縮率を制御
することにより、最終的には圧縮後のデータ量は目標の
圧縮データ量となる。
In this way, by comparing the preset degree of accumulation of compressed data with the actual degree of accumulation of compressed data and controlling the compression rate of the next block according to the comparison result, Finally, the amount of data after compression becomes the target amount of compressed data.

【0018】上述した従来の圧縮率制御方式において
は、ブロックの累積圧縮量を目標圧縮データ量を比較
し、その比較結果に基づいて次のブロックに対する量子
化テーブルを切り替えている。このため、現在圧縮して
いるブロックの圧縮率と無関係に量子化テーブルが決め
られることになり、処理中の画像の内容に適した圧縮処
理を行なうことができないという不都合があった。
In the above-described conventional compression rate control method, the cumulative compression amount of a block is compared with the target compressed data amount, and the quantization table for the next block is switched based on the comparison result. Therefore, the quantization table is determined irrespective of the compression rate of the block currently being compressed, and there is the inconvenience that the compression process suitable for the content of the image being processed cannot be performed.

【0019】例えば、図17のような全体で30ブロッ
クの高周波成分が多い画像と低周波成分の多い画像が交
互に発生するような画像データがあると仮定する。図1
8は、この画像を圧縮する為に使う量子化テーブルの切
り替えを表している。table0は、圧縮率の良い場
合に使う量子化テーブルで、相対的に画質はよくなる。
また、table2は、圧縮率の悪い場合に使う量子化
テーブルで、相対的に画質は悪くなる。tablel
は、table2とtable0の間の中間的な量子化
テーブルである。
For example, it is assumed that there is image data such that an image having many high frequency components of 30 blocks and an image having many low frequency components are alternately generated as shown in FIG. FIG.
Reference numeral 8 represents switching of the quantization table used for compressing this image. table0 is a quantization table used when the compression rate is good, and the image quality is relatively good.
Table 2 is a quantization table used when the compression rate is poor, and the image quality is relatively poor. table
Is an intermediate quantization table between table2 and table0.

【0020】理想的には、高周波成分の多い圧縮率の小
さいブロックではtable2を使い、低周波成分の多
い圧縮率の高いブロックでは、table0を使うこと
により、1ブロックで圧縮されるデータ量を等しくして
いくほうが、相対的には画質が良くなる。
Ideally, table 2 is used for a block having a large amount of high frequency components and a small compression ratio, and table 0 is used for a block having a large amount of low frequency components and a high compression ratio, so that the amount of data compressed in one block is equal. The better the image quality, the better.

【0021】ところが、図18から判る通り、累積デー
タで圧縮率を制御する場合には、現在圧縮されているデ
ータの圧縮率とは無関係に、累積された圧縮データ量に
基づいて量子化テーブルを選択しているため、処理中の
画像の内容に適した圧縮処理を行なうことができず、画
質が劣化するという問題がある。
However, as can be seen from FIG. 18, when the compression rate is controlled by the accumulated data, the quantization table is calculated based on the accumulated compressed data amount regardless of the compression rate of the currently compressed data. Since the selection is made, the compression processing suitable for the content of the image being processed cannot be performed, and there is a problem that the image quality is deteriorated.

【0022】すなわち、図17及び図18の例において
は、最初の幾つかのブロックでは、画像データの周波数
成分が高いため圧縮後のデータ量も多くなっており、圧
縮率の高い量子化テーブルtable2が選択されてい
る。しかし、高い周波数成分を有するブロックが終わっ
ても、累積の圧縮データ量が目標圧縮データ量より多い
場合には、低い周波数成分のブロックになっても暫くは
table2が選択され続ける。このため、データ量が
少ない低い周波数成分のブロックが高い圧縮率で圧縮さ
れることになり、伸長時の画像の画質が劣化する。
That is, in the examples of FIGS. 17 and 18, the first few blocks have a large amount of data after compression because the frequency component of the image data is high, and the quantization table table2 having a high compression rate is used. Is selected. However, even if the block having the high frequency component ends, if the cumulative amount of compressed data is larger than the target amount of compressed data, table 2 continues to be selected for a while even if the block has the low frequency component. For this reason, a block of a low frequency component having a small amount of data is compressed at a high compression rate, and the image quality of the image at the time of decompression deteriorates.

【0023】[0023]

【発明が解決しようとする課題】そこで本発明は、1回
の圧縮処理で目標の圧縮率を達成することができ、しか
も、画質の劣化を防止することができる画像圧縮及び伸
長装置を提供することを目的とする。
Therefore, the present invention provides an image compression and decompression device capable of achieving a target compression rate with a single compression process and preventing deterioration of image quality. The purpose is to

【0024】[0024]

【課題を解決するための手段】本発明の画像データ圧縮
装置は、前記目的を達成するため、多値画像を複数のブ
ロックに分割してブロックごとに入力する手段と、入力
したブロック毎の多値画像を変換符号化して変換係数を
得る手段と、互いに異なる量子化データを有する複数の
量子化テーブルと、変換係数を前記複数の量子化テーブ
ルの中の選択された量子化テーブルを使用して量子化す
る手段と、量子化した変換係数をエントロピー符号化し
て圧縮する手段と、分割した1ブロックの圧縮データ量
を計測する手段と、1ブロック当たりの目標の圧縮デー
タ量を保持する手段と、前記1ブロックの圧縮データ量
と前記1ブロック当たりの目標の圧縮データ量を比較
し、その比較結果に応じて前記量子化テーブルを選択す
る手段とを備えていることを特徴とする。
In order to achieve the above-mentioned object, the image data compression apparatus of the present invention divides a multi-valued image into a plurality of blocks and inputs the divided data into each block. A means for transform-encoding the value image to obtain transform coefficients, a plurality of quantization tables having mutually different quantization data, and a transform coefficient selected from the plurality of quantization tables. Means for quantizing, means for entropy-encoding the quantized transform coefficients to compress, means for measuring the amount of compressed data of one divided block, and means for holding a target amount of compressed data for each block, And a means for comparing the compressed data amount of the one block with a target compressed data amount per one block and selecting the quantization table according to the comparison result. It is characterized in.

【0025】また、本発明の画像データ伸長装置は、複
数のブロックに分割された圧縮データをブロックごとに
入力する手段と、入力した圧縮データをエントロピー逆
符号化して量子化した変換係数を得る手段と、互いに異
なる量子化データを有する複数の量子化テーブルと、量
子化した変換係数を前記複数の量子化テーブルの中の選
択された量子化テーブルを使用して逆量子化し変換係数
を得る手段と、変換係数を逆変換符号化して多値画像に
復元する手段と、1ブロック当たりの目標の圧縮データ
量を保持する手段と、分割した1ブロックの圧縮データ
量を計測する手段と、前記1ブロックの圧縮データ量と
前記1ブロック当たりの目標の圧縮データ量を比較し、
その比較結果に応じて前記量子化テーブルを選択する手
段とを備えていることを特徴とする。
The image data decompression device of the present invention further comprises means for inputting the compressed data divided into a plurality of blocks for each block, and means for obtaining the quantized transform coefficient by entropy inverse encoding the input compressed data. A plurality of quantization tables having mutually different quantized data, and means for dequantizing the quantized transform coefficients by using a selected quantization table among the plurality of quantization tables to obtain transform coefficients. , Means for inversely transform-encoding transform coefficients into a multi-valued image, means for holding a target compressed data amount per block, means for measuring the compressed data amount of one divided block, and the one block Comparing the amount of compressed data of and the target amount of compressed data per block,
Means for selecting the quantization table according to the comparison result.

【0026】[0026]

【作用】複数のブロックに分割された画像データは、各
ブロックごとに変換符号化されて変換係数が生成され、
この変換係数が複数の量子化テーブルの中の選択された
量子化テーブルを使用して量子化され、量子化された変
換係数はエントロピー符号化され圧縮される。この圧縮
処理の際には、圧縮後のデータ量がブロック毎に測定さ
れ、予め設定されている1ブロック当たりの目標圧縮デ
ータ量と比較される。圧縮後のデータ量が目標圧縮デー
タ量よりも多い場合には、圧縮率の高い量子化テーブル
が選択され、逆の場合には、圧縮率の低い量子化テーブ
ルが選択される。これにより、ブロック単位で画像の性
質に適した量子化テーブルを使用して圧縮が行なわれ
る。
The image data divided into a plurality of blocks is transform-coded for each block to generate transform coefficients,
The transform coefficient is quantized using a quantization table selected from a plurality of quantization tables, and the quantized transform coefficient is entropy coded and compressed. At the time of this compression processing, the data amount after compression is measured for each block and compared with a preset target compressed data amount per block. When the amount of data after compression is larger than the target amount of compressed data, a quantization table with a high compression rate is selected, and in the opposite case, a quantization table with a low compression rate is selected. As a result, compression is performed block by block using a quantization table suitable for the nature of the image.

【0027】また、圧縮データを伸長する場合には、上
述した圧縮処理と逆の処理が行なわれ、ブロック単位で
画像の性質に適した量子化テーブルを使用して圧縮デー
タが伸長され劣化の少ない画像が復元される。
Further, when decompressing the compressed data, a process reverse to the above-described compression process is performed, and the compressed data is decompressed in block units using a quantization table suitable for the nature of the image, and little deterioration occurs. The image is restored.

【0028】[0028]

【実施例】以下、図面を参照しながら実施例に基づいて
本発明の特徴を具体的に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The features of the present invention will be specifically described below based on embodiments with reference to the drawings.

【0029】図1は、本発明の画像データ圧縮装置の実
施例を示すブロック図である。図1に示す画像データ圧
縮装置は、多値画像を複数のブロックに分割してブロッ
クごとに入力するブロック分割部1と、入力したブロッ
ク毎の多値画像をDCT符号化して変換係数を得るDC
T演算部2と、互いに異なる量子化データを有する複数
の量子化テーブル4と、変換係数を複数の量子化テーブ
ル4の中の選択された量子化テーブルを使用して量子化
する量子化処理部3と、量子化した変換係数をエントロ
ピー符号化して圧縮するエントロピー符号化部7と、分
割した1ブロックの圧縮データ量を計測する圧縮データ
量計測部9、1ブロック当たりの目標の圧縮データ量を
保持する目標圧縮データ量保持部10と、1ブロックの
圧縮データ量と1ブロック当たりの目標の圧縮データ量
を比較し、その比較結果に応じて量子化テーブルのいず
れかを選択する比較処理部11とを備えている。なお、
図15に示される画像データ圧縮装置と対応する部分に
は、同一符号を付している。
FIG. 1 is a block diagram showing an embodiment of the image data compression apparatus of the present invention. The image data compression apparatus shown in FIG. 1 divides a multi-valued image into a plurality of blocks and inputs each block, and a block division unit 1 that performs DCT coding on the input multi-valued image to obtain transform coefficients.
T calculation unit 2, a plurality of quantization tables 4 having different quantized data, and a quantization processing unit that quantizes a transform coefficient using a quantization table selected from the plurality of quantization tables 4. 3, an entropy coding unit 7 for entropy coding and compressing the quantized transform coefficient, a compressed data amount measuring unit 9 for measuring the compressed data amount of one divided block, and a target compressed data amount per one block. The target compressed data amount holding unit 10 to hold and the comparison processing unit 11 that compares the compressed data amount of one block and the target compressed data amount of one block, and selects one of the quantization tables according to the comparison result. It has and. In addition,
Portions corresponding to those of the image data compression apparatus shown in FIG. 15 are designated by the same reference numerals.

【0030】以下、図1に示す画像データ圧縮装置の動
作について説明する。本実施例においては、まず多値画
像データをブロック分割部1により複数の同じ大きさの
ブロックに分ける。分ける単位は、装置によって任意に
設定すればよいが、圧縮方式としてJPEGを採用する
場合には、最小単位は、8×8画素のJPEG圧縮の単
位ブロック以上でなければならない。また、圧縮してい
く順番に、連続的に連なったブロックでなければならな
い。ここでは、便宜的に画像データを4×4の16区画
に分割し、圧縮していく順番に、B(1),B(2),
B(3),.......,B(16)と、名前を付け
る。
The operation of the image data compression apparatus shown in FIG. 1 will be described below. In the present embodiment, first, the multi-valued image data is divided into a plurality of blocks having the same size by the block division unit 1. The unit of division may be arbitrarily set depending on the device, but when JPEG is adopted as the compression method, the minimum unit must be equal to or larger than a unit block of JPEG compression of 8 × 8 pixels. Also, the blocks must be consecutively arranged in the order of compression. Here, for the sake of convenience, the image data is divided into 16 sections of 4 × 4, and in order of compression, B (1), B (2),
B (3) ,. . . . . . . , B (16).

【0031】この画像全体を圧縮した時に、目標にする
圧縮されたデータ量をMとすると、平均の1ブロックデ
ータ量は、M/16となる。この平均の1ブロック当た
りの圧縮データ量をmtとする。そして、N番目のブロ
ックB(N)を圧縮した時の圧縮データ量をm(N)と
する。
When the target compressed data amount is M when the entire image is compressed, the average one block data amount is M / 16. The average amount of compressed data per block is mt. Then, the compressed data amount when the Nth block B (N) is compressed is set to m (N).

【0032】ブロック分割部1で複数ブロックに分割さ
れた画像データを、DCT演算部2で式(1)に従って
離散コサイン変換して変換係数を生成し、この変換係数
を量子化テーブル4のいずれかを使用して量子化する。
更に、この量子化された変換係数は、Huffman符
号等を使用したエントロピー符号化部7により符号化し
ブロック毎に圧縮する。また、圧縮データ量計測部9に
より、ブロック毎の圧縮量を計測する。目標圧縮データ
量保存装置10には、目標圧縮データ量mtが格納され
ており、圧縮データ量計測部9による計測値と目標圧縮
データ量保存装置10の値を比較処理部11において比
較する。そして、比較処理部11の比較結果をもとに、
量子化テーブル4を切り替えて、N+1番目のブロック
では、切り替えられた量子化テーブルを使って圧縮を行
う。
The image data divided into a plurality of blocks by the block dividing unit 1 is discrete cosine transformed by the DCT computing unit 2 according to the equation (1) to generate transform coefficients, and the transform coefficients are stored in one of the quantization tables 4. To quantize.
Further, the quantized transform coefficient is coded by the entropy coding unit 7 using a Huffman code or the like and compressed for each block. Further, the compressed data amount measuring unit 9 measures the compression amount for each block. The target compressed data amount storage device 10 stores the target compressed data amount mt, and the comparison processing unit 11 compares the measured value by the compressed data amount measurement unit 9 with the value of the target compressed data amount storage device 10. Then, based on the comparison result of the comparison processing unit 11,
The quantization table 4 is switched, and the N + 1-th block is compressed using the switched quantization table.

【0033】量子化テーブル4の種類を、例えば5種類
持つとすると、圧縮率の高いものから順に、Table
0,Table1,Table2,Table3,Ta
ble4とする。圧縮率と量子化テーブルの関係は図2
に示すが、高周波成分の多い圧縮率の小さい画像ブロッ
クでは、より圧縮率の高くなる量子化テーブルを選択
し、低周波成分の多い圧縮率の高い画像ブロックでは、
圧縮率の低い量子化テーブルを選んで、画像劣化を極力
防ぐようにする。すなわち、以下の条件で量子化テーブ
ルを選択すればよい。
Assuming that the quantization table 4 has five types, for example, the table having the highest compression rate is used in the order of Table.
0, Table1, Table2, Table3, Ta
ble4. The relationship between the compression rate and the quantization table is shown in FIG.
, The quantization table with the higher compression rate is selected for the image block with many high frequency components and the low compression rate, and the image table with the high compression rate with many low frequency components is selected.
Select a quantization table with a low compression rate to prevent image deterioration as much as possible. That is, the quantization table may be selected under the following conditions.

【0034】 mt+β<m(N) の時に Table0 を選択 mt+α<m(N)≦mt+β の時に Tablel を選択 mt−α≦m(N)≦mt+α の時に Table2 を選択 mt−β≦m(N)<mt−α の時に Table3 を選択 m(N)<mt−β の時に Table4 を選択 ただし、αは、ブロック平均圧縮量(目標値)mtから
Table2が受け持つ圧縮データ量の上限及び下限ま
での距離であり、βはmtから、Table1が受け持
つ圧縮データ量の上限及びTable3が受け持つ圧縮
データ量の下限までの距離である。αとβの値について
は、それぞれの装置に合わせて、最適な値を任意に選ん
でよい。比較処理部11は上記の比較を行い、その比較
結果に応じてテーブルを選択する。
When mt + β <m (N), Table0 is selected. When mt + α <m (N) ≦ mt + β, Table1 is selected. When mt−α ≦ m (N) ≦ mt + α, Table2 is selected mt-β ≦ m (N). <Table 3 is selected when mt-α is selected. Table 4 is selected when m (N) <mt-β is set. However, α is a distance from the block average compression amount (target value) mt to the upper and lower limits of the compressed data amount that Table 2 handles. Where β is the distance from mt to the upper limit of the compressed data amount that Table1 is responsible for and the lower limit of the compressed data amount that Table3 is responsible for. Regarding the values of α and β, the optimum values may be arbitrarily selected according to each device. The comparison processing unit 11 performs the above comparison and selects a table according to the comparison result.

【0035】従来技術では、圧縮された画像データの累
積したものと、目標にする圧縮されたデータ量の累積と
の比較を行って量子化テーブルを決めていたが、本実施
例では、上述したように、個々のブロックでの圧縮デー
タ量と、目標にする圧縮データ量との比較を行なって、
次に使う量子化テーブルを決定している。言いかえれ
ば、この方式では、N+1番目のブロックで使う量子化
テーブルが、一つ前のN番目のブロックでの圧縮率を基
準にして決定されている。隣合ったブロック間の画像の
性質は類似していると推測されるので、N番目のブロッ
クの画像の圧縮率をもとに、N+1番目のブロックの量
子化テーブルを決定することにより、画像の内容に応じ
た適正な圧縮が行なわれ、圧縮データの伸長時に劣化の
少ない画像を再現できる。なお、1番目のブロックは、
圧縮された一つ前のブロックがないので、中間的な量子
化テーブルであるTable2を使って圧縮する。ただ
し、装置によって、1番目のブロックの量子化テーブル
を任意に決めてよい。本実施例は、上記方法により画像
劣化を極力少なくするようにしながら、目標の圧縮率を
達成できる。図3は、図17に示される画像データに対
して本発明において選択される量子化テーブルを示すグ
ラフである。
In the prior art, the quantization table is determined by comparing the cumulative amount of compressed image data with the cumulative amount of the target compressed data amount. In this way, compare the amount of compressed data in each block with the target amount of compressed data,
The quantization table to be used next is determined. In other words, in this method, the quantization table used in the (N + 1) th block is determined on the basis of the compression rate in the immediately preceding Nth block. Since it is estimated that the properties of images between adjacent blocks are similar to each other, the quantization table of the N + 1th block is determined based on the compression rate of the image of the Nth block to determine the image quality of the image. Appropriate compression according to the content is performed, and an image with little deterioration can be reproduced when decompressing the compressed data. The first block is
Since there is no previous compressed block, compression is performed using Table2, which is an intermediate quantization table. However, the quantization table of the first block may be arbitrarily determined by the device. In the present embodiment, the target compression rate can be achieved while minimizing the image deterioration by the above method. FIG. 3 is a graph showing a quantization table selected in the present invention for the image data shown in FIG.

【0036】圧縮されたデータについては、通常のJP
EGデータ形式の他に、量子化テーブルが追加される。
通常のJPEGのデータでは、量子化テーブルは一つで
あるが、本実施例では、複数の量子化テーブルを使用す
る為、すべての量子化テーブルを付加する。それ以外
は、見掛け上通常のJPEGデータと異なるところはな
い。図4に、N個の量子化テーブルを使用した場合の本
発明におけるデータ形式の例を示す。
For compressed data, a normal JP
In addition to the EG data format, a quantization table is added.
In the case of normal JPEG data, there is one quantization table, but in this embodiment, since a plurality of quantization tables are used, all quantization tables are added. Other than that, there is no apparent difference from normal JPEG data. FIG. 4 shows an example of the data format in the present invention when N quantization tables are used.

【0037】図5及び図6は、上述した圧縮動作を示す
フローチャートである。図示しない記憶装置からの画像
データをブロック分割部1で複数ブロックに分割し、N
ブロック目の画像データを読み込む (ステップ10
1)。読み込んだブロックが1ブロック目である場合に
は (ステップ102)、量子化テーブルとしてTabl
e2を選択する (ステップ103)。次に、DCT演算
部2で8×8画素の単位でDCT演算を行いDCT係数
を生成する (ステップ104)。次に、量子化部3にお
いて、先に選択した量子化テーブルを使用して、8×8
画素の単位でDCT係数の量子化を行なう (ステップ1
05)。次に、エントロピー符号化部7において、8×
8画素の単位でHuffman符号化を行い、圧縮デー
タを図示しないメモリに格納する (ステップ106)。
8×8画素の単位の圧縮処理が終了すると、1ブロック
分の処理が終了したか否か判別し (ステップ107)、
終了していない場合には、ステップ104に戻り、8×
8画素の単位で圧縮処理を繰り返す。1ブロック分の処
理が終了すると (ステップ107)、画像データ全体の
処理が終了したか否か判別し (ステップ108)、終了
していない場合には、ステップ101に戻り、次のブロ
ックを読み込んで上述の圧縮処理を繰り返す。
5 and 6 are flow charts showing the above-mentioned compression operation. Image data from a storage device (not shown) is divided into a plurality of blocks by the block division unit 1, and N
Read the image data of the block (step 10
1). If the read block is the first block (step 102), Tabl is used as the quantization table.
e2 is selected (step 103). Next, the DCT calculation unit 2 performs DCT calculation in units of 8 × 8 pixels to generate DCT coefficients (step 104). Next, in the quantizer 3, using the previously selected quantization table, 8 × 8
Quantize the DCT coefficient in pixel units (step 1
05). Next, in the entropy coding unit 7, 8 ×
Huffman coding is performed in units of 8 pixels, and the compressed data is stored in a memory (not shown) (step 106).
When the compression process in units of 8 × 8 pixels is completed, it is determined whether or not the process for one block is completed (step 107),
If not, return to step 104, 8 ×
The compression process is repeated in units of 8 pixels. When the processing for one block is completed (step 107), it is judged whether or not the processing for the entire image data is completed (step 108). If not completed, the processing returns to step 101 to read the next block. The above compression process is repeated.

【0038】2ブロック目以降は、ステップ102から
ステップ109に進み、圧縮データ量計測部9により計
測された圧縮データ量に応じたテーブルを選択し (ステ
ップ109〜117)、同様に圧縮処理を行なう。画像
データ全体の処理が終了したら、処理を終了する。
After the second block, the process proceeds from step 102 to step 109, a table is selected according to the compressed data amount measured by the compressed data amount measuring unit 9 (steps 109 to 117), and the compression process is performed similarly. . When the processing of the entire image data is completed, the processing ends.

【0039】次に伸長装置について説明する。図7は、
本発明の画像データ伸長装置の実施例を示すブロック図
である。本実施例の画像データ伸長装置は、複数のブロ
ックに分割された圧縮データをブロックごとに入力する
ブロック入力部21と、入力した圧縮データをHuff
man符号等を使用してエントロピー逆符号化して量子
化変換係数を得るエントロピー逆符号化部22と、互い
に異なる量子化データを有する複数の量子化テーブル2
4と、量子化変換係数を複数の量子化テーブル24の中
の選択された量子化テーブルを使用して逆量子化し変換
係数を得る逆量子化部23と、変換係数を逆変換符号化
して多値値画像に復元する逆DCT演算部25と、1ブ
ロック当たりの目標の圧縮データ量を保持する圧縮デー
タ量保持部27と、分割した1ブロックの圧縮データ量
を計測する圧縮データ量計測部26と、1ブロックの圧
縮データ量と1ブロック当たりの目標の圧縮データ量を
比較し、その比較結果に応じて量子化テーブル24を選
択する比較処理部28とを備えている。量子化テーブル
24は、図1に示す画像データ圧縮装置の量子化テーブ
ル4に対応するものであり、図2に示されるTable
0〜Table4の特性を有している。
Next, the expansion device will be described. FIG.
It is a block diagram which shows the Example of the image data expansion apparatus of this invention. The image data decompression device according to the present exemplary embodiment includes a block input unit 21 that inputs compressed data divided into a plurality of blocks for each block, and Huff the input compressed data.
An entropy inverse encoding unit 22 that obtains a quantized transform coefficient by performing entropy inverse encoding using a Man code and the like, and a plurality of quantization tables 2 having mutually different quantized data.
4, a dequantization unit 23 that dequantizes a quantized transform coefficient using a quantization table selected from a plurality of quantization tables 24 to obtain a transform coefficient, and a transform coefficient that is inverse-transform-coded to a large number. Inverse DCT operation unit 25 for restoring the value-value image, compressed data amount holding unit 27 for holding a target compressed data amount per block, and compressed data amount measuring unit 26 for measuring the compressed data amount of one divided block. And a comparison processing unit 28 that compares the compressed data amount of one block with the target compressed data amount per one block and selects the quantization table 24 according to the comparison result. The quantization table 24 corresponds to the quantization table 4 of the image data compression apparatus shown in FIG. 1, and is the table shown in FIG.
It has the characteristics of 0 to Table 4.

【0040】圧縮されたデータを伸長する処理は、上述
した圧縮処理とは逆の処理である。この画像データ伸長
処理について、図7のブロック図を参照して以下説明す
る。なお、圧縮データは、B(1),B(2),B
(3),.......B(16)の16ブロックに分
割されていると仮定する。
The process of decompressing the compressed data is the reverse of the above-mentioned compression process. This image data expansion processing will be described below with reference to the block diagram of FIG. 7. The compressed data is B (1), B (2), B
(3) ,. . . . . . . It is assumed that the block is divided into 16 blocks of B (16).

【0041】複数のブロックに分割された圧縮データを
ブロック入力部21によりブロックごとに入力し、入力
した圧縮データをエントロピー逆符号化部22によりエ
ントロピー逆符号化して量子化DCT係数を得る。次
に、この量子化DCT係数を逆量子化部23により複数
の量子化テーブル24の中の選択された量子化テーブル
を使用して逆量子化し量子化する前のDCT係数DCT
(i,j)を得る。
The compressed data divided into a plurality of blocks is input for each block by the block input unit 21, and the input compressed data is entropy inversely encoded by the entropy inverse encoding unit 22 to obtain a quantized DCT coefficient. Next, the quantized DCT coefficient is inversely quantized by the inverse quantization unit 23 using the quantization table selected from the plurality of quantization tables 24, and the DCT coefficient DCT before being quantized
Get (i, j).

【0042】この逆量子化の際に、最初のブロックは、
量子化テーブルとしては中心のTable2を選択する
こととし、2ブロック目以後は、一つ前のブロックの圧
縮データの大きさと、1ブロックの目標圧縮データ量と
を比較して、Table0〜Table4までのどれか
を選択する。選択する基準は、圧縮の例で述べた通りで
ある。
In this inverse quantization, the first block is
As the quantization table, the central Table2 is selected, and after the second block, the size of the compressed data of the immediately preceding block is compared with the target compressed data amount of the one block, and Table0 to Table4 are compared. Select one. The criteria to be selected are as described in the compression example.

【0043】上述した逆量子化は、量子化された結果を
QV(i,j)とし、量子化テーブルをQuantum
(i,j)とすると、 DCT(i,j)=QV(i,j)×Quantum
(i,j) という式で表される。
In the above-described inverse quantization, the quantized result is set to QV (i, j), and the quantization table is set to Quantum.
If (i, j), then DCT (i, j) = QV (i, j) × Quantum
It is represented by the formula (i, j).

【0044】次に、式(2)で示す逆DCT演算を逆D
CT演算部25で行うことにより、元の画像データが復
元される。
Next, the inverse DCT operation shown in equation (2) is inverse D
The original image data is restored by the CT operation unit 25.

【0045】図8及び図9は、上述した伸長動作を示す
フローチャートである。図示しない記憶装置からの圧縮
データのNブロック目をブロック入力部21で読み込む
(ステップ201)。読み込んだブロックが1ブロック
目である場合には (ステップ202)、量子化テーブル
としてTable2を選択する (ステップ203)。次
に、逆エントロピー符号化部22において、8×8画素
の単位で逆Huffman符号化を行い、量子化された
DCT係数を生成する (ステップ204)。次に、逆量
子化部23において、先に選択した量子化テーブルを使
用して、8×8画素の単位で逆量子化を行い量子化前の
DCT係数を得る (ステップ205)。次に、逆DCT
演算部25で8×8画素の単位で逆DCT演算を行って
伸長データを得、この伸長データを図示しないメモリに
格納する (ステップ206)。8×8画素の単位の伸長
処理が終了すると、1ブロック分の処理が終了したか否
か判別し (ステップ207)、終了していない場合に
は、ステップ204に戻り、8×8画素の単位で圧縮処
理を繰り返す。1ブロック分の処理が終了すると (ステ
ップ207)、画像データ全体の処理が終了したか否か
判別し (ステップ208)、終了していない場合には、
ステップ201に戻り、次のブロックを読み込んで上述
の伸長処理を繰り返す。画像データ全体の処理が終了し
たら、処理を終了する。
8 and 9 are flow charts showing the above-described expansion operation. The block input unit 21 reads the Nth block of compressed data from a storage device (not shown).
(Step 201). If the read block is the first block (step 202), Table2 is selected as the quantization table (step 203). Next, the inverse entropy encoding unit 22 performs inverse Huffman encoding in units of 8 × 8 pixels to generate quantized DCT coefficients (step 204). Next, the inverse quantization unit 23 uses the previously selected quantization table to perform inverse quantization in units of 8 × 8 pixels to obtain DCT coefficients before quantization (step 205). Then the inverse DCT
The operation unit 25 performs an inverse DCT operation in units of 8 × 8 pixels to obtain decompressed data, and stores the decompressed data in a memory (not shown) (step 206). When the decompression process in units of 8 × 8 pixels is completed, it is determined whether or not the process for one block is completed (step 207). If not completed, the process returns to step 204 and the unit of 8 × 8 pixels is completed. Repeat the compression process with. When the processing for one block is completed (step 207), it is judged whether or not the processing for the entire image data is completed (step 208).
Returning to step 201, the next block is read and the above decompression processing is repeated. When the processing of the entire image data is completed, the processing ends.

【0046】[0046]

【発明の効果】以上に述べたように、本発明において
は、個々のブロックでの圧縮データ量と、目標にする圧
縮データ量との比較を行なって、次に使う量子化テーブ
ルを決定している。これにより、1回の圧縮処理で、各
ブロック単位で画像の内容に応じた適正な圧縮が行なわ
れ、圧縮データの伸長時に劣化の少ない画像を再現でき
る。
As described above, in the present invention, the compressed data amount in each block is compared with the target compressed data amount to determine the quantization table to be used next. There is. As a result, in one compression process, appropriate compression is performed for each block according to the content of the image, and an image with little deterioration can be reproduced when decompressing the compressed data.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の画像データ圧縮装置の実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing an embodiment of an image data compression device of the present invention.

【図2】 圧縮率と量子化テーブルの関係を示す説明図
である。
FIG. 2 is an explanatory diagram showing a relationship between a compression rate and a quantization table.

【図3】 図17に示される画像データに対して本発明
において選択される量子化テーブルを示すグラフであ
る。
FIG. 3 is a graph showing a quantization table selected in the present invention for the image data shown in FIG.

【図4】 N個の量子化テーブルを使用した場合の本発
明におけるデータ形式の例を示す説明図である。
FIG. 4 is an explanatory diagram showing an example of a data format in the present invention when N quantization tables are used.

【図5】 圧縮動作を示すフローチャートの第1の部分
である。
FIG. 5 is a first part of a flowchart showing a compression operation.

【図6】 圧縮動作を示すフローチャートの第2の部分
である。
FIG. 6 is the second part of the flowchart showing the compression operation.

【図7】 本発明の画像データ伸長装置の実施例を示す
ブロック図である。
FIG. 7 is a block diagram showing an embodiment of an image data decompression device of the present invention.

【図8】 伸長動作を示すフローチャートの第1の部分
である。
FIG. 8 is a first part of a flowchart showing a decompression operation.

【図9】 伸長動作を示すフローチャートの第2の部分
である。
FIG. 9 is a second part of the flowchart showing the decompression operation.

【図10】 従来のJPEGで提案された圧縮方式を模
式的に示すブロック図である。
FIG. 10 is a block diagram schematically showing a compression method proposed by a conventional JPEG.

【図11】 8×8画素の画像データの一例を示す説明
図である。
FIG. 11 is an explanatory diagram showing an example of image data of 8 × 8 pixels.

【図12】 図4に示す画素データから得られた8×8
のDCT係数行列を示す説明図である。
FIG. 12 is 8 × 8 obtained from the pixel data shown in FIG.
5 is an explanatory diagram showing a DCT coefficient matrix of FIG.

【図13】 量子化テーブルを示す説明図である。FIG. 13 is an explanatory diagram showing a quantization table.

【図14】 図6に示す量子化テーブル使って量子化し
た後のデータを示す説明図である。
14 is an explanatory diagram showing data after being quantized using the quantization table shown in FIG. 6. FIG.

【図15】 1回の処理で目標の圧縮率に到達する方式
を採用した従来の画像処理装置を示すブロック図であ
る。
FIG. 15 is a block diagram showing a conventional image processing apparatus that employs a method in which a target compression rate is reached in a single process.

【図16】 目標累積圧縮データ量と実際に計測された
累積圧縮データ量の関係を示すグラフである。
FIG. 16 is a graph showing the relationship between the target cumulative compressed data amount and the actually measured cumulative compressed data amount.

【図17】 ブロック毎の画像データの周波数成分の相
違を示すグラフである。
FIG. 17 is a graph showing a difference in frequency component of image data for each block.

【図18】 図17に示される画像データに対して従来
例において選択される量子化テーブルを示すグラフであ
る。
18 is a graph showing a quantization table selected in the conventional example for the image data shown in FIG.

【符号の説明】[Explanation of symbols]

1…ブロック分割部、2…DCT演算部、3…量子化
部、4…量子化テーブル、5…DC成分符号化部、6…
AC成分符号化部、7…符号化部、8…計測部、9…圧
縮データ量計測部、10…目標圧縮データ量保存部、1
1…比較処理部、21…ブロック入力部、22…逆符号
化部、23…逆量子化部、24…量子化テーブル、25
…逆DCT演算部、26…圧縮データ量計測部、27…
目標圧縮データ量保存部
DESCRIPTION OF SYMBOLS 1 ... Block division part, 2 ... DCT calculation part, 3 ... Quantization part, 4 ... Quantization table, 5 ... DC component coding part, 6 ...
AC component encoding unit, 7 ... Encoding unit, 8 ... Measuring unit, 9 ... Compressed data amount measuring unit, 10 ... Target compressed data amount storage unit, 1
DESCRIPTION OF SYMBOLS 1 ... Comparison processing part, 21 ... Block input part, 22 ... Decoding part, 23 ... Dequantization part, 24 ... Quantization table, 25
Inverse DCT calculation unit, 26 ... Compressed data amount measuring unit, 27 ...
Target compressed data volume storage

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】多値画像を複数のブロックに分割してブロ
ックごとに入力する手段と、 入力したブロック毎の多値画像を変換符号化して変換係
数を得る手段と、 互いに異なる量子化データを有する複数の量子化テーブ
ルと、 変換係数を前記複数の量子化テーブルの中の選択された
量子化テーブルを使用して量子化する手段と、 量子化した変換係数をエントロピー符号化して圧縮する
手段と、 分割した1ブロックの圧縮データ量を計測する手段と、 1ブロック当たりの目標の圧縮データ量を保持する手段
と、 前記1ブロックの圧縮データ量と前記1ブロック当たり
の目標の圧縮データ量を比較し、その比較結果に応じて
前記量子化テーブルを選択する手段とを備えていること
を特徴とする画像データ圧縮装置。
1. A means for dividing a multi-valued image into a plurality of blocks and inputting each block, a means for transform-encoding the input multi-valued image for each block to obtain transform coefficients, and different quantized data from each other. A plurality of quantization tables having; a means for quantizing a transform coefficient using a quantization table selected from the plurality of quantization tables; a means for entropy coding and compressing the quantized transform coefficients; , A means for measuring the amount of compressed data of one divided block, a means for holding a target amount of compressed data for one block, and a comparison of the amount of compressed data for one block with the amount of target compressed data for one block And a means for selecting the quantization table in accordance with the comparison result, the image data compression apparatus.
【請求項2】複数のブロックに分割された圧縮データを
ブロックごとに入力する手段と、 入力した圧縮データをエントロピー逆符号化して量子化
した変換係数を得る手段と、 互いに異なる量子化データを有する複数の量子化テーブ
ルと、 量子化した変換係数を前記複数の量子化テーブルの中の
選択された量子化テーブルを使用して逆量子化し変換係
数を得る手段と、 変換係数を逆変換符号化して多値画像に復元する手段
と、 1ブロック当たりの目標の圧縮データ量を保持する手段
と、 分割した1ブロックの圧縮データ量を計測する手段と、 前記1ブロックの圧縮データ量と前記1ブロック当たり
の目標の圧縮データ量を比較し、その比較結果に応じて
前記量子化テーブルを選択する手段とを備えていること
を特徴とする画像データ伸長装置。
2. A unit for inputting compressed data divided into a plurality of blocks for each block, a unit for entropy-decoding the input compressed data to obtain a quantized transform coefficient, and different quantized data. A plurality of quantization tables, means for dequantizing the quantized transform coefficients using the quantization table selected from the plurality of quantization tables to obtain transform coefficients, and inverse transform coding the transform coefficients A unit for restoring a multi-valued image, a unit for holding a target compressed data amount per block, a unit for measuring the compressed data amount of a divided one block, a compressed data amount for the one block and the one block And a means for comparing the target compressed data amounts and selecting the quantization table according to the comparison result. Place.
JP1089395A 1995-01-26 1995-01-26 Image data compressing and expanding device Pending JPH08204970A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1089395A JPH08204970A (en) 1995-01-26 1995-01-26 Image data compressing and expanding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1089395A JPH08204970A (en) 1995-01-26 1995-01-26 Image data compressing and expanding device

Publications (1)

Publication Number Publication Date
JPH08204970A true JPH08204970A (en) 1996-08-09

Family

ID=11763000

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1089395A Pending JPH08204970A (en) 1995-01-26 1995-01-26 Image data compressing and expanding device

Country Status (1)

Country Link
JP (1) JPH08204970A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004088974A1 (en) * 2003-03-28 2004-10-14 Ricoh Company Ltd. Image compressing apparatus that achieves desired code amount
US7418148B2 (en) 2003-09-29 2008-08-26 Casio Computer Co., Ltd. Image compression method and image compression device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004088974A1 (en) * 2003-03-28 2004-10-14 Ricoh Company Ltd. Image compressing apparatus that achieves desired code amount
US7440630B2 (en) 2003-03-28 2008-10-21 Ricoh Company, Ltd Image compressing apparatus that achieves desired code amount
US7418148B2 (en) 2003-09-29 2008-08-26 Casio Computer Co., Ltd. Image compression method and image compression device

Similar Documents

Publication Publication Date Title
US7664184B2 (en) Interpolation image compression
JP3776921B2 (en) Image coding method
US7751633B1 (en) Method for compressing an image
JP2633793B2 (en) Method and apparatus for variable length encoding / decoding of video data
JP4697967B2 (en) Image coding apparatus and control method thereof
EP0717567A2 (en) Video coder with data rate control
EP2285117A1 (en) Video coder providing implicit coefficient prediction and scan adaption for image coding and intra coding of video
WO1991014295A1 (en) Digital image coding using a random scanning of image frames
JPH10243396A (en) Adaptive quantization method and method for encoding video signal data and system for encoding sampling-processed video signal data
JP3067628B2 (en) Image coding device
US7729551B2 (en) Method for controlling the amount of compressed data
US7149350B2 (en) Image compression apparatus, image depression apparatus and method thereof
US20070019875A1 (en) Method of further compressing JPEG image
JPH10108184A (en) Image data processing unit and its method
JPH08204970A (en) Image data compressing and expanding device
EP1691560A2 (en) Video coder providing implicit coefficient prediction and scan adaption for image coding and intra coding of video
JP4105676B2 (en) How to deblock and transcode media streams
JP4715175B2 (en) Image forming apparatus and method
JPH07236137A (en) Picture encoding control system
JP3190164B2 (en) Code amount estimation device
JP3989343B2 (en) Image processing apparatus, image processing method, and recording medium on which image processing method is recorded
US20070253629A1 (en) Image Processing Device and Image Forming Device Provided therewith
WO1994030002A1 (en) Digital image compression using tile subdivision
JP3017510B2 (en) Compressed data amount control method
JP3199786B2 (en) Image processing device