JP2511669B2 - Compressor for gradation image data - Google Patents

Compressor for gradation image data

Info

Publication number
JP2511669B2
JP2511669B2 JP7977487A JP7977487A JP2511669B2 JP 2511669 B2 JP2511669 B2 JP 2511669B2 JP 7977487 A JP7977487 A JP 7977487A JP 7977487 A JP7977487 A JP 7977487A JP 2511669 B2 JP2511669 B2 JP 2511669B2
Authority
JP
Japan
Prior art keywords
quantization
code
counter
transform coefficient
coefficient
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.)
Expired - Lifetime
Application number
JP7977487A
Other languages
Japanese (ja)
Other versions
JPS63246976A (en
Inventor
久 米川
寛 竹内
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP7977487A priority Critical patent/JP2511669B2/en
Priority to US07/176,769 priority patent/US4922273A/en
Publication of JPS63246976A publication Critical patent/JPS63246976A/en
Application granted granted Critical
Publication of JP2511669B2 publication Critical patent/JP2511669B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はX線写真やCT画像などの医用画像のような階
調画像のデータを圧縮する階調画像データの圧縮装置に
関する。
Description: TECHNICAL FIELD The present invention relates to a gradation image data compression apparatus for compressing gradation image data such as medical images such as X-ray photographs and CT images.

(発明の背景) デジタル技術の進歩に伴ない、階調画像をデジタル化
して保存、伝送したり、種々のデジタル画像処理を施し
たりすることが頻繁に行なわれるようになった。しかし
ながら、階調画像は2値画像に比べて情報量が多く、従
って階調画像をデジタル化したときのデータ量の多さが
問題となっている。特に医用画像では、デジタル化する
ときの画素数および各画素に要するビット数が、たとえ
ば胸部X線写真では400万画素、8〜10ビットと膨大で
あり、データの保存や転送を行なう上で効率が悪い。
(Background of the Invention) With the progress of digital technology, it has become common to digitize and store and transmit gradation images, and to perform various types of digital image processing. However, the gradation image has a large amount of information as compared with the binary image, and therefore the amount of data when digitizing the gradation image is a problem. Especially for medical images, the number of pixels for digitization and the number of bits required for each pixel are enormous, for example, 4 million pixels for chest radiographs, 8 to 10 bits, which is efficient in storing and transferring data. Is bad.

そこで今日、医用画像を含む階調画像の膨大なデータ
を圧縮してコンパクト化するデータ圧縮技術が脚光を浴
びている。
Therefore, today, a data compression technique for compressing enormous data of a gradation image including a medical image to make it compact has been spotlighted.

データ圧縮技術は大きく分けて可逆圧縮と非可逆圧縮
とに分類されるが、可逆圧縮では1/2〜1/3程度の低い圧
縮率しか望めないため、1/5以上の高い圧縮率が得られ
る非可逆圧縮方式、特に変換符号化方式が注目されてい
る。
Data compression technologies are roughly classified into lossless compression and lossy compression, but lossless compression can only achieve a low compression rate of 1/2 to 1/3, so a compression rate of 1/5 or higher can be obtained. The irreversible compression method, especially the transform coding method, has attracted attention.

変換符号化とは、画像全体を小さなブロックに分割し
ブロック単位に直交変換を施し、これにより得られた変
換係数を量子化し、符号化する非可逆圧縮方式の1つで
あり、階調画像を圧縮するのに最も適した圧縮方法であ
る。
Transform coding is one of lossy compression methods in which the entire image is divided into small blocks, orthogonal transform is performed in block units, and the transform coefficients obtained by this are quantized and coded. This is the most suitable compression method for compression.

変換符号化において、変換係数の交流成分の分布は、
ゼロにピークを持つガウス分布に近似されることが知ら
れており、このような分布を持つ変換係数の量子化を量
子化判定レベルにゼロを含むMid−riser型量子化と,量
子化出力レベルにゼロを含むMid−trace型量子化とに分
類した場合、Mid−trace型量子化の方がブロック内のラ
ンダムノイズが少なくてより好ましいことが報告されて
いる。
In transform coding, the distribution of the AC component of the transform coefficient is
It is known to be approximated to a Gaussian distribution with a peak at zero, and the quantization of transform coefficients with such a distribution is Mid-riser type quantization that includes zero in the quantization decision level, and the quantization output level. It has been reported that when classified into Mid-trace type quantization including zero in 0, Mid-trace type quantization is preferable because it has less random noise in a block.

また変換符号化では画像のブロック化を行なうため、
各ブロックの画像の性質にかなりのバラツキが生じるた
め、全ブロックを同一条件で圧縮するのは効率が悪い。
そこで適当なパラメータを用いてブロックをいくつかの
クラスに分類するクラス分け処理を行ない、各クラスに
最適な条件で圧縮を行なう方法が提案されている(たと
えばWen−Hsiung ChenおよびC.Harrison Smith共著“Ad
aptive Coding of Monochrome and Color Images"IEEE
transactions on Communications,Vol.Com−25,No.11−
Nov.1977)。
Also, in transform coding, since the image is divided into blocks,
Compressing all blocks under the same conditions is inefficient because the image properties of each block vary considerably.
Therefore, a method has been proposed in which blocks are classified into several classes using appropriate parameters, and compression is performed under optimal conditions for each class (for example, by Wen-Hsiung Chen and C. Harrison Smith). "Ad
aptive Coding of Monochrome and Color Images "IEEE
transactions on Communications, Vol.Com-25, No. 11-
Nov.1977).

しかしながら従来の圧縮装置ではクラス分け、量子
化、符号化という処理順序が固定されていたため、クラ
ス分けの結果に基づいて量子化幅を変化させる場合、ク
ラスごとに異なる量子化演算を必要とし、量子化装置が
複雑になるという問題があった。またクラス分け処理を
変換係数の四則演算により行なっていたため、クラス分
け装置が複雑となり、クラス分け処理に要する時間が無
視できなかった。また量子化が、クラス分け処理後に行
なわれるため、量子化によるデータの丸めがクラス分け
に反映しないという欠点もあった。
However, in the conventional compression device, the processing order of class classification, quantization, and encoding is fixed. Therefore, when changing the quantization width based on the result of class classification, different quantization operations are required for each class, and There was a problem that the computerization device became complicated. Further, since the classification processing is performed by the four arithmetic operations of the conversion coefficient, the classification apparatus becomes complicated and the time required for the classification processing cannot be ignored. In addition, since the quantization is performed after the classification processing, the rounding of the data due to the quantization is not reflected in the classification.

(発明の目的および構成) 本発明は上記の点にかんがみてなされたもので、クラ
ス分け処理を行なう場合の量子化符号化の装置の構成を
簡単にするとともに、量子化によるデータの丸めの影響
を充分考慮した簡潔なクラス分け装置を実現し、クラス
分けを行なうことによる処理のムダをなくし、処理時間
の延長を最小限にすることを目的とし、この目的を達成
するために、量子化符号を2段階に分けて行ない、第1
の量子化符号化過程とクラス分け過程とを平行して行な
い、且つクラス分け処理を第1の量子化符号化過程で出
力される固定長符号を用いて行なうととも、クラス分け
処理が特定の条件を満たす上記固定長符号の個数をカウ
ントするように構成した。
(Object and Structure of the Invention) The present invention has been made in view of the above points, and simplifies the structure of a quantization coding device in the case of performing classification processing, and also influences the rounding of data due to quantization. In order to achieve this purpose, a quantized code is realized in order to realize a simple classifying device that fully considers the above, eliminate the waste of processing by classifying, and minimize the extension of processing time. Is divided into two stages, the first
And the classifying process is performed in parallel using the fixed-length code output in the first quantizing and coding process. It is configured to count the number of fixed length codes that satisfy the condition.

(実施例) 以下本発明を図面に基づいて説明する。(Example) The present invention will be described below with reference to the drawings.

第1図は本発明による階調画像データ圧縮装置の一実
施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a gradation image data compression apparatus according to the present invention.

図においてフレームメモリ1には、圧縮対象となる階
調画像データ(本例では、1画素当りのビット数を8ビ
ットとする)が格納されており、まず読み出し装置2が
フレームメモリ1から画像データをブロック単位に読み
出す(本例では、ブロックサイズをライン方向、カラム
方向にそれぞれ16画素とする)。読み出されたブロック
データは、2次元ディスクリートコサイン交換(2D−DC
T)装置3によりコサイン変換され1ブロック分256個の
変換係数を得る。
In the figure, the frame memory 1 stores gradation image data to be compressed (in this example, the number of bits per pixel is 8 bits), and the reading device 2 first reads the image data from the frame memory 1. Is read in block units (in this example, the block size is 16 pixels in the line direction and 16 pixels in the column direction). The read block data is converted into a two-dimensional discrete cosine exchange (2D-DC
T) The device 3 performs cosine transform to obtain 256 transform coefficients for one block.

次に、こうして得られた256個の変換係数のうち1個
の直流成分を除く255個の変換係数交流成分は、第1の
量子化符号化装置4により基本量子化幅w0で一様量子化
され、各変換係数ごとに固定長符号である係数番号と極
性番号のペアを得る。係数番号と極性番号のペアは、ブ
ロックバッファメモリ6に一時的に格納されるととも
に、係数番号はクラス分け装置5へ送られる。
Next, of the 256 transform coefficients thus obtained, 255 transform coefficient AC components excluding one DC component are uniformly quantized by the first quantization coding device 4 with a basic quantization width w 0. Is obtained, and a pair of a coefficient number and a polarity number, which is a fixed length code, is obtained for each transform coefficient. The pair of coefficient number and polarity number is temporarily stored in the block buffer memory 6 and the coefficient number is sent to the classifying device 5.

クラス分け装置5では、第1の量子化符号化装置4か
ら送られてくる1ブロック分の係数番号と、端子52から
入力される圧縮率パラメータによりクラス分け処理を行
ない、第2の量子化符号化装置7へクラス番号を出力す
る。第2の量子化符号装置7はクラス分け装置5から送
られてくるクラス番号を読み込むと、ブロックバッファ
メモリ6より1ブロック分の係数番号と極性番号のペア
を読み出し、変換係数交流成分の固定長符号(番号)を
可変長符号に変換して端子8へ出力する。符号データは
端子8から送信されるかメモリへ格納される。
The classifying device 5 performs the classifying process based on the coefficient number for one block sent from the first quantization coding device 4 and the compression rate parameter input from the terminal 52, and then the second quantization code is generated. The class number is output to the digitizing device 7. When the second quantization coding device 7 reads the class number sent from the classifying device 5, it reads a pair of the coefficient number and the polarity number for one block from the block buffer memory 6, and the fixed length of the transform coefficient AC component. The code (number) is converted into a variable length code and output to the terminal 8. The code data is transmitted from the terminal 8 or stored in the memory.

第2図は第1図の量子化符号化装置4の一例である。 FIG. 2 is an example of the quantization coding device 4 of FIG.

まず端子41から1ブロック分の変換係数のうち直流成
分を除く255個の変換係数交流成分が入力される。255個
の変換係数は、絶対値回路42により絶対値がとられると
同時に、極性判定回路43により変換係数の正負の判定が
行なわれる。極性判定回路43は判定結果を極性番号とし
て端子47に出力する。ここでは、極性番号を1ビット符
号で表わし、変換係数が負の場合は“1"、正の場合は
“0"とする。
First, from the terminal 41, 255 conversion coefficient AC components of the conversion coefficient for one block excluding the DC component are input. The absolute values of the 255 conversion coefficients are taken by the absolute value circuit 42, and at the same time, the polarity judgment circuit 43 judges whether the conversion coefficients are positive or negative. The polarity determination circuit 43 outputs the determination result to the terminal 47 as the polarity number. Here, the polarity number is represented by a 1-bit code, and is "1" when the conversion coefficient is negative and "0" when the conversion coefficient is positive.

一方、絶対値回路42から出力された変換係数の絶対値
は除算回路44により基本量子化幅w0で割り算される。割
り算結果は切り捨て回路45によって少数点以下の切り捨
てが行なわれ(この結果を係数番号と呼ぶ)、端子46お
よび端子47に出力される。端子46はクラス分け装置5に
接続されており、端子47はブロックバッファメモリ6に
接続されている。端子41から入力された1つの変換係数
に対して得られる極性番号と係数番号は2つで1組のペ
アをなし、端子47よりブロックバッファメモリ6へ一時
的に格納される。
On the other hand, the absolute value of the transform coefficient output from the absolute value circuit 42 is divided by the basic quantization width w 0 by the division circuit 44. The division result is rounded down to the decimal point by the rounding circuit 45 (this result is called a coefficient number), and is output to the terminals 46 and 47. The terminal 46 is connected to the classifying device 5, and the terminal 47 is connected to the block buffer memory 6. The polarity number and the coefficient number obtained for one conversion coefficient input from the terminal 41 form two pairs and are temporarily stored in the block buffer memory 6 from the terminal 47.

一方、各ブロックの直流成分は充分小さい量子化幅w
dcで一様量子化されるか、もしくは量子化を行なわずに
他の255個の変換係数交流成分と同様にブロックバッフ
ァメモリ6へ一時的に格納される。
On the other hand, the DC component of each block is a sufficiently small quantization width w
It is uniformly quantized by dc , or is temporarily stored in the block buffer memory 6 like other 255 transform coefficient AC components without being quantized.

第3図に直流成分を除いた変換係数交流成分の量子化
の様子を示す。
FIG. 3 shows the quantization of the conversion coefficient AC component excluding the DC component.

横軸が変換係数の値であり、縦軸は変換係数の発生頻
度である。第3図(a)により示される番号列は切り捨
て回路45から出力される係数番号(k)列であり、第3
図(b)により示される番号列は極性判定回路43から出
力される極性番号(j)列である。
The horizontal axis is the value of the conversion coefficient, and the vertical axis is the frequency of occurrence of the conversion coefficient. The number sequence shown in FIG. 3A is the coefficient number (k) sequence output from the truncation circuit 45.
The number sequence shown in FIG. 9B is the polarity number (j) sequence output from the polarity determination circuit 43.

次に第4図はクラス数を4とした場合のクラス分け装
置5の一例である。
Next, FIG. 4 shows an example of the classifying device 5 when the number of classes is four.

端子51は第2図の端子46と接続されており、第1の量
子化符号化装置4から出力される係数番号がここから入
力される。ここで係数番号をk(k=0,1,2,3,4…)で
表わすと、端子51から入力された係数番号kはカウンタ
制御LUT53により4ビットの第1次カウンタ制御コードC
i(i=0,1,2,3)に変換される。
The terminal 51 is connected to the terminal 46 in FIG. 2, and the coefficient number output from the first quantization coding apparatus 4 is input from here. Here, when the coefficient number is represented by k (k = 0,1,2,3,4 ...), the coefficient number k input from the terminal 51 is determined by the counter control LUT 53 by the 4-bit primary counter control code C.
i (i = 0,1,2,3).

第5図(イ)にカウンタ制御LUT53の一例を示す。 FIG. 5A shows an example of the counter control LUT 53.

一方、端子52からは、ユーザーが端末(図示せず)か
ら入力した圧縮率パラメータPが入力される。本例の場
合圧縮率は2通り用意されており(P=0,1)、Pが大
きいほど圧縮率が高くなることを意味する。端子52から
入力された圧縮率パラメータPは、圧縮率制御LUT54に
より、4ビットの圧縮率制御コードepに変換される。第
5図(ロ)には圧縮制御LUT54の一例を示す。
On the other hand, the compression ratio parameter P input by the user from a terminal (not shown) is input from the terminal 52. In the case of this example, two compression ratios are prepared (P = 0, 1), which means that the larger P is, the higher the compression ratio is. The compression rate parameter P input from the terminal 52 is converted into a 4-bit compression rate control code e p by the compression rate control LUT 54. FIG. 5B shows an example of the compression control LUT 54.

次にOR回路55は第1次カウンタ制御コードciと圧縮率
制御コードepとを取り込み、両者の論理和である4ビッ
トの第2次カウンタ制御コードdiを求める。
Next, the OR circuit 55 takes in the primary counter control code c i and the compression rate control code e p, and obtains a 4-bit secondary counter control code d i which is the logical sum of the two.

di←CiU ep 次にカウンタ制御回路56は第2次カウンタ制御コード
diを取り込み、カウンタ回路57内のカウンタ0からカウ
ンタ3までの4個のカウンタをdiの各ビットのon/off状
態によって制御する。第2次カウンタ制御コードdiの各
ビットは下位ビットから順にカウンタ0、カウンタ1、
カウンタ2、カウンタ3に対応づけされており、ビット
がon(=1)の場合はカウンタ制御回路56が対応するカ
ウンタを+1カウントアップし、ビットがoff(=0)
の場合は対応するカウンタのカウントアップを行なわな
い。第5図(ハ)にdiの各ビットと各カウンタとの対応
関係を示す。なお、ci,epについても各カウンタと同様
の対応関係が成立する。
d i ← C i U e p Next, the counter control circuit 56 uses the secondary counter control code.
The d i is fetched and four counters from the counter 0 to the counter 3 in the counter circuit 57 are controlled by the on / off state of each bit of the d i . Each bit of the secondary counter control code d i is counter 0, counter 1,
Corresponding to the counter 2 and the counter 3, when the bit is on (= 1), the counter control circuit 56 increments the corresponding counter by +1 and the bit is off (= 0).
In case of, the corresponding counter is not counted up. FIG. 5C shows the correspondence between each bit of d i and each counter. Note that the same correspondence relationship holds for each counter for c i and e p .

第6図は、圧縮率パラメータPもしくは圧縮率制御コ
ードepと各カウンタの動作範囲の関係を示す図である。
各圧縮率パラメータP(各ep)に対して、各カウンタは
第6図の矢印で示される範囲の係数番号kについてのみ
動作する。ただし、本例では、カウンタ3はPの値にか
かわらず、すべての係数番号kに対して動作するため、
1ブロック分のクラス分け作業の終了をカウンタ3によ
り知ることができる。従って他にカウンタ3と同様のカ
ウンタを所有する場合はカウンタ3を省略してもよい。
FIG. 6 is a diagram showing the relationship between the compression ratio parameter P or the compression ratio control code e p and the operating range of each counter.
For each compression ratio parameter P (each e p ), each counter operates only for the coefficient number k in the range indicated by the arrow in FIG. However, in this example, since the counter 3 operates for all coefficient numbers k regardless of the value of P,
The end of the classification work for one block can be known by the counter 3. Therefore, when the other counter similar to the counter 3 is owned, the counter 3 may be omitted.

次に、比較回路58の比較処理手順を第7図のフローチ
ャートに示す。
Next, the comparison processing procedure of the comparison circuit 58 is shown in the flowchart of FIG.

比較回路58は常にカウンタ3のカウント値をチェック
しており(F−1)、カウント値が255に満たないとき
は比較回路58は待機状態にある。カウンタ3のカウント
値が255になると、比較回路58はカウント閾値LUT59から
出力されるカウント閾値Spを読み込む。第5図(ニ)に
カウント閾値LUT59の一例を示す。カウント閾値Sp
は、端子52から入力される圧縮率パラメータPに対して
発行される、カウンタ値に対する閾値である。各カウン
ト閾値Spのとる値は係数kに対する各カウンタの動作範
囲と基本量子化幅W0の値および第6図のA0〜A3の値と密
接な関係がある。比較回路58がカウント閾値Spを読み込
むと、このSpとカウンタ2のカウンタ値の比較を行なう
(F−2)。その結果、(1)もしカウント閾値Spがカ
ウンタ2のカウント値以上であればクラス番号mを3に
セットし(F−3)、Spがカウンタ2のカウント値より
小さければSpとカウンタ1のカウント値とを比較する
(F−4)。
The comparison circuit 58 constantly checks the count value of the counter 3 (F-1), and when the count value is less than 255, the comparison circuit 58 is in a standby state. When the count value of the counter 3 reaches 255, the comparison circuit 58 reads the count threshold value S p output from the count threshold value LUT 59. FIG. 5D shows an example of the count threshold LUT59. The count threshold value S p is a threshold value for the counter value issued for the compression rate parameter P input from the terminal 52. The value of each count threshold value S p is closely related to the operating range of each counter with respect to the coefficient k, the value of the basic quantization width W 0 , and the values of A 0 to A 3 in FIG. When the comparison circuit 58 reads the count threshold value S p , this S p is compared with the counter value of the counter 2 (F-2). As a result, (1) if the count threshold S p is set to class number m equal to or greater than the count value of the counter 2 to 3 (F-3), S p and counter If S p is smaller than the count value of the counter 2 The count value of 1 is compared (F-4).

(2)カウント閾値Spとカウンタ1のカウント値との比
較において、Spがカウンタ1のカウント値以上であれ
ば、クラス番号mを2にセットし(F−5)、Spがカウ
ンタ1のカウント値より小さければSpとカウンタ0とカ
ウント値を比較する(F−6)。
(2) In the comparison between the count threshold value S p and the count value of the counter 1, if S p is equal to or larger than the count value of the counter 1, the class number m is set to 2 (F-5), and S p is the counter 1 smaller than the count value comparing S p and the counter 0 count value (F-6).

(3)カウント閾値Spとカウンタ0のカウント値との比
較において、Spがカウント値以上であれば、クラス番号
mを1にセットし(F−7)、Spがカウンタ0のカウン
ト値より小さければ、クラス番号mを0にセットする
(F−8)。
(3) In the comparison between the count threshold value S p and the count value of the counter 0, if S p is equal to or larger than the count value, the class number m is set to 1 (F-7), and S p is the count value of the counter 0. If it is smaller, the class number m is set to 0 (F-8).

(4)クラス番号mがセットされると、端子510よりク
ラス番号mを出力して(F−9)、1ブロック分のクラ
ス分け作業を終了し、カウンタ0からカウンタ3までの
各カウンタのカウント値をゼロクリアする(F−10)。
比較回路58から出力されるクラス番号mは、符号化時に
ランレングス符号化される変換係数の範囲を示すパラメ
ータとなっている。すなわち、クラス番号がmであるブ
ロックの255個の交流成分に対して、変換係数の絶対値
が0以上Am以下の領域内に存在する変換係数はランレン
グス符号化されることを意味する(第6図参照)。
(4) When the class number m is set, the class number m is output from the terminal 510 (F-9), the classification work for one block is completed, and the counts of the counters 0 to 3 are counted. Clear the value to zero (F-10).
The class number m output from the comparison circuit 58 is a parameter indicating the range of transform coefficients that are run-length encoded at the time of encoding. That is, for the 255 AC components of the block whose class number is m, the transform coefficients existing in the region where the absolute value of the transform coefficient is 0 or more and Am or less are run-length encoded ( (See FIG. 6).

第8図は第2の量子化符号化装置7の一例である。 FIG. 8 shows an example of the second quantization coding device 7.

クラス分け装置5が1ブロック分のクラス分け作業を
終了すると、第2の量子化符号化装置7は端子79(端子
79は第4図の端子510と接続されている)からクラス番
号mを読み込み、量子化LUT73にそれぞれ格納されてい
る4つの量子化テーブルから量子化に用いる量子化テー
ブルを1つ選択すると同時にデータ読み出し回路72にブ
ロックバッファメモリ6からのデータ読み出し指令を送
る。データ読み出し回路72はブロックバッファメモリ6
と接続されている端子71から直流成分データと、255組
の係数番号kと極性番号j(j=Oor1)のペアとを読み
込む。読み込まれたデータが直流成分であれば、端子78
からデータを出力し、読み込まれたデータが係数番号k
と極性番号jのペアであればクラス番号mにより選択さ
れた量子化LUT73内の量子化テーブルによって係数番号
kおよび極性番号jを符号番号lに変換する。
When the classification device 5 finishes the classification work for one block, the second quantization coding device 7 outputs the terminal 79 (terminal
79 is connected to the terminal 510 in FIG. 4), reads the class number m from the four quantization tables stored in the quantization LUT 73, and selects one quantization table to be used for quantization, and A data read command from the block buffer memory 6 is sent to the read circuit 72. The data read circuit 72 is the block buffer memory 6
The DC component data and 255 pairs of coefficient number k and polarity number j (j = Oor1) are read from the terminal 71 connected to. If the read data is a DC component, terminal 78
The data is output from and the read data is the coefficient number k.
And the polarity number j, the coefficient number k and the polarity number j are converted into the code number 1 by the quantization table in the quantization LUT 73 selected by the class number m.

第9図には量子化LUT73内の量子化テーブルの一例を
示す。
FIG. 9 shows an example of the quantization table in the quantization LUT 73.

本例は最終的量子化状態が第10図に示す一様量子化と
なるように、係数番号kを均等に区分けした例である
が、このほかに係数番号kを不均等に区分けすることも
可能であり、基本量子化幅W0の整数倍の最終的量子化幅
で一様でない量子化を行なうことができる。
This example is an example in which the coefficient number k is evenly divided so that the final quantization state becomes uniform quantization as shown in FIG. 10. However, in addition to this, the coefficient number k may be unevenly divided. It is possible, and non-uniform quantization can be performed with a final quantization width that is an integral multiple of the basic quantization width W 0 .

次に交流成分を第2の符号化の手順の一例を第11図の
フローチャートに示す。
Next, an example of the procedure of the second encoding of the AC component is shown in the flowchart of FIG.

まず量子化LUTT73より出力される符号番号lが内部に
符号通過カウンタ74aを有するゼロ判定回路74に送られ
る。(P−1)。符号通過カウンタ74aは符号番号lを
受信すると、符号通過カウンタ値yを+1カウントアッ
プし(P−2)、ゼロ判定回路74が符号番号lのゼロ判
定を行なう(P−3)。もしlがゼロであればゼロカウ
ンタ75のカウント値zを+1カウントアップした後(P
−4)、符号通過カウント値yが255になったかどうか
を判定する(P−11)。一方、もしlがゼロでなけれ
ば、ゼロカウント値zがゼロかどうかを判定し(P−
5)、ゼロであれば符号番号lに符号LUT76によって可
変長符号hlに変換して(P−6)端子78からhlを出力し
た後(P−7)符号通過カウント値yが255となったか
どうかを判定する(P−11)。もしゼロカウント値zが
ゼロでなければゼロカウント値zを符号LUT77によって
可変長符号rzに変換し(P−8)、ゼロカウント値zを
ゼロクリアした後(P−9)、rzを端子78から出力し
(P−10)、符号通過カウント値yが255になったかど
うかを判定する(P−11)。
First, the code number 1 output from the quantization LUTT73 is sent to the zero determination circuit 74 having the code passage counter 74a therein. (P-1). When the code passage counter 74a receives the code number 1, it increments the code passage counter value y by +1 (P-2), and the zero decision circuit 74 makes a zero decision of the code number 1 (P-3). If l is zero, the count value z of the zero counter 75 is incremented by +1 (P
-4), it is determined whether the code passage count value y reaches 255 (P-11). On the other hand, if l is not zero, it is determined whether the zero count value z is zero (P-
5) If it is zero, after the code number 1 is converted to the variable length code hl by the code LUT 76 and (hl) is output from the terminal 78 (P-6), the code passage count value y becomes 255 (P-7). Determine whether it is (P-11). If the zero count value z is not zero, the zero count value z is converted into a variable length code r z by the code LUT77 (P-8), the zero count value z is zero-cleared (P-9), and r z is a terminal. It is output from 78 (P-10), and it is determined whether the code passage count value y reaches 255 (P-11).

符号通過カウント値yの判定において、もしカウント
値yが255でなければ符号番号lを読み込むステップ
(P−1)にもどって上記の処理を繰り返し行なう。も
し符号通過カウント値yが255であれば(P−11)、ゼ
ロカウント値zがゼロであるかどうかを判定し(P−1
2)、ゼロであれば符号通過カウント値yをゼロクリア
して(P−13)、1ブロック分の変換係数の符号化作業
を終了する。ゼロカウント値zがゼロでなければ符号変
換ステップ(P−8)と、ゼロカウント値zのゼロクリ
アステップ(P−9)と、端子78への可変長符号rz出力
ステップ(P−10)を経た後符号通過カウント値yをゼ
ロクリアし(P−13)1ブロック分の変換係数の符号化
作業を終了する。
In the judgment of the code passage count value y, if the count value y is not 255, the process is repeated by returning to the step (P-1) of reading the code number l. If the code passage count value y is 255 (P-11), it is determined whether the zero count value z is zero (P-1).
2) If it is zero, the code passage count value y is cleared to zero (P-13), and the coding operation of the transform coefficient for one block is completed. If the zero count value z is not zero, a code conversion step (P-8), a zero clear step of the zero count value z (P-9), and a variable length code r z output step (P-10) to the terminal 78 are performed. After passing, the code passage count value y is cleared to zero (P-13), and the coding operation of the transform coefficient for one block is completed.

第12図(イ)は符号LUT76の一例を示す。 FIG. 12A shows an example of the code LUT 76.

本例は各クラスに共通のハフマン符号hlを用いた例で
ある。本実施例のように一様量子化を行なう場合は各ク
ラスごとに最適なハフマン符号hlを用いたときと各クラ
スに共通のハフマン符号hlを用いたときとで、圧縮率に
大きな違いがないため、各クラスに共通のハフマン符号
hlを用いることによりシンプルな装置化が可能となる。
In this example, the Huffman code hl common to each class is used. When uniform quantization is performed as in the present embodiment, there is no significant difference in compression rate between the case where the optimum Huffman code hl is used for each class and the case where the common Huffman code hl is used for each class. Therefore, the Huffman code common to each class
A simple device can be realized by using hl.

第12図(ロ)は符号LUT77の一例を示す。 FIG. 12B shows an example of the code LUT 77.

本例はゼロカウント値zに対して割り当てられるラン
レングス符号に各クラス共通のBl符号を用いた例であ
る。階調画像データを本方式で圧縮する場合の各ゼラチ
ン長の頻度分布はBl符号に適した指数関数的分布となる
ため、B1符号を用いることにより高い圧縮率を得ること
が可能となる。なお第12図(イ)および(ロ)において
Cおよびは0か1の値をとり、≠Cを満足する1ビ
ットの符号である。
In this example, a Bl code common to each class is used as the run length code assigned to the zero count value z. When the gradation image data is compressed by this method, the frequency distribution of each gelatin length has an exponential distribution suitable for the Bl code, so that it is possible to obtain a high compression rate by using the B1 code. In FIGS. 12 (a) and 12 (b), C and are values of 0 or 1, and are 1-bit codes satisfying ≠ C.

第13図は第8図におけるデータを読み出し回路72のデ
ータ読み出し順序を示す。
FIG. 13 shows the data reading order of the data reading circuit 72 in FIG.

階調画像の変換係数は高周波成分ほど振幅が小さくな
る傾向が強いため、ゼロに量子化される成分の発生する
確率も高周波成分など高くなる。従って、第13図(イ)
もしくは(ロ)に示すように、低周波側から高周波方向
に向かって符号化すれば長いゼロランが発生する確率が
高まり、有効なランレングス符号化を行なうことができ
る。
Since the conversion coefficient of the gradation image tends to have a smaller amplitude in the higher frequency component, the probability of occurrence of a component quantized to zero becomes higher, such as in the higher frequency component. Therefore, Fig. 13 (a)
Alternatively, as shown in (b), if coding is performed from the low frequency side toward the high frequency direction, the probability that a long zero run will occur is increased, and effective run length coding can be performed.

第14図に符号構成の一例を示す。 FIG. 14 shows an example of the code structure.

第14図(イ)は1フレームの画像全体を圧縮した結果
の符号例であり、ヘッダ部とそれに続く各ブロックの符
号と、データ終了符号から成る。
FIG. 14A shows a code example of the result of compressing the entire image of one frame, which is composed of the header part, the code of each block following the header part, and the data end code.

第14図(ロ)はヘッダ部構成の一例であり、ブロック
サイズ(本例では16)、画像ライン方向のブロック数、
画像カラム方向のブロック数および圧縮率パラメータP
が格納されている。
FIG. 14 (B) is an example of the header part configuration, and the block size (16 in this example), the number of blocks in the image line direction,
Number of blocks in the image column direction and compression ratio parameter P
Is stored.

第14図(ハ)は各ブロックの符号構成の一例であり、
クラス番号m(本例では2ビットの固定長符号)、直流
成分符号(固定長符号)、それに続く交流成分符号列
(可変長符号列)より成る。交流成分符号列は同図
(ニ)に示すようなq個(1≦q≦255)の符号より成
る係数符号列(可変長符号列hl1,hl2…hlq)と同図
(ホ)に示すようなラン長符号(可変長符号rz)とが交
互に並ぶ構成となる。
FIG. 14C shows an example of the code configuration of each block.
It consists of a class number m (2-bit fixed length code in this example), a DC component code (fixed length code), and an AC component code string (variable length code string) following it. The AC component code string is shown in FIG. 6 (e) together with the coefficient code string (variable length code string hl 1 , hl 2 ... hlq) consisting of q (1 ≦ q ≦ 255) codes as shown in FIG. The run length code (variable length code r z ) as shown is arranged alternately.

以下に本実施例に用いた各種パラメータの一例を示
す。
An example of various parameters used in this embodiment is shown below.

基本量子化幅w0=0.5 A0=1.5, A1=1.0 A2=1.5, A3=2.0 S0=200, S1=225 なお上記のパラメータは原画像の画素当りの情報量が
nビット(本例ではn=8)でブロックサイズがN×N
(本例ではN=16)のとき、ブロック画像をf(x,
y)、変換係数行列をF(u,v)で表わした2次元ディス
クリートコサイン変換式(次式に示す)をフローティン
グポイントで計算した場合の値である。
Basic quantization width w 0 = 0.5 A 0 = 1.5, A 1 = 1.0 A 2 = 1.5, A 3 = 2.0 S 0 = 200, S 1 = 225 In the above parameters, the information amount per pixel of the original image is n. The block size is N × N in bits (n = 8 in this example)
When (N = 16 in this example), the block image is f (x,
y) is a value when a two-dimensional discrete cosine transform formula (shown in the following formula) in which the transform coefficient matrix is represented by F (u, v) is calculated at floating points.

また本発明においては、2次元ディスクリートコサイ
ン変換装置3の代りに、他の直交変換装置、たとえば2
次元でディスクリートなアダマール変換装置、スラント
変換装置などを用いてもよい。また本発明ではブロック
サイズを16×16のサイズに限定するものではなく、8×
8、32×32、64×64などのサイズでも適応可能であり、
また原画像の1画素当りのビット数も8ビットに限定す
るものではない。またクラス分け装置5において、特定
区間内の係数番号kをカウントする際、特定区間を多数
設けず、1つの特定区間内に存在する係数番号kの個数
の大小に基づいてクラス分けを行なうことも可能であ
る。また、本発明におけうクラス分けパラメータを他の
クラス分けパラメータと組合せてクラス分けを行うこと
も可能である。
Also, in the present invention, instead of the two-dimensional discrete cosine transform device 3, another orthogonal transform device, for example, 2
A dimensionally discrete Hadamard converter, slant converter, or the like may be used. In the present invention, the block size is not limited to 16 × 16, but 8 ×
It can be applied to sizes such as 8, 32 x 32, 64 x 64,
Also, the number of bits per pixel of the original image is not limited to 8 bits. Further, in the classifying device 5, when counting the coefficient numbers k in a specific section, the classification may be performed based on the number of coefficient numbers k existing in one specific section without providing a large number of specific sections. It is possible. It is also possible to combine the classification parameters of the present invention with other classification parameters for classification.

また、クラス分けのパラメータとして各ブロックにお
けるゼロランの最大値を用いることも可能である。この
場合クラス分け装置5のカウンタ制御回路56およびカウ
ンタ回路57は最大ゼロラン長をカウントするように動作
し、比較回路58は最大ラン長に対する閾値をカウンタ回
路57内に各カウント値と比較するように動作する。従っ
てSpは最大ラン長に対する閾値となる。
It is also possible to use the maximum value of zero run in each block as a parameter for classification. In this case, the counter control circuit 56 and the counter circuit 57 of the classifying device 5 operate to count the maximum zero run length, and the comparison circuit 58 compares the threshold value for the maximum run length with each count value in the counter circuit 57. Operate. Therefore S p is a threshold for the maximum run length.

(発明の効果) 以上説明したように、本発明においては、量子化符号
化を2段階に分けて行ない、第1の量子化符号化過程と
クラス分け過程とを平行して行ない、クラス分け処理を
第1の量子化符号化過程で出力される固定長符号を用い
て行なうとともに、クラス分け処理が特定の条件を満た
す上記固定長符号の個数をカウントするように構成した
ので、クラス分け処理に要する時間を見かけ上無視する
ことができ、第2の量子化符号化による最終的量子化幅
を第1の量子化符号化の基本量子化幅w0の整数倍で可変
(一様でない量子化幅)にすることができ、また最終量
子化幅が一様でない場合や、各クラス間で異なる場合
も、実際の量子化演算(第1の量子化符号化装置の量子
化演算)は同一の量子化幅w0での一様量子化演算となる
ため量子化過程の装置が簡単になり、処理速度の高速化
が可能となる。さらにクラス分け処理を固定長の整数符
号に対して行なうことにより変換係数そのものに対して
行なうよりも演算ビット数が少なくなるため、クラス分
け装置が簡単になり、処理速度も高速化する。この効果
は実施例に示すような個数のカウント形成とすることに
よりさらに効果的にである。
(Effect of the Invention) As described above, in the present invention, the quantization coding is performed in two steps, and the first quantization coding process and the classification process are performed in parallel to perform the classification process. Is performed by using the fixed-length code output in the first quantization coding process, and the classification processing counts the number of fixed-length codes satisfying a specific condition. The time required can be neglected apparently, and the final quantization width by the second quantization coding is variable by an integer multiple of the basic quantization width w 0 of the first quantization coding (non-uniform quantization. The actual quantization operation (quantization operation of the first quantization encoding device) is the same even when the final quantization width is not uniform or different between classes. Quantity because it is a uniform quantization operation with the quantization width w 0 This simplifies the device used in the sub-process and makes it possible to increase the processing speed. Further, by performing the classification processing on the fixed-length integer code, the number of operation bits is smaller than that on the transform coefficient itself, so that the classification apparatus is simplified and the processing speed is increased. This effect is more effective by forming the number of counts as shown in the embodiment.

また、量子化符号化装置を2段階に分割して第1と第
2の量子化符号化装置の間にクラス分け装置を配置する
構成とし、クラス分け処理をゼロに量子化される変換係
数の個数をパラメータとして行なうことにより量子化に
よるデータの丸め影響を反映したクラス分けを行なうこ
とができる。
In addition, the quantization coding device is divided into two stages, and the classifying device is arranged between the first and second quantization coding devices, and the classifying process is performed on the transform coefficients quantized to zero. By using the number as a parameter, classification that reflects the rounding effect of data due to quantization can be performed.

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

第1図は本発明による階調画像データ圧縮装置の一実施
例のブロック線図、第2図は第1図に示した第1の量子
化符号化装置の一例のブロック線図、第3図は変換係数
交流成分の第1の量子化符号化して得られる係数番号と
極性番号とを変換係数の発生頻度との関係で示す図、第
4図は第1図に示したクラス分け装置の一例のブロック
線図、第5図(イ)はカウンタ制御LUT、(ロ)は圧縮
率制御LUT、(ハ)は第2次カウンタ制御コードと各カ
ウンタの対応関係、(ニ)はカウント閾値LUTをそれぞ
れ示す図、第6図(イ)および(ロ)はカウンタ回路内
の各カウンタの動作範囲を示す図、第7図は比較回路の
比較手順を示すフローチャート、第8図は第1図に示し
た第2の量子化符号化装置の一例のブロック線図、第9
図は第8図に示した量子化LUTの一例、第10図は最終的
量子化状態の一例、第11図は第1図に示した第2の量子
化符号化装置による交流成分符号化手順を示すフローチ
ャート、第12図(イ)および(ロ)はそれぞれ第8図の
2つの符号LUTの一例、第13図(イ)および(ロ)は第
8図のデータ読出し回路におけるデータ読出し順序を示
す図、第14図(イ)、(ロ)、(ハ)、(ニ)、(ホ)
は符号構成の内容の一例を示す図である。 1…フレームメモリ、2…読み出し装置、3…2次元デ
ィスクリートコサイン変換装置、4…第1の量子化符号
化装置、5…クラス分け装置、6…ブロックバッファメ
モリ、7…第2の量子化符号化装置
FIG. 1 is a block diagram of an embodiment of a gradation image data compression device according to the present invention, FIG. 2 is a block diagram of an example of the first quantization coding device shown in FIG. 1, and FIG. Is a diagram showing the relationship between the coefficient number and the polarity number obtained by the first quantization coding of the transform coefficient AC component and the frequency of occurrence of the transform coefficient, and FIG. 4 is an example of the classifying device shown in FIG. 5 is a block diagram of FIG. 5, (a) is a counter control LUT, (b) is a compression ratio control LUT, (c) is a correspondence relationship between the secondary counter control code and each counter, and (d) is a count threshold LUT. 6A and 6B show the operating range of each counter in the counter circuit, FIG. 7 is a flowchart showing the comparison procedure of the comparison circuit, and FIG. 8 is shown in FIG. A block diagram of an example of a second quantized coding device,
The figure shows an example of the quantization LUT shown in FIG. 8, FIG. 10 shows an example of the final quantization state, and FIG. 11 shows the AC component encoding procedure by the second quantization encoding apparatus shown in FIG. 12A and 12B show an example of the two code LUTs of FIG. 8, and FIGS. 13A and 13B show the data read order in the data read circuit of FIG. Figure, Figure 14 (a), (b), (c), (d), (e)
[Fig. 3] is a diagram showing an example of the contents of a code configuration. DESCRIPTION OF SYMBOLS 1 ... Frame memory, 2 ... Read-out device, 3 ... Two-dimensional discrete cosine transform device, 4 ... 1st quantization coding device, 5 ... Class classification device, 6 ... Block buffer memory, 7 ... 2nd quantization code Device

フロントページの続き (56)参考文献 IEEE TRANSACTIONS ON COMMUNICATION S,VOL,COM25,NO.11 (1977.11)P.1285−1292 IEEE TRANSACTIONS ON ACOUSTICS,SPEE CH,AND SIGNAL PROC ESSING VOL,ASSP29 N O.2(1981)P.147−154Front page continuation (56) References IEEE TRANSACTIONS ON COMMUNICATION S, VOL, COM25, NO. 11 (1977.11) P. 1285-1292 IEEE TRANSACTIONS ON ACOUSTICS, SPEE CH, AND SIGNAL PROC ESSING VOL, ASSP29 NO. 2 (1981) P. 147-154

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】デジタル化された階調画像データをブロッ
ク画像単位に順次読み出す読み出し手段と、該読み出さ
れたブロック画像に対して2次元直交変換を行って変換
係数データを得る2次元直交変換手段と、該2次元直交
変換手段より出力される変換係数データに対して第1の
量子化幅で量子化を行い、前記変換係数データに整数値
を割当てて出力する第1の量子化手段と、該第1の量子
化手段より出力された変換係数の統計量に基づいて前記
第1の量子化手段から出力された変換係数データに対し
て前記第1の量子化幅の整数倍の量子化幅で第2の量子
化を行う第2の量子化手段と、該第2の量子化手段によ
って量子化された変換係数データを符号化する符号化手
段とを有することを特徴とする階調画像データの圧縮装
置。
1. A reading means for sequentially reading out digitized gradation image data in block image units, and a two-dimensional orthogonal transformation for obtaining transform coefficient data by performing two-dimensional orthogonal transformation on the read block image. Means and first quantizing means for quantizing the transform coefficient data output from the two-dimensional orthogonal transforming means with a first quantization width, assigning an integer value to the transform coefficient data, and outputting the result. Quantizing the transform coefficient data output from the first quantizer based on the statistic of the transform coefficient output from the first quantizer to an integral multiple of the first quantization width. A grayscale image having a second quantization means for performing second quantization with a width and an encoding means for encoding the transform coefficient data quantized by the second quantization means. Data compression device.
【請求項2】前記2次元直交変換が、2次元ディスクリ
ートコサイン変換であることを特徴とする特許請求の範
囲第1項に記載の階調画像データの圧縮装置。
2. The compression device for gradation image data according to claim 1, wherein the two-dimensional orthogonal transformation is a two-dimensional discrete cosine transformation.
JP7977487A 1987-04-02 1987-04-02 Compressor for gradation image data Expired - Lifetime JP2511669B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP7977487A JP2511669B2 (en) 1987-04-02 1987-04-02 Compressor for gradation image data
US07/176,769 US4922273A (en) 1987-04-02 1988-04-01 Compression method of halftone image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7977487A JP2511669B2 (en) 1987-04-02 1987-04-02 Compressor for gradation image data

Publications (2)

Publication Number Publication Date
JPS63246976A JPS63246976A (en) 1988-10-13
JP2511669B2 true JP2511669B2 (en) 1996-07-03

Family

ID=13699551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7977487A Expired - Lifetime JP2511669B2 (en) 1987-04-02 1987-04-02 Compressor for gradation image data

Country Status (1)

Country Link
JP (1) JP2511669B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0379182A (en) * 1989-08-23 1991-04-04 Fujitsu Ltd Image encoding control system
JP2547479B2 (en) * 1989-08-23 1996-10-23 富士通株式会社 Image coding control system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IEEETRANSACTIONSONACOUSTICS,SPEECH,ANDSIGNALPROCESSINGVOL,ASSP29NO.2(1981)P.147−154
IEEETRANSACTIONSONCOMMUNICATIONS,VOL,COM25,NO.11(1977.11)P.1285−1292

Also Published As

Publication number Publication date
JPS63246976A (en) 1988-10-13

Similar Documents

Publication Publication Date Title
KR100914160B1 (en) Lossless intraframe encoding using golomb-rice
US5818877A (en) Method for reducing storage requirements for grouped data values
US4922273A (en) Compression method of halftone image data
JP4113114B2 (en) DCT compression using GOLOMB-RICE coding
US5045852A (en) Dynamic model selection during data compression
US6567562B1 (en) Encoding apparatus and method
JPH08116447A (en) Coder for image signal
JP2004531995A5 (en)
JP3163880B2 (en) Image compression coding device
EP1188244B1 (en) Lossless adaptive encoding of finite alphabet data
KR930003964B1 (en) Coding system
JP2511669B2 (en) Compressor for gradation image data
JP2841197B2 (en) Method of compressing gradation image data
JP2811304B2 (en) Method of compressing gradation image data
JP2821496B2 (en) Method of compressing gradation image data
JP3114796B2 (en) Variable length coding apparatus and method
JPH07283948A (en) Compressing device for gradation picture data
EP0762771A2 (en) Apparatus and method for variable-length coding
JP3049265B2 (en) Image data coding circuit
JPS63260271A (en) Picture data compressor
JP3232160B2 (en) Encoding device and method
JP2802136B2 (en) Image data encoding method and apparatus
JPH03192878A (en) Picture data compressor
JPS61136379A (en) Encoding system
JPH01237774A (en) Encoding method in compression of gradation picture data

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term