JPH01237774A - Encoding method in compression of gradation picture data - Google Patents

Encoding method in compression of gradation picture data

Info

Publication number
JPH01237774A
JPH01237774A JP63063130A JP6313088A JPH01237774A JP H01237774 A JPH01237774 A JP H01237774A JP 63063130 A JP63063130 A JP 63063130A JP 6313088 A JP6313088 A JP 6313088A JP H01237774 A JPH01237774 A JP H01237774A
Authority
JP
Japan
Prior art keywords
encoding
code
block
quantization
encoding method
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
JP63063130A
Other languages
Japanese (ja)
Inventor
Hisashi Yonekawa
久 米川
Hiroshi Takeuchi
寛 竹内
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 JP63063130A priority Critical patent/JPH01237774A/en
Publication of JPH01237774A publication Critical patent/JPH01237774A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PURPOSE:To improve the encoding efficiency of compressing gradation picture data by separately using a prescribed two-encoding system for the unit of blocks. CONSTITUTION:The gradation picture data for the unit of blocks are orthogonally transformed by a two-dimensional discrete cosine transformation device 3 and go to be a transformation coefficient equivalent to one block. Then, the data are uniformly quantized by a first quantizing device 4 and the coefficient number and polarity number of a fixed length code are obtained. These pair numbers are stored in a block buffer memory 6 and a ranking device 5 distributes the block from the coefficient number into plural ranks. In a second quantizing device 7, quantization is executed by a quantizing width, which is determined based on a rank number and setting compression factor, and the cut rate of a high frequency component. Then, in an encoding device 8, the two systems of encoding are executed. Then, one system of the encoding uses both a Huffman code and run-length code and the other system of the encoding uses the Huffman code. In the block of the small quantizing width, or, in the block of a large high frequency cut degree, only the Huffman encoding is used. Then, a code length is shortened and the encoding efficiency is improved.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はX線写真やCT両画像どの医用画像のような階
調画像のデータを圧縮する際の符号化方法に量子る暮′ (発明の背景) デジタル技術の進歩に伴ない、階調画像をデジタル化し
て保存、伝送したり、種々のデジタル画像処理を施した
りすることか頻繁に行なわれるようになった。しかしな
がら、階調画像は2値画像に比べて情報量が多く、従っ
て階調画像をデジタル化したときの゛データ量の多さが
問題となっている。特に医用画像では、デジタル化する
ときの画素数および各画素に要するビット数か、たとえ
ば胸部X線写真では400万画素、8〜10ビツトと膨
大であり、データの保存や転送を行なう上で効率が悪い
Detailed Description of the Invention (Field of Industrial Application) The present invention is directed to an encoding method for compressing data of gradation images such as medical images such as X-ray photographs and CT images. Background) With the advancement of digital technology, gradation images are frequently being digitized for storage and transmission, as well as being subjected to various digital image processing. However, a gradation image has a larger amount of information than a binary image, and therefore, when digitizing a gradation image, the large amount of data becomes a problem. In medical images in particular, the number of pixels and bits required for each pixel when digitized is enormous, for example, 4 million pixels and 8 to 10 bits for a chest X-ray photograph, and it is difficult to efficiently store and transfer data. It's bad.

そこで今日、医用画像を含む階調画像の膨大なデータを
圧縮してコユバクト化するデータ圧縮技術が脚光を浴び
ている。
Therefore, today, data compression technology that compresses a huge amount of data of gradation images including medical images and converts them into data is in the spotlight.

データ圧縮技術は大きく分けて可逆圧縮と非可逆圧縮と
に分類されるが、可逆圧縮では1/2〜1/3程度の低
い圧縮率しか望めないため、115以上の高い圧縮率が
得られる非可逆圧縮方式、特に変換符号化方式が注目さ
れている。
Data compression techniques are broadly classified into reversible compression and irreversible compression, but reversible compression can only achieve a low compression rate of about 1/2 to 1/3, whereas Reversible compression methods, especially transform coding methods, are attracting attention.

変換符号化とは、画像全体を小さなブロックに分割しブ
ロック単位に直交変換を施゛シ、これにより得られた変
換係数を量子化し符号化する非可逆圧縮方式の1ってあ
り、階調画像を圧縮するのに最も適した圧縮方法である
Transform encoding is an irreversible compression method that divides the entire image into small blocks, performs orthogonal transformation on a block-by-block basis, and quantizes and encodes the resulting transform coefficients. This is the most suitable compression method for compressing .

変換符号化において、変換係数の交流成分の分布は、ゼ
ロにピークを持つガウス分布に近似されることが知られ
ており、このような分布を持つ変換係数の量子化を量子
化判定レベルにゼロを含むMid−riser型量子化
と、量子化出力レベルにゼロを含むM i d −t 
r a c e型量子化とに分類した場合、M i d
 −t r a c e型量子化の方がブロック内のラ
ンダムノイズが少なくてより好ましいことが報告されて
いる。
In transform coding, it is known that the distribution of AC components of transform coefficients is 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 including M i d -t including zero in the quantization output level
When classified into r a c e type quantization, M i d
It has been reported that -tr ace type quantization is more preferable because it causes less random noise within a block.

変換符号化において高い圧縮率を得るためには、高周波
をカットする方法と量子化幅を大きくする方法がある。
In order to obtain a high compression ratio in transform encoding, there are two methods: cutting high frequencies and increasing the quantization width.

高周波をカットする場合カット率を大きくするほど復元
画像にボケが生じやすくなるという性質がある。また、
高周波をカットせず、量子化幅を大きくしてゆくと、M
 i d −t race5量子化においては、成分固
有のパターン画像が生じやすくなるという性質がある(
Mid−risery!l量子化ではランダムノイズが
増加する)、高画質すなわち原画像に忠実な復元画像を
得るためには全周波数成分を小さい量子化幅で量子化す
、ればよいが、符号、死時の一号量が増稠するため圧縮
率が低下してしまう。
When cutting high frequencies, there is a property that the larger the cutting rate, the more likely blurring will occur in the restored image. Also,
If you increase the quantization width without cutting high frequencies, M
i d -trace5 quantization has the property that component-specific pattern images are likely to occur (
Mid-rise! Quantization increases random noise), but in order to obtain high quality images, that is, restored images that are faithful to the original image, it is sufficient to quantize all frequency components with a small quantization width. As the amount increases, the compression ratio decreases.

そこで本発明者らは、高周波のカット度合と量子化幅と
画質の関係を調べ、各ブロックの性質に応じて量子化幅
と高周波カット度合を調節す、ることにより高い圧縮率
で忠実度の高い復、元画像が得られることを発見した。
Therefore, the present inventors investigated the relationship between the high frequency cut degree, quantization width, and image quality, and by adjusting the quantization width and high frequency cut degree according to the properties of each block, we achieved high fidelity with a high compression ratio. It was discovered that a high degree of restoration of the original image could be obtained.

一方、符号化は通常ゼロ以外に量子化された成分をハフ
マン9.符号化し、ゼロに量子化寄れた成分の個数をラ
ンレングス符号化する方法か用いられる。しかしながら
、ブロックごとに量子化幅と高周波カット度合を変化さ
せる場合、ランレングス符号化を行なった方が符号長が
短くなるブロックとランレングス符号化を灯なわなか、
っ、た方が符号長が短かくなるブロックとが生じる。一
般には、量子化幅の小さいブロックもしくは高周波カッ
ト度合の大きいブロックでは、ランレングス符号化を行
なわず、ハフマン符号化だけを用いて符号化を行なった
方が符号長が短かくなり、符号化効率が向上する。
On the other hand, encoding usually uses Huffman 9. A method is used in which the number of components whose quantization approaches zero is run-length encoded. However, when changing the quantization width and high frequency cut degree for each block, run-length encoding results in shorter blocks and run-length encoding.
There are blocks whose code length is shorter if the code length is shorter. In general, for blocks with a small quantization width or blocks with a large degree of high-frequency cut, it is better to use only Huffman encoding without run-length encoding, as the code length will be shorter and the encoding efficiency will be lower. will improve.

(発明の目的3よび構成) 本発明は上記の点にかんがみてなされたものマ、変換符
号化方式を用いて医用画像を含む階調画像のデータを圧
縮するにあたり、符号化効率を向上することを目的とし
、この目的を達成するために、ハフマン符号とランレン
グス符号の両方を用いる符号化方式とハフマン符号だけ
を用いる符号化方式の2つの符号化方式を用意し、2つ
の符号化方式をブロック単位で使い分けるようにしたも
のである。
(Objective 3 and Structure of the Invention) The present invention has been made in view of the above points.It is an object of the present invention to improve encoding efficiency when compressing gradation image data including medical images using a transform encoding method. To achieve this goal, we prepared two encoding methods: one that uses both Huffman codes and run-length codes, and one that uses only Huffman codes. It is designed to be used in block units.

(実施例) 以下本発明を2図面に基づいて説明する。(Example) The present invention will be explained below based on two drawings.

第1図は本発明による符号化方法を用いた階調画像デー
タ圧縮方法の一実施例を示すブロック図である。  − 図においてフレームメモリlには、圧縮対象となる階調
画像データ(本例では、1画素当りのビット数を8ビツ
トとする)が格納されており、まず読み出し装置2がフ
レームメモリlから画像データをブロック単位に読み出
す(本例ては、ブロックサイズをライン方向、カラム方
向にそれぞれ166画素する)、読み出されたブロック
データは、2次元ディスクリートコサイン変換(2D−
DCT)装置3によりコサイン変換されlブロック分2
56個の変換係数を得る。
FIG. 1 is a block diagram showing an embodiment of a gradation image data compression method using the encoding method according to the present invention. - In the figure, the frame memory l 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 l. The data is read out in blocks (in this example, the block size is 166 pixels each in the line direction and column direction), and the read block data is subjected to two-dimensional discrete cosine transformation (2D-
DCT) is cosine transformed by device 3 and is divided into 2
Obtain 56 transform coefficients.

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

ランク分は装置5では、第1量子化装!14から送られ
てくる各ブロック分の係数番号によりブロックを複数の
ランクにふり分ける処理を行ない、第2Ek子化装置7
ヘランク番号を出力する。
For rank, device 5 uses the first quantization device! The second Ek child conversion device 7 performs a process of sorting the blocks into a plurality of ranks based on the coefficient numbers for each block sent from the second Ek child conversion device 7.
Outputs the herank number.

ff52ffi子化装置7はニブロックバッファメモリ
6より係数番号と極性番号のベアを読み出し、ランク番
号とユーザーの要求した圧縮度合とに基づいて決まる量
子化幅と高周波成分のカット率で量子化を行なう、符号
化装置8は、第2量子化装!7によって得られる交流成
分の固定長符号を可変長符号に変換して端子9へ出力す
る。符号データは端子9から送信されるかメモリへ格納
される。
The ff52ffi childization device 7 reads out the bare coefficient numbers and polarity numbers from the niblock buffer memory 6, and performs quantization with the quantization width and high frequency component cut rate determined based on the rank number and the degree of compression requested by the user. , the encoding device 8 is a second quantizer! The fixed-length code of the alternating current component obtained in step 7 is converted into a variable-length code and outputted to the terminal 9. Code data is transmitted from terminal 9 or stored in memory.

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

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

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

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

第3図に交流成分の第1量子化の様子を示す。FIG. 3 shows the first quantization of the AC component.

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

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

端子51は第2図の端子46と接続されており、第1量
子化装fi4から出力される係数番号がここから入力さ
れる0次に入力された係数番号k (k=0.1,2,
3.4−)はカウンタ制御コード表52により8ビツト
のカウンタ制御コード゛Ct (i = 0 、1 、
2 、 = 、 ? )に変換される。第5図(イ)に
カウンタ制御コード表5,2.の−例を示す。
The terminal 51 is connected to the terminal 46 in FIG. 2, and the coefficient number output from the first quantizer fi4 is input from here. The coefficient number k (k=0.1, 2,
3.4-) is an 8-bit counter control code 'Ct (i = 0, 1,
2, = , ? ) is converted to Figure 5 (a) shows counter control code table 5, 2. - Give an example.

次にカウンタ制御回路53はカウンタ制御コードCiを
取り込み、カウンタ回路54内のカウ、ンタOからカウ
ンタ7までの8個のカウンタをC4の各ビットのo n
 / o f f状態によって制御する。カウンタ制御
コードC1の各ビットは下位ビットから順にカウンタ0
、カウンタl、カウンタ2.・・・カウンタ7に対応づ
けされており、ビットがon(=1)の場合はカウンタ
制御回路53が対応するカウンタな+1カウントアツプ
し、ビットがoff (=O)の場合は対応するカウン
タのカウントアツプを行なわない、第5図(ロ)にCI
の各ビットと各カウンタとの対応関係を示す。
Next, the counter control circuit 53 takes in the counter control code Ci, and controls the eight counters from counter O to counter 7 in the counter circuit 54 to each bit of C4.
/ o ff Controlled by state. Each bit of the counter control code C1 is set to counter 0 in order from the lower bit.
, counter l, counter 2. ... is associated with the counter 7, and when the bit is on (=1), the counter control circuit 53 increments the corresponding counter by +1, and when the bit is off (=O), the counter control circuit 53 increments the corresponding counter by +1. CI is shown in Figure 5 (b) without counting up.
The correspondence between each bit and each counter is shown.

第6図は各カウンタの動作範囲を示す図である。各カウ
ンタは第6図の矢印て示される範囲の係数番号kについ
てのみ動作する。カウンタ7はすべての係数番号につい
て動作するため、1ブロック分のランク分は作業終了時
のカウント7のカウント値は255になる。カランタフ
のカウント値が255になると比較回路55が比較処理
を開始する。
FIG. 6 is a diagram showing the operating range of each counter. Each counter operates only for coefficient numbers k in the range indicated by the arrow in FIG. Since the counter 7 operates for all coefficient numbers, the count value of the counter 7 will be 255 at the end of the work for one block of ranks. When the count value of the carantuff reaches 255, the comparison circuit 55 starts comparison processing.

比較回路55には圧縮処理の開始時に端子56によりカ
ウント値に対する閾値Spが与えられている。rRmS
pは圧縮率番号Pの関数で・あり、圧縮率番号Pとはユ
ーザーが端末(図示せず)から要求した圧縮率の大きさ
と示すパラメータである0本例では、p=o、iの2通
りが用意されており、ユーザーが高い圧縮率を要求した
場合にはlを割り当て、低い圧縮率を要求した場合には
0を割り当てる。閾値Spは次の関係式を満たすように
設定して8く。
A threshold value Sp for the count value is applied to the comparator circuit 55 via a terminal 56 at the start of the compression process. rRmS
p is a function of the compression rate number P, and the compression rate number P is a parameter indicating the size of the compression rate requested by the user from the terminal (not shown). In this example, p=o, 2 of i If the user requests a high compression rate, l is assigned, and if the user requests a low compression rate, 0 is assigned. The threshold value Sp is set to satisfy the following relational expression.

0<Sp≦全交流成分の個数 もしP * < P *ならばSPt≦SPt比較回路
55では閾値Spと各カウント値の比較を行ない、比較
結果に基づいてランク番号m、を設定する。
0<Sp≦Number of total AC components If P*<P*, SPt≦SPt comparison circuit 55 compares the threshold value Sp with each count value, and sets a rank number m based on the comparison result.

比較回路55の比較手順の一例を第7図のフローチャー
トに示す。
An example of the comparison procedure of the comparison circuit 55 is shown in the flowchart of FIG.

まず、カウンタ6のカウント値と閾値Spの比較を行な
い(F−1)、spがカウンタ6のカウント値より大き
ければランク番号m、を7にセットしくF−2)、端子
51よりランク番号m1を出力する(F−16)、とこ
ろがSpがカウンタ6のカウント値以下であればカウン
タ5のカウント値とSp七の比較を行なう(F−3)。
First, the count value of the counter 6 and the threshold value Sp are compared (F-1), and if sp is larger than the count value of the counter 6, the rank number m is set to 7 (F-2), and the rank number m1 is input from the terminal 51. However, if Sp is less than the count value of counter 6, the count value of counter 5 and Sp7 are compared (F-3).

以下同様にして、カウント値がSp以下てかつ最大とな
るカウンタ番号を求め、カウンタ番号に従がってランク
番号mrをセットする(F−1)〜(F−14)、ただ
し、カウンタ0のカウント値とSpとの比較において、
Spがカウンタ0のカウント値以下であればランク番号
m、、はOとする(F−15)、ランク番号m1カ(セ
ットされると、端子57よりランク番号mrを出力して
(F−16)、lブロック分のランク分は作業を終了し
、カウンタOからカウンタ7までの各カウンタのカウン
ト値をゼロクリアする(F−17)。
Thereafter, in the same manner, find the counter number where the count value is equal to or less than Sp and is the maximum, and set the rank number mr according to the counter number (F-1) to (F-14). In comparing the count value and Sp,
If Sp is less than or equal to the count value of counter 0, the rank number m,, is set to O (F-15), and when the rank number m1 is set, the rank number mr is output from the terminal 57 (F-16). ), the work for l blocks of ranks is completed, and the count values of each counter from counter O to counter 7 are cleared to zero (F-17).

第8図は第2量子化装M7と符号化装置8の一例である
FIG. 8 shows an example of the second quantizer M7 and the encoder 8.

第8図(イ)は、符号化前に符号化方式を選択する場合
の第2量子化装fi7と符号化装置8の一例を示し、第
8図(ロ)は、符号化後に符号化方式を選択する場合の
符号化装置8の一例を示している。
FIG. 8(A) shows an example of the second quantization device fi7 and the encoding device 8 when the encoding method is selected before encoding, and FIG. 8(B) shows an example of the encoding method selected after encoding. An example of the encoding device 8 in the case of selection is shown.

まず、第8図(イ)に示す第2量子化装置7と符号化袋
W8について説明する。
First, the second quantization device 7 and encoding bag W8 shown in FIG. 8(a) will be explained.

第2量子化装g17は量子化および符号化の条件を設定
する条件設定部70と量子化を行なう量子化部71とか
ら構成されている。
The second quantizer g17 includes a condition setting section 70 that sets conditions for quantization and encoding, and a quantization section 71 that performs quantization.

符号化装置8は、モート0符号化部80とモードl符号
化部81とから構成されている。ここて、モード1(符
号モート1)とは、1つの成分に対して1つの符号を割
り当てる符号化(本例ではハフマン符号化)と、成分の
個数に対して1つの符号を割り当てるランレングス符号
化(本例てはBl符号化)の両符号化を用いる符号化方
式を指し、モードO(符号モード0)とは、1つの成分
に対して1つの符号を割り当てる符号化だけを用いる符
号化方式を指す。
The encoding device 8 includes a mode 0 encoding section 80 and a mode I encoding section 81. Here, mode 1 (code mode 1) refers to encoding that assigns one code to one component (Huffman encoding in this example) and run-length encoding that assigns one code to the number of components. Mode O (code mode 0) refers to an encoding method that uses only encoding that assigns one code to one component. Refers to the method.

始めに第8図(イ)の第2量子化装fi7の動作につい
て説明する。
First, the operation of the second quantizer fi7 shown in FIG. 8(a) will be explained.

圧縮処理開始時の初期条件設定段階において、端子70
2から圧縮率番号Pが条件設定部70へ読み込まれる。
At the initial condition setting stage at the start of the compression process, the terminal 70
The compression ratio number P from 2 is read into the condition setting section 70.

圧縮率番号Pが読み込まれると、Pの値によりて条件変
換テーブル704内のテープルA、テーブルBの2つの
変換テーブルのうちいずれか1つが選択される0選択さ
れたテーブルは圧縮を行なう画像lフレームの全ブロッ
クに対して適応される。
When the compression ratio number P is read, one of the two conversion tables, table A and table B, in the condition conversion table 704 is selected depending on the value of P. 0 The selected table is the image l to be compressed. Applies to all blocks of the frame.

第9図(イ)、(ロ)に条件変換テーブル704内のテ
ーブルA、テーブルBの一例を示す。本例では、P=0
のときテーブルAがまたP=1のときテーブルBが選択
される。また、符号化装置8のスイッチ回路801が符
号化モードを読み込み、量子化された交流成分データの
送り先をモード0符号化部80かモード1符号化部81
のいずれか一方に設定する。本例ては、y=O(符号モ
ート0)の場合は量子化部71とモード0符号化部80
を接続し、y=1(符号モードl)の場合は量子化部7
1とモード1符号化部81を接続する。
FIGS. 9A and 9B show examples of tables A and B in the condition conversion table 704. In this example, P=0
When P=1, table A is selected, and when P=1, table B is selected. Further, the switch circuit 801 of the encoding device 8 reads the encoding mode and selects the destination of the quantized AC component data as either the mode 0 encoding unit 80 or the mode 1 encoding unit 81.
Set to one of the following. For example, in the case of y=O (code mode 0), the quantization unit 71 and the mode 0 encoding unit 80
If y=1 (code mode l), the quantizer 7
1 and the mode 1 encoding section 81 are connected.

初期条件設定段階が終了すると、ブロック単位に圧縮処
理が開始され、lブロック分のランク分は処理が終了す
ると、ランク番号m、が端子701から条件変換タープ
ルア04に読み込まれ、初期条件設定段階で選択された
条件変換テーブル704内のテーブルA、テーブルBの
いずれかのテーブルによってランク番号m1がクラス番
号m6と量子化終了成分番号Xと符号モートyに変換さ
れる。クラス番号mcは、端子703へ出力されると同
時に設定テーブル705に読み込まれ、量子化オフセッ
トαと量子化除数βに変換される。$9図(ハ)に条件
設定テーブル705の一例を示す0本例の場合、α= 
m 、÷2、β=αX2なる関係が成り立つ。
When the initial condition setting stage is completed, compression processing is started for each block, and when the processing for ranks for l blocks is completed, the rank number m is read from the terminal 701 to the condition conversion table 04, and at the initial condition setting stage. Rank number m1 is converted into class number m6, quantization end component number X, and code mode y using either table A or table B in the selected condition conversion table 704. The class number mc is output to the terminal 703 and simultaneously read into the setting table 705 and converted into a quantization offset α and a quantization divisor β. $9 Figure (c) shows an example of the condition setting table 705. In the case of zero cases, α=
The following relationship holds true: m, ÷2, β=αX2.

条件設定部70がランク番号m、を読み込んで、クラス
番号me、量子化終了成分番号X、量子化オフセットα
、量子化除数β、符号化モートyのパラメータ設定を終
了すると、これらパラメータに従って量子化処理が開始
される。
The condition setting unit 70 reads the rank number m, and sets the class number me, the quantization end component number X, and the quantization offset α.
, quantization divisor β, and encoding mode y, quantization processing is started according to these parameters.

次に量子化について説明する。Next, quantization will be explained.

まずデータ読み出し回路712が端子711を介してブ
ロックバッファメモリ6から交流成分(係数番号にと極
性番号jのベア)の読み出しを開始する。このとき交流
成分の読み出し個数は量子化終了成分番号Xによって与
えられ、第12図(イ)または(ロ)に示される順序に
従フてX個の交流成分が読み出される。読み出された交
流成分のうち係数番号kが加算回路713に取り込まれ
、量子化条件設定部70内の条件設定テーブル705に
よって設定された量子化オフセットαが加算されて第2
次係数番号に’  (k” =に+α)を得る0次に第
2次係数番号に′が除算回路714に取り込まれ1条件
設定テーブル705によって設定された量子化除数βで
割り算されて、符号番号見(i=int(k’ /β)
)なる固定長符号を得る。符号番号見は、端子715を
介して符号化装置8へ順次送り込まれる。また、上記符
号番号とベアをなす極性番号jはデータ読み出し回路7
12から端子716を介して符号化装置8へ順次送り込
まれる。
First, the data reading circuit 712 starts reading the AC component (the bare coefficient number and polarity number j) from the block buffer memory 6 via the terminal 711. At this time, the number of AC components read out is given by the quantization end component number X, and X AC components are read out in the order shown in FIG. 12 (a) or (b). The coefficient number k of the read AC component is taken into the addition circuit 713, and the quantization offset α set by the condition setting table 705 in the quantization condition setting section 70 is added to the second coefficient number k.
The second coefficient number '(k'' = +α) is taken into the division circuit 714 and divided by the quantization divisor β set by the 1st condition setting table 705 to obtain the code. Look at the number (i=int(k'/β)
) to obtain a fixed length code. The code numbers are sequentially sent to the encoding device 8 via the terminal 715. In addition, the polarity number j that is bare with the above code number is the data readout circuit 7.
12 and are sequentially sent to the encoding device 8 via a terminal 716.

次に第8図(イ)の符号化装置8の動作について説明す
る。
Next, the operation of the encoding device 8 shown in FIG. 8(a) will be explained.

まず、符号モードO(y=o)の場合について説明する
と、量子化装置7の量子化部71から出力される符号番
号文がスイッチ回路801を経てモート0符号化部80
へ送られ、これと同時に符号番号又とベアをなす極性番
号jが量子化部71のデータ読み出し回路712からモ
ード0符号化部80へ送られる0次にモート〇へフマ゛
ン符号テーブル802が符号番号文と極性番号jを可変
長符号hn3に変換し、端子815から出力する。
First, to explain the case where the code mode is O (y=o), the code number sentence output from the quantizer 71 of the quantizer 7 passes through the switch circuit 801 to the mote 0 encoder 80.
At the same time, the polarity number j which is bare with the code number is sent from the data reading circuit 712 of the quantization unit 71 to the mode 0 encoding unit 80. The code number sentence and polarity number j are converted into a variable length code hn3 and output from the terminal 815.

第11図(ハ)にモード0ハフマン符号テーブル802
の一例を示す。
FIG. 11(c) shows a mode 0 Huffman code table 802.
An example is shown below.

以上水したように、符号モードOの場合、符号化部装置
8はχ個の符号番号文に対しX個の可変長符号h’zJ
 を出力する。
As mentioned above, in the case of code mode O, the encoding unit device 8 generates X variable length codes h'zJ for χ code number sentences.
Output.

次に、符号モード1(y=1)の場合の動作について第
1O図のフローチャートを用いて説明する。
Next, the operation in the case of code mode 1 (y=1) will be explained using the flowchart of FIG. 1O.

量子化部に7の量子化部71から出力される符号番号見
がスイッチ回路801を経てモードl符号化部81内の
ゼロ判定回路811に読み込まれると(P−1)、ゼロ
判定回路811が符号番号文のぜひ判定を行なう(P−
2)、ステップ(P−2)の判定において文がゼロであ
れば、ゼロカウンタ813のゼロカウント値Zを+1カ
ウントアツプしくP−3)、もし文かゼロでなければ、
ゼロカウント値2がゼロかどうかを判定する(P−4)
、ステップ(P−4)の判定において、ゼロカウント値
Zがゼロであれば符号番号旦およびこれとベアをなす極
性番号jをモート1ハフマン符号テーブル812によっ
て可変長符号り巧に変換して(p−s)端子815より
hzj を出力する(P−6)、ステップ(P−4)の
判定において、ゼロカウント値2がゼロでなければゼロ
カウント値ZをBl符号テーブル814によって可変長
符号r8に変換しくP−7)、次にゼロカウント値2を
ゼロクリアしくP−8)、次に「8を端子815から出
力した後(P−9)ステップ(P−5)、ステップ(P
−6)により符号番号文、極性番号jに対する可変長符
号hfjを端子815へ出力する。。
When the code number output from the quantization unit 71 of 7 is read into the zero judgment circuit 811 in the mode I encoding unit 81 via the switch circuit 801 (P-1), the zero judgment circuit 811 Please make sure to judge the code number statement (P-
2) If the sentence is zero in the judgment of step (P-2), count up the zero count value Z of the zero counter 813 by +1 (P-3), if the sentence is not zero,
Determine whether zero count value 2 is zero (P-4)
, in the determination of step (P-4), if the zero count value Z is zero, the code number d and the polarity number j that is bare thereto are converted into a variable length code by the mote 1 Huffman code table 812 ( p-s) Output hzzj from the terminal 815 (P-6). In the judgment of step (P-4), if the zero count value 2 is not zero, the zero count value Z is converted into a variable length code r8 by the Bl code table 814. Convert to P-7), then clear the zero count value 2 to zero P-8), then output "8" from terminal 815 (P-9), step (P-5), step (P-8).
-6), the variable length code hfj for the code number sentence and polarity number j is output to the terminal 815. .

上記の処理過程は以下に示す3つの過程に分類される。The above processing steps are classified into the following three steps.

(P−1) ↓ (P−2) (P−3)      (P−4) (P−5)      (P−7) ラン長          ↓           
↓カウント          (P−6)     
    (P−8)過程           ↓ ハフマン符号       (P−9)化過程    
 ↓ (p−s) ↓ (P−6) ランレングス−ハフマン符号化過程 上記3つの処理過程のうちのいずれかが1プロ・ンク分
X個の成分(符号番号文)に対してくり返し行なわれる
(P−10)、x個目の成分に対する上記いずれかの処
理過程が終了するとゼロカウンタ813のゼロカウンタ
値2がゼロかどうかの判定が行なわれ(P−11)、も
しゼロカウント値2がゼロでなければ、ランレングス−
ハフマン符号化過程の−うちのステップ(P−7)、(
P−8)、(P−9)を経た後、lブロック分の符号化
作業を終了する。
(P-1) ↓ (P-2) (P-3) (P-4) (P-5) (P-7) Run length ↓
↓Count (P-6)
(P-8) Process ↓ Huffman code (P-9) Process
↓ (p-s) ↓ (P-6) Run-length Huffman encoding process Any of the above three processing processes is repeated for X components (code number sentences) for one pro-nk. (P-10), when any of the above processing steps for the If not zero, run length -
The first step (P-7) of the Huffman encoding process, (
After passing through steps P-8) and (P-9), the encoding work for l blocks is completed.

以上説明したように、符号モードlの場合は符号化部!
8はX個の成分に対し、X個以下の可変長符号(h9 
もしくは「t)を出力する。
As explained above, in the case of code mode l, the encoder!
8 is a variable length code (h9
Or output "t).

第11図(イ)にモード0ハフマン符号テーブル802
の一例を示し、第11図(ロ)にモード1ハフマン符号
テーブル812の一例を示す。
FIG. 11(a) shows a mode 0 Huffman code table 802.
An example of the mode 1 Huffman code table 812 is shown in FIG. 11(b).

本例は各クラスに共通のハフマン符号を用いた例である
0本実施例のように一様量子化を行なう場合は各−クラ
スごとに最適なハフマン符号を用いたときと各クラスに
共通のハフマン符号を用いたときとて圧縮率に大きな違
いがないため、各クラスに共通のハフマン符号を用いる
ことによりよりシンプルな装置化が可能となる。
This example uses a Huffman code that is common to each class. When performing uniform quantization as in this example, there is a case where a Huffman code that is common to each class is used, and a Since there is no big difference in compression rate when Huffman codes are used, simpler device implementation is possible by using a common Huffman code for each class.

第11図(ハ)はB1符号テーブル814の一例を示す
FIG. 11(c) shows an example of the B1 code table 814.

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

次に、第8図(ロ)に示す符号化装置8′について説明
する。なお第8図(イ)の符号化装置!isと区別する
ため、符号化装置8′とする。
Next, the encoding device 8' shown in FIG. 8(b) will be explained. Furthermore, the encoding device shown in FIG. 8 (a)! In order to distinguish it from is, it is referred to as encoding device 8'.

符号化装置8′は、モード0符号化部80’と、モード
1符号化部81’ と、モード選択部82′とにより構
成されている。ここてモードO符号化部80′およびモ
ートl符号化部81’は第8図(イ)で説明したモート
0符号化部80およびモード1符号化部81と同様の機
能を持つ。
The encoding device 8' includes a mode 0 encoding section 80', a mode 1 encoding section 81', and a mode selection section 82'. Here, the mode O encoding section 80' and the mote I encoding section 81' have the same functions as the mote 0 encoding section 80 and the mode 1 encoding section 81 described in FIG. 8(A).

端子801’は第2量子化装置7′ (図示せず)と接
続されており、ここから符号番号文を読み込む、第2量
子化装置7′は第8図(イ)で説明した第2量子化装g
17と同様の機能を持つが、第2量子化装置7′はモー
ド番号yを符号化装置8′に対して出力しない。
The terminal 801' is connected to a second quantizer 7' (not shown) from which the code number sentence is read. Kaso-g
17, but the second quantizer 7' does not output the mode number y to the encoder 8'.

以下に第8図(ロ)に示した符号化装置8′の動作につ
いて説明する。
The operation of the encoding device 8' shown in FIG. 8(b) will be explained below.

まず端子801′から読み込まれた符号番号文はモード
0符号化部80′とモードl符号化部81′に送られ、
符号モードlの符号化と符号モード0の符号化とが並行
して行なわれる。モード1符号化部81′から出力され
る可変長符号h「2と、モード0符号化部80′から出
力される可変長符号h は、それぞれモード選択部82
′内のモードl符号バッファ824′とモード0符号バ
ッファ823′に順次格納される。この際、モード1ビ
ツトカウンタ822′はモートl符号化部81′から出
力されるすべての可変長符号の累積ビット数を求め、モ
ード0ビツトカウンタ821’はモード0符号化部80
’から出力されるすべての可変長符号の累積ビット数を
求める。lブロック分の符号化が終了すると、モード選
択回路825′はモートlビットカウンタ822′とモ
ードOビットカ・ウンタ821′のカウント値(1ブロ
ック分の符号の累積ビット数)を比較する。
First, the code number sentence read from the terminal 801' is sent to the mode 0 encoding section 80' and the mode I encoding section 81'.
Encoding in code mode 1 and encoding in code mode 0 are performed in parallel. The variable length code h2 output from the mode 1 encoder 81' and the variable length code h2 output from the mode 0 encoder 80' are each output from the mode selector 82.
' is sequentially stored in the mode l code buffer 824' and the mode 0 code buffer 823'. At this time, mode 1 bit counter 822' calculates the cumulative number of bits of all variable length codes output from mode 1 encoding section 81', and mode 0 bit counter 821' calculates the cumulative number of bits of all variable length codes output from mode 0 encoding section 81'.
Find the cumulative number of bits of all variable-length codes output from '. When the encoding for l blocks is completed, the mode selection circuit 825' compares the count values (the cumulative number of bits of the code for one block) of the mote l bit counter 822' and the mode O bit counter 821'.

もし、モート0ビツトカウンタ821′のカウント値が
モード1ビツトカウンタ822′のカウント値より大き
ければ、端子827′に符号モート1 (y=1)を出
方し、モードl符号バッファ824′内の1ブロック分
の符号列を端子826′へ出力する。
If the count value of the mote 0 bit counter 821' is larger than the count value of the mode 1 bit counter 822', the code mote 1 (y=1) is output to the terminal 827', and the code mote 1 (y=1) is output from the mode I code buffer 824'. One block worth of code string is output to terminal 826'.

一方、モードOビットカウンタ821′のカウント値が
モード1ビツトカウンタ822′のカウント値以下であ
れば、端子827′に符号モートO(y=o)を出方し
、モード0符号バッファ823′内の1ブロック分の符
号列を端子826′へ出力する。各ビットカウンタのカ
ウント値は、カウント値の比較が終了した時点でゼロク
リアされる。
On the other hand, if the count value of mode O bit counter 821' is less than the count value of mode 1 bit counter 822', code mode O (y=o) is output to terminal 827' and stored in mode 0 code buffer 823'. The code string for one block is output to the terminal 826'. The count value of each bit counter is cleared to zero when the comparison of the count values is completed.

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

階調画t!4)変換係数は高周波成分はど振幅が小さく
なる傾向が強いため、ゼロに量子化される成分の発生す
る確率も高周波成分はど高くなる。
Gradation painting t! 4) Since the conversion coefficient has a strong tendency for the amplitude to become smaller for high frequency components, the probability of occurrence of a component that is quantized to zero also increases for high frequency components.

従って、第12図(イ)もし欠は(ロ)に示すように、
低周波側から高周波方向に向かって量子化と符号化を行
なえば長いゼロランが発生する確率が高まり、有効なラ
ンレングス符号化を行なうことかできる。なお、量子化
終了成分番号がXのときは、低周波側からX個の成分の
みを読み込み、x+1個目から255個目までの交流成
分は読み込みを行なわない。
Therefore, as shown in Figure 12 (a), if the missing part is (b),
If quantization and encoding are performed from the low frequency side toward the high frequency side, the probability that a long zero run will occur increases, and effective run length encoding can be performed. Note that when the quantization end component number is X, only X components from the low frequency side are read, and AC components from x+1th to 255th are not read.

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

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

第13図(ロ)はヘッダ部構成の一例であり、ブロック
サイズ(本例では16)、画像ライン方向のブロック数
、画像カラム方向のブロック数および圧縮率番号Pが格
納されてい葛。
FIG. 13(b) is an example of the header structure, and stores the block size (16 in this example), the number of blocks in the image line direction, the number of blocks in the image column direction, and the compression ratio number P.

第13図(ハ)は各ブロックの符号構成の一例であり、
クラス番号me(本例では3ビツトの固定長符号)符号
モードy(固定長符号)、直流成分符号(固定長符号)
、それに続に交流成分符号列(可変長符号列)より成る
。交流成分符号列は同図(ニ)に示すようなq(I(1
≦9≦255)の符号より成る係数符号列(可変長符号
列hIL、7I。
FIG. 13(c) is an example of the code structure of each block,
Class number me (3-bit fixed length code in this example) Code mode y (fixed length code), DC component code (fixed length code)
, followed by an AC component code string (variable length code string). The AC component code string is q(I(1
≦9≦255) coefficient code string (variable length code string hIL, 7I).

hlzjz 、”” ”1J1r )と同図(ホ)に示
すようなラン長符号゛(可変長符号rz)とが交互に並
ぶ構成となる。     ・ 以下に本実施例に用いた各種パラメータの一例を示す、
なおAo−A、は、第6図に示した各カウンタの動作範
囲を示す定数である。
hlzzz, ``1J1r'') and the run length code ゛ (variable length code rz) as shown in the same figure (e) are arranged alternately. Below are examples of various parameters used in this example. show,
Note that Ao-A is a constant indicating the operating range of each counter shown in FIG.

基本量子化幅WO=o、zs A o =0−50. A I = 0.75A t 
= 1.00. A 3= 1.25A4 =1.50
. AI!=1.75A6 =2.DD、 At =2
.25S、 =S、 =200 本例ではP;Oの場合圧縮率が115、P=1の場合圧
縮率が1710前後となる。
Basic quantization width WO=o, zs A o =0-50. A I = 0.75 A t
= 1.00. A3=1.25A4=1.50
.. AI! =1.75A6 =2. DD, At =2
.. 25S, =S, =200 In this example, when P;O, the compression ratio is 115, and when P=1, the compression ratio is around 1710.

なお上記パラメータは原画像の画素当りの情報量がnビ
ット(本例ではn=8)でブロックサイズがN x N
−(本例ではN=16)のとき、プロッり画像をf (
x、y)、変換係数行列なF (u。
Note that the above parameters are such that the amount of information per pixel of the original image is n bits (n = 8 in this example) and the block size is N x N.
− (N=16 in this example), the plotted image is f (
x, y), the transformation coefficient matrix F (u.

■)で表わした2次元ディスクリートコサイン変換式(
次式に示す)を用いた場合の値である。
■) Two-dimensional discrete cosine transformation formula (
(shown in the following formula) is used.

また本発明においては、2次元ディスクリートコサイン
変換装置3の代りに、他の直交変換装置、たとえば2次
完アダマール変換装置、スラント変換装置などを用いて
もよい、また本発明ではブロックサイズを16x16の
サイズに限定するものではなく、8×8.32X32.
64X64などのサイズでも適応可能であり、また原画
像の1画素当りのビット数も8ビツトに限定するもので
はない、またランク分は装置5において、特定区間内の
係数番号kをカウントする際、特定区間を多数段けず、
1つの特定区間内に存在する係数番号にの個数の大小に
基づいてランク分けを行なうことも可能である。また、
本発明におけるランク分はパラメータを他のクラス分は
パラメータと組合わせてクラス分けを行うことも可能で
ある。
Further, in the present invention, other orthogonal transform devices such as a quadratic complete Hadamard transform device, a slant transform device, etc. may be used instead of the two-dimensional discrete cosine transform device 3. Also, in the present invention, the block size is set to 16x16. The size is not limited to 8 x 8.32 x 32.
It is also applicable to sizes such as 64x64, and the number of bits per pixel of the original image is not limited to 8 bits.Also, the rank is determined by the device 5, when counting the coefficient number k within a specific section. Without making many steps in a specific section,
It is also possible to perform rankings based on the number of coefficient numbers existing within one specific section. Also,
In the present invention, it is also possible to perform classification by combining parameters for ranks with parameters for other classes.

(発明の効果) 以上説明したように、本発明においては、ハフマン符号
とランレングス符号の両方を用いる符号化方式と、ハフ
マン符号だけ用いる符号化方式の2つの符号化方式を用
意し、lブロック分の変換係数(交流成分)を符号化す
る際、lブロック分の符号長が短くなる符号化方式を圧
縮度合と量子化幅の関数としてあらかじめ定めておくか
、もしくは、2つの符号化方式で符号死後符号長を比較
して符号長の短かくなる符号化方式を選択するかして、
各ブロックごとに符号化効率のよい符号化方式を選択す
ることによりむだのない圧縮を行なうことができる。
(Effects of the Invention) As explained above, in the present invention, two encoding methods are prepared, one using both a Huffman code and a run-length code, and the other using only a Huffman code. When encoding transform coefficients (alternating current components) for 1 block, the encoding method that shortens the code length for 1 block is determined in advance as a function of the compression degree and quantization width, or two encoding methods are used. Either compare the code lengths after code death and select the encoding method with the shortest code length.
By selecting an encoding method with good encoding efficiency for each block, efficient compression can be performed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明による符号化方法を用いた階調画像デー
タ圧縮方法のブロック線図、第2図は第1図に示した第
1量子化装置の一例のブロック線図、第3図は変換係数
交流成分を量子化して得られる係数番号と極性番号を変
換係数の発生頻度との関係で示す図、第4図は第1図に
示したランク分は装置の一例のブロック線図、第5図(
イ)はカウンタ制御コード表、(ロ)はカウンタ制御コ
ートと各カウンタの対応関係を示す図、第6図はカウン
タ制御回路内の各カウンタの動作範囲を示す図、第7図
は比較回路の比較手順を示すフローチャート、第8図(
イ)は符号化前に符号化方式を選択する場合の第1図に
示した第2量子化装置および符号化装置の一例のブロッ
ク線図、同図(ロ)は符号化後に符号化方式を選択する
場合の符号化装置の他の例のブロック線図、第9図(イ
)および(ロ)は第8図に示した条件変換テーブル、(
ハ)は第8図に示した加算回路および除算回路をテーブ
ル化した場合の量子化オフ、セットαおよび量子化除数
β、第1O図は第1図に示した符号化装置によるモード
lの交流成分符号化手順を示すフローチャート、第j1
図(イ)および(ロ)はそれぞれ第8図のハフマン符号
テーブルの一例、同図(ハ)は第8図のB1符号テーブ
ルの一例、第12図(イ)および(ロ)は第8図のデー
タ読み出し回路におけるデータ読み出し順序を示す図、
第13図(イ)、(ロ)、(ハ)、(ニ)、(ホ)、は
符号構成の内容の一例を示す図である。 l・・・フレームメモリ、2・・・読み出し装置、3・
・・2次元ディスクリートコサイン変換装置、4・・・
第1量子化装置、5・・・ランク分は装置、6・・・ブ
ロックバッファメモリ、7−・・第2量子化装置、8・
・・符号化部は
FIG. 1 is a block diagram of a gradation image data compression method using the encoding method according to the present invention, FIG. 2 is a block diagram of an example of the first quantization device shown in FIG. 1, and FIG. Figure 4 is a diagram showing the coefficient number and polarity number obtained by quantizing the transform coefficient AC component in relation to the frequency of occurrence of the transform coefficient. Figure 5 (
(a) is a counter control code table, (b) is a diagram showing the correspondence between the counter control code and each counter, Figure 6 is a diagram showing the operating range of each counter in the counter control circuit, and Figure 7 is a diagram of the comparison circuit. Flowchart showing the comparison procedure, Figure 8 (
B) is a block diagram of an example of the second quantization device and the encoding device shown in FIG. 1 when the encoding method is selected before encoding, and FIG. The block diagrams of other examples of the encoding device in the case of selection, FIGS. 9(a) and (b), are the condition conversion table shown in FIG.
C) shows the quantization off, set α, and quantization divisor β when the addition circuit and division circuit shown in FIG. 8 are tabulated; FIG. Flowchart showing component encoding procedure, j1th
Figures (A) and (B) are examples of the Huffman code table in Figure 8, Figure (C) is an example of the B1 code table in Figure 8, and Figures 12 (A) and (B) are examples of the Huffman code table in Figure 8. A diagram showing the data read order in the data read circuit of
FIGS. 13(a), (b), (c), (d), and (e) are diagrams showing an example of the contents of the code structure. l...Frame memory, 2...Reading device, 3.
...Two-dimensional discrete cosine transform device, 4...
First quantizer, 5... Device for ranks, 6... Block buffer memory, 7-- Second quantizer, 8...
...The encoding part is

Claims (5)

【特許請求の範囲】[Claims] (1)デジタル化された階調画像データを複数のブロッ
クに分割し、ブロックごとに直交変換を施して得られる
変換係数を量子化し符号化する階調画像データの圧縮に
おける符号化方法において、1つの成分に対して1つの
可変長符号を割り当てる符号系列と成分の個数に対して
1つの可変長符号を割り当てる符号系列の2つの符号系
列を用いる第1の符号化方式と、1つの成分に対して1
つの可変長符号を割り当てる符号系列のみを用いる第2
の符号化方式とを用意し、各ブロック単位に、前記第1
、第2の符号化方式のいずれかを選択し、選択した符号
化方式を用いて符号化を行なうことを特徴とする階調画
像データの圧縮における符号化方法。
(1) In an encoding method for compressing gradation image data, in which digitized gradation image data is divided into a plurality of blocks, and transform coefficients obtained by performing orthogonal transformation on each block are quantized and encoded. A first encoding method uses two code sequences: a code sequence that assigns one variable-length code to each component, and a code sequence that assigns one variable-length code to each number of components; te1
The second method uses only code sequences that allocate two variable length codes.
The first encoding method is prepared for each block.
, a second encoding method, and encoding is performed using the selected encoding method.
(2)量子化時の量子化幅の関数と高周波成分のカット
度合の関数のいずれか一方または両方として前記第1、
第2の符号化方式のいずれかを用いるかを示したテーブ
ルを持ち、符号化前に該テーブルを参照することにより
符号化方式を決定することを特徴とする請求項1に記載
の符号化方法。
(2) The first,
The encoding method according to claim 1, further comprising a table indicating which of the second encoding methods is used, and determining the encoding method by referring to the table before encoding. .
(3)2通りの符号化方式で符号化を行ない、符号化後
に符号長を比較し、符号長の短かい符号化方式を選択す
る請求項1に記載の符号化方法。
(3) The encoding method according to claim 1, wherein encoding is performed using two encoding methods, the code lengths are compared after encoding, and the encoding method with the shorter code length is selected.
(4)1つの成分に対して1つの可変長符号を割り当て
る符号系列がハフマン符号系列である請求項1に記載の
符号化方法。
(4) The encoding method according to claim 1, wherein the code sequence that assigns one variable length code to one component is a Huffman code sequence.
(5)成分の個数に対して1つの可変長符号を割り当て
る符号系列がB1符号系列である請求項1に記載の符号
化方法。
(5) The encoding method according to claim 1, wherein the code sequence in which one variable length code is assigned to each number of components is a B1 code sequence.
JP63063130A 1988-03-18 1988-03-18 Encoding method in compression of gradation picture data Pending JPH01237774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63063130A JPH01237774A (en) 1988-03-18 1988-03-18 Encoding method in compression of gradation picture data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63063130A JPH01237774A (en) 1988-03-18 1988-03-18 Encoding method in compression of gradation picture data

Publications (1)

Publication Number Publication Date
JPH01237774A true JPH01237774A (en) 1989-09-22

Family

ID=13220382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63063130A Pending JPH01237774A (en) 1988-03-18 1988-03-18 Encoding method in compression of gradation picture data

Country Status (1)

Country Link
JP (1) JPH01237774A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0575113A2 (en) * 1992-06-15 1993-12-22 Matsushita Electric Industrial Co., Ltd. Bit rate reduction apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0575113A2 (en) * 1992-06-15 1993-12-22 Matsushita Electric Industrial Co., Ltd. Bit rate reduction apparatus
EP0575113A3 (en) * 1992-06-15 1994-11-09 Matsushita Electric Ind Co Ltd Bit rate reduction apparatus.
US5481309A (en) * 1992-06-15 1996-01-02 Matsushita Electric Industrial Co., Ltd. Video signal bit rate reduction apparatus having adaptive quantization
US5585853A (en) * 1992-06-15 1996-12-17 Matsushita Electric Industrial Co., Ltd. Bit rate reduction apparatus

Similar Documents

Publication Publication Date Title
US10045034B2 (en) System and method for using pattern vectors for video and image coding and decoding
US5654706A (en) System for variable length decoding digital transmission data which has been compressed by selecting a scanning pattern
US5241395A (en) Adaptive transform coding using variable block size
JP2633793B2 (en) Method and apparatus for variable length encoding / decoding of video data
US6301392B1 (en) Efficient methodology to select the quantization threshold parameters in a DWT-based image compression scheme in order to score a predefined minimum number of images into a fixed size secondary storage
US5822000A (en) Video encoding using rearrangement of transform coefficients and inter-block correlation
JPH07170517A (en) Picture compression coder
Messaoudi DCT-based compression algorithm using reduced adaptive block scanning for color image
US5724096A (en) Video signal encoding method and apparatus employing inter-block redundancies
JPH01237774A (en) Encoding method in compression of gradation picture data
JP2841197B2 (en) Method of compressing gradation image data
JP2811304B2 (en) Method of compressing gradation image data
JP2511669B2 (en) Compressor for gradation image data
WO1998054841A1 (en) Data compressing device by permutation encoding and decompressing device
JPH0670175A (en) Method and device for encoding picture data
KR100295802B1 (en) Image data compression device using multiple variable encoding tables
JP2668900B2 (en) High efficiency coding device
JPH0310486A (en) Moving picture encoder
JP2821496B2 (en) Method of compressing gradation image data
JPH07283948A (en) Compressing device for gradation picture data
JPH05328137A (en) Data compressing device
JP2802136B2 (en) Image data encoding method and apparatus
JP2862457B2 (en) Encoding / decoding method of image information
JPH029271A (en) Compression rate conversion method for picture data
JPH0646268A (en) Code quantity controller