JP2820807B2 - Image data encoding method - Google Patents

Image data encoding method

Info

Publication number
JP2820807B2
JP2820807B2 JP3057393A JP5739391A JP2820807B2 JP 2820807 B2 JP2820807 B2 JP 2820807B2 JP 3057393 A JP3057393 A JP 3057393A JP 5739391 A JP5739391 A JP 5739391A JP 2820807 B2 JP2820807 B2 JP 2820807B2
Authority
JP
Japan
Prior art keywords
coefficients
coefficient
quantization
image data
code amount
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 - Fee Related
Application number
JP3057393A
Other languages
Japanese (ja)
Other versions
JPH04291882A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3057393A priority Critical patent/JP2820807B2/en
Publication of JPH04291882A publication Critical patent/JPH04291882A/en
Application granted granted Critical
Publication of JP2820807B2 publication Critical patent/JP2820807B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は画像データ符号化方法に
係わり、特に多値画像を複数の画素からなるブロックに
分割し、ブロック内の画素の階調値を直交変換した後に
符号化する画像データ符号化方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data encoding method, and more particularly, to an image to be encoded after dividing a multi-valued image into blocks composed of a plurality of pixels, and performing orthogonal transformation on the gradation values of the pixels in the block. The present invention relates to a data encoding method.

【0002】数値データに比べて情報量が桁違いに大き
い画像データ、特に、中間調画像やカラ−画像のデータ
を蓄積し、あるいは、高速、高品質で伝送するために
は、画素毎の階調値を高能率に符号化する必要がある。
In order to store image data whose information amount is orders of magnitude larger than numerical data, in particular, data of halftone images and color images, or to transmit them at high speed and with high quality, it is necessary to use a pixel-by-pixel level. The key values need to be encoded efficiently.

【0003】画像データの高能率な圧縮方式としては、
例えば適応離散コサイン変換符号化方式(Adaptive Dis
crete Cosine Transform以下、略して「ADCT」と称
する)が知られている。
A highly efficient compression method for image data is as follows.
For example, adaptive discrete cosine transform coding (Adaptive Dis
The Crete Cosine Transform (hereinafter abbreviated as "ADCT") is known.

【0004】ADCT方式は、画像を8×8画素からな
るブロックに分割し、各ブロックの画信号を二次元離散
コサイン変換(以下、「DCT変換」と称する)により
空間周波数分布のDCT係数に変換し、視覚に適合した
閾値で量子化し、求まった量子化DCT係数を統計的に
求めたハフマン・テ−ブルにより符号化するものであ
る。
In the ADCT method, an image is divided into blocks each having 8 × 8 pixels, and an image signal of each block is converted into DCT coefficients of a spatial frequency distribution by a two-dimensional discrete cosine transform (hereinafter, referred to as “DCT transform”). Then, the quantized DCT coefficients are quantized by a threshold value suitable for the visual sense, and the obtained quantized DCT coefficients are encoded by a Huffman table statistically obtained.

【0005】[0005]

【従来の技術】図5は従来のADCT符号化回路のブロ
ック図である。画像を図9に示す8×8画素からなるブ
ロックに分割し、端子31から2次元DCT変換部32
に入力する。2次元DCT変換部32では、入力された
画信号をDCTにより直交変換して、図10に示す空間
周波数分布のDCT係数に変換し、線形量子化部33に
出力する。具体的には、図6に示すように、端子31よ
り入力された画像信号は1次元DCT変換部32aで1
次元DCT変換され、転置部32bに出力される。転置
部32bは、1ブロック内の係数の行と列を入れ替えて
1次元DCT変換部32cに出力する。1次元DCT変
換部32cは、入力された転置後の係数を再び1次元D
CT変換し、転置部32dに出力する。転置部32d、
転置部32bと同様に再度1ブロック内の係数の行と列
を入れ替えることにより得られる信号を端子31′から
線形量子化部33に出力する。
2. Description of the Related Art FIG. 5 is a block diagram of a conventional ADCT encoding circuit. The image is divided into blocks of 8 × 8 pixels shown in FIG.
To enter. In the two-dimensional DCT transform unit 32, the input image signal is orthogonally transformed by DCT, converted into DCT coefficients of a spatial frequency distribution shown in FIG. 10 and output to the linear quantization unit 33. Specifically, as shown in FIG. 6, the image signal input from the terminal 31 is converted into one-dimensional data by the one-dimensional DCT converter 32a.
Dimensional DCT is performed and output to the transposition unit 32b. The transposition unit 32b exchanges the rows and columns of the coefficients in one block and outputs the result to the one-dimensional DCT transform unit 32c. One-dimensional DCT transform section 32c converts input transposed coefficients into one-dimensional D
CT conversion is performed and output to the transposition unit 32d. Transposed part 32d,
Similarly to the transposition unit 32b, a signal obtained by exchanging the rows and columns of the coefficients in one block again is output from the terminal 31 'to the linear quantization unit 33.

【0006】再び、図5を参照するに、線形量子化部3
3では、入力されたDCT係数を、視覚実験により決め
られた図11に示す閾値で構成する量子化マトリクス3
4の各々に、量子化制御パラメ−タを乗算して量子化閾
値を求め、この量子化閾値によりDCT係数を除算して
量子化DCT係数を求める線形量子化を行う。この量子
化の結果、図12に示すように、閾値以下のDCT係数
は零となり、DC成分とわずかなAC成分のみが値を持
つ量子化DCT係数が生成される。
Referring to FIG. 5 again, the linear quantization unit 3
In step 3, the input DCT coefficient is converted into a quantization matrix 3 composed of the threshold values shown in FIG.
4 is multiplied by a quantization control parameter to obtain a quantization threshold, and a DCT coefficient is divided by the quantization threshold to perform a linear quantization for obtaining a quantized DCT coefficient. As a result of this quantization, as shown in FIG. 12, the DCT coefficient equal to or smaller than the threshold value becomes zero, and a quantized DCT coefficient having only DC component and a small AC component has a value.

【0007】2次元的に配列された量子化DCT係数
は、図13に示すジグザグスキャンにより1次元に変換
され、可変長符号化部35に入力される。可変長符号化
部35は、各ブロック先頭のDC成分と前ブロックのD
C成分との差分を可変長符号化する。AC成分について
は零でない有効係数の値(以下、「インデックス」と称
す)と、インデックスまでの零となる無効係数のランの
長さ(以下、「ラン」と称す)を可変長符号化する。更
に、DC,AC各成分は、画像毎の統計量をもとに作成
するハフマン・テ−ブルで構成する符号表36を用いて
符号化され、得られた符号データは順次、端子37より
出力される。
[0007] The quantized DCT coefficients arranged two-dimensionally are converted into one dimension by zigzag scan shown in FIG. 13 and input to the variable length coding unit 35. The variable length coding unit 35 calculates the DC component at the head of each block and the D component of the previous block.
The difference from the C component is variable-length coded. For the AC component, a variable-length coding is performed on the value of a non-zero effective coefficient (hereinafter, referred to as an “index”) and the length of a run of an invalid coefficient that becomes zero up to the index (hereinafter, referred to as a “run”). Further, DC and AC components are encoded using a code table 36 composed of a Huffman table created based on statistics for each image, and the obtained code data is sequentially output from a terminal 37. Is done.

【0008】一方、符号データは以下の方法により画像
に復元される。図7にADCT復元回路のブロック図を
示す。図7において、端子10から入力された符号デー
タは、可変長復号部11に入力される。可変長復号部1
1では、符号表36(図5参照)のハフマン・テ−ブル
と逆のテ−ブルで構成する復号表12により、入力され
た符号データをインデックスとランの固定長データに復
号し、逆量子化部51に出力する。逆量子化部51は、
量子化マトリクス34の各々を量子化制御パラメ−タで
乗算した値(量子化閾値)で乗算することにより、入力
された量子化DCT係数を逆量子化してDCT係数を復
元し、2次元逆DCT変換部52に出力する。
On the other hand, the code data is restored to an image by the following method. FIG. 7 shows a block diagram of the ADCT restoration circuit. In FIG. 7, code data input from a terminal 10 is input to a variable-length decoding unit 11. Variable length decoding unit 1
In step 1, the input code data is decoded into fixed-length data of an index and a run by the decoding table 12 composed of a table opposite to the Huffman table of the code table 36 (see FIG. 5), and the inverse quantum Output to the conversion unit 51. The inverse quantization unit 51
By multiplying each of the quantization matrices 34 by a value (quantization threshold) multiplied by a quantization control parameter, the input quantized DCT coefficient is inversely quantized to restore the DCT coefficient, and the two-dimensional inverse DCT is performed. Output to the conversion unit 52.

【0009】2次元逆DCT変換部52は、入力された
DCT係数を逆DCT変換により直交変換し、空間周波
数分布のDCT係数を画信号に変換する。具体的には、
図8に示すように、端子21より入力されたDCT係数
は1次元逆DCT変換部23で1次元逆DCT変換さ
れ、転置部25に出力される。転置部25は、1ブロッ
ク内の係数の行と列を入れ替えて1次元逆DCT変換部
26に出力する。1次元逆DCT変換部26は、入力さ
れた転置後の係数を再び1次元逆DCT変換し、転置部
28に出力する。転置部28は、転置部25と同様に再
度1ブロック内の係数の行と列を入れ替えることにより
得られる信号を、端子14から出力することにより、画
像が復元される。
[0009] The two-dimensional inverse DCT transform unit 52 orthogonally transforms the input DCT coefficients by inverse DCT transform, and converts the DCT coefficients of the spatial frequency distribution into image signals. In particular,
As shown in FIG. 8, the DCT coefficient input from the terminal 21 is one-dimensional inverse DCT transformed by the one-dimensional inverse DCT transformer 23 and output to the transpose unit 25. The transposition unit 25 interchanges the rows and columns of the coefficients in one block and outputs the result to the one-dimensional inverse DCT transform unit 26. One-dimensional inverse DCT unit 26 performs one-dimensional inverse DCT on the input transposed coefficients again and outputs the result to transposed unit 28. The transposition unit 28 outputs a signal obtained by exchanging the rows and columns of the coefficients in one block again from the terminal 14 similarly to the transposition unit 25, thereby restoring the image.

【0010】かかるADCT方式において、画像を符号
化した時の符号量が所望の符号量となるように制御しな
ければならない場合がある。かかる必要性は、例えば、
限られた容量の記憶媒体(例えば、ICメモリやフロッ
ピ−デイスク等)に所定枚数の画像を入力する場合など
に生じる。
In such an ADCT method, there is a case where it is necessary to control a code amount when an image is coded so as to be a desired code amount. Such needs include, for example,
This occurs when a predetermined number of images are input to a limited-capacity storage medium (for example, an IC memory or a floppy disk).

【0011】従来は、DCT係数を量子化した後、可変
長符号化を行って符号量を求め、目的符号量と異なる場
合には量子化の粗さを変えて(量子化閾値を変えて)、
再度量子化、可変長符号化を行い、以後複数回の符号化
を繰り返して所望の符号量となるように制御している。
Conventionally, after DCT coefficients are quantized, variable length coding is performed to determine the code amount. If the code amount is different from the target code amount, the quantization roughness is changed (by changing the quantization threshold). ,
The quantization and variable length coding are performed again, and thereafter, the coding is repeated a plurality of times to control the code amount to a desired value.

【0012】又、別の方法として、符号化を1回だけ行
って可変長符号の符号量を計数し、該符号量から量子化
の粗さを予測すると共に、ブロック毎の符号量を制限し
ながら再度量子化及び可変長符号化を行っている。
As another method, encoding is performed only once, the code amount of the variable-length code is counted, the quantization roughness is predicted from the code amount, and the code amount for each block is limited. Quantization and variable length coding are performed again.

【0013】[0013]

【発明が解決しようとする課題】このように、従来技術
においては、所望の符号量となるように符号化を行うた
めに、最低1度は可変長符号化を行って符号量と量子化
の粗さとの関係を求め、該関係から所望の符号量となる
量子化の粗さを求めている。このことは、可変長符号化
と量子化との間でフィ−ドバック制御を行うことを意味
し、処理が複雑になる問題がある。
As described above, in the prior art, in order to perform encoding so as to obtain a desired code amount, variable-length encoding is performed at least once, and code amount and quantization are performed. The relationship with the roughness is determined, and the roughness of the quantization that provides a desired code amount is determined from the relationship. This means that feedback control is performed between variable-length coding and quantization, and there is a problem that processing becomes complicated.

【0014】又、可変長符号化には相当の時間を要し、
目的とする量子化の粗さを得るまでに相当の時間を要す
る問題がある。特に、第1の方法では、数回の可変長符
号化を必要とするため、かかる問題が顕著になる。
Also, variable-length encoding requires a considerable amount of time,
There is a problem that it takes a considerable time to obtain the desired quantization roughness. In particular, the first method requires several times of variable-length encoding, so that such a problem becomes conspicuous.

【0015】本発の目的は、このような従来の問題点に
鑑みてなされたもので、可変長符号化を行う必要がな
く、簡単な構成、処理で所望の符号量となるように符号
化ができる画像データ符号化方法を提供することであ
る。
The object of the present invention has been made in view of such conventional problems, and there is no need to perform variable-length encoding, and encoding is performed with a simple configuration and processing so that a desired code amount is obtained. It is an object of the present invention to provide a method for encoding image data.

【0016】[0016]

【課題を解決するための手段】図1は本発明の原理説明
図である。1は入力された画信号をDCTにより直交変
換して空間周波数分布のDCT係数に変換する2次元D
CT変換部、3はDCT係数に対して線形量子化処理を
施して量子化DCT係数を出力する線形量子化部、5は
ハフマン・テ−ブルで構成する符号表、6は符号表を用
いて量子化DCT係数を可変長符号に符号化する可変長
符号化部、7は量子化により得られる量子化DCT係数
に含まれる有効係数の個数を累積して1画面分の有効係
数の個数nを演算する有効係数累積部、8は指定された
符号量Fとなるように有効係数の個数nに基づいて量子
化閾値q(i)を決定して符号量を制御する符号量制御部
である。
FIG. 1 is a diagram illustrating the principle of the present invention. Numeral 1 denotes a two-dimensional D for orthogonally transforming an input image signal by DCT to convert to a DCT coefficient of a spatial frequency distribution.
The CT transform unit 3 is a linear quantization unit that performs a linear quantization process on DCT coefficients and outputs quantized DCT coefficients. 5 is a code table composed of Huffman tables. 6 is a code table using a code table. A variable length coding unit for coding the quantized DCT coefficient into a variable length code. The variable length coding unit 7 accumulates the number of effective coefficients included in the quantized DCT coefficient obtained by quantization and calculates the number n of effective coefficients for one screen. The effective coefficient accumulating unit 8 for calculating the code amount is a code amount control unit that determines the quantization threshold value q (i) based on the number n of effective coefficients and controls the code amount so that the designated code amount F is obtained.

【0017】[0017]

【作用】原画像をN×M個の画素からなる複数のブロッ
クに分割し、各ブロック内の複数の画素の階調値を2次
元DCT変換部1において直交変換してN×MのDCT
係数を出力する。線形量子化部3は1ブロック当りN×
M個のDCT係数のそれぞれをN×M個の対応する量子
化閾値q(i)(q(i)は0以上の正の整数、i=0〜N×
M−1)により除算して量子化し、有効係数累積部7は
量子化により得られた量子化DCT係数に含まれる有効
係数の個数を累積し、1画面分の有効係数の総個数nを
求める。符号量制御部8は指定された符号量Fとなるよ
うに、有効係数の個数nに基づいて量子化閾値q(i)を
決定し、可変長符号化部6より出力される可変長符号の
符号量を制御する。このようにすれば、可変長符号化を
行う必要がなく、簡単な構成、処理で所望の符号量とな
るように符号化ができ、しかも所望の符号量にするため
の量子化閾値q(i)を短時間で求めることが可能とな
る。
The original image is divided into a plurality of blocks of N × M pixels, and the tone values of the plurality of pixels in each block are orthogonally transformed by the two-dimensional DCT transform unit 1 to obtain an N × M DCT.
Output the coefficient. The linear quantization unit 3 performs N × per block.
Each of the M DCT coefficients is represented by N × M corresponding quantization thresholds q (i) (q (i) is a positive integer of 0 or more, i = 0 to N ×
The effective coefficient accumulating unit 7 accumulates the number of effective coefficients included in the quantized DCT coefficients obtained by quantization, and obtains the total number n of effective coefficients for one screen. . The code amount control unit 8 determines the quantization threshold value q (i) based on the number n of effective coefficients so that the code amount F becomes the designated code amount F, and controls the variable length code output from the variable length coding unit 6. Control the code amount. In this way, it is not necessary to perform variable-length encoding, encoding can be performed with a simple configuration and processing to obtain a desired code amount, and a quantization threshold value q (i ) Can be obtained in a short time.

【0018】[0018]

【実施例】全体の構成 図2は本発明の画像データ符号化方法の一実施例構成図
であり、図1と同一部分には同一符号を付している。
EXAMPLES In the overall configuration diagram 2 is an example block diagram of an image data coding method of the present invention, it is denoted by the same reference numerals as in FIG. 1.

【0019】1は画像を8×8画素からなるブロックに
分割した時、ブロック毎に8×8画素の画信号データP
CSを入力され、該画信号データをDCTにより直交変
換して空間周波数分布の8×8個のDCT係数に変換す
る2次元DCT変換部、2は8×8個のDCT係数を記
憶するDCT係数保持部である。
Reference numeral 1 denotes an image signal data P of 8 × 8 pixels for each block when the image is divided into blocks of 8 × 8 pixels.
A two-dimensional DCT conversion unit which receives CS, and orthogonally transforms the image signal data by DCT to convert it into 8 × 8 DCT coefficients of a spatial frequency distribution. 2 is a DCT coefficient which stores 8 × 8 DCT coefficients. It is a holding unit.

【0020】3はDCT係数に対して線形量子化処理を
施して量子化DCT係数を出力する線形量子化部で、1
ブロック当り8×8個のDCT係数のそれぞれを8×8
個の対応する量子化閾値q(i)(q(i)は0以上の正の整
数、i=0〜63)により除算して量子化する。
Reference numeral 3 denotes a linear quantization unit that performs a linear quantization process on the DCT coefficient and outputs a quantized DCT coefficient.
Each of 8 × 8 DCT coefficients per block is 8 × 8
The corresponding quantization thresholds q (i) (where q (i) is a positive integer greater than or equal to 0, i = 0 to 63) are quantized.

【0021】4は量子化により得られた量子化DCT係
数を記憶する量子化DCT係数保持部、5はハフマン・
テ−ブルで構成した符号表、6は可変長符号化部であ
り、2次元的に配列された8×8の量子化DCT係数が
ジグザグスキャンにより1次元に変換されて入力される
と、入力順に各量子DCT係数を符号表5を用いて符号
化する。
Reference numeral 4 denotes a quantized DCT coefficient holding unit for storing the quantized DCT coefficients obtained by the quantization.
A code table 6 composed of tables is a variable-length coding unit. When the 8 × 8 quantized DCT coefficients arranged two-dimensionally are converted into one-dimensional by zigzag scanning and input, the input is performed. Each quantum DCT coefficient is encoded using the code table 5 in order.

【0022】7は量子化により得られる量子化DCT係
数に含まれる有効係数の個数を累積して1画面分の有効
係数の総個数nを演算する有効係数累積部、8は指定さ
れた符号量Fとなるように有効係数の個数nに基づいて
量子化閾値q(i)を決定して符号量を制御する符号量制
御部であり、符号量・有効係数変換部81及び量子化閾
値決定部82を有している。
Reference numeral 7 denotes an effective coefficient accumulator for accumulating the number of effective coefficients included in the quantized DCT coefficients obtained by quantization to calculate the total number n of effective coefficients for one screen, and 8 denotes a designated code amount. A code amount control unit that determines a quantization threshold value q (i) based on the number n of effective coefficients to control the code amount so as to be F, a code amount / effective coefficient conversion unit 81 and a quantization threshold value determination unit 82.

【0023】符号量・有効係数変換部81は指定された
所望の符号量Fより1画面分の有効係数の総個数mを演
算するものである。符号量と1ブロック当りの平均有効
係数の個数との間には図3に示すように比例関係が成立
するから、符号量・有効係数変換部81は該比例関係か
ら指定符号化量Fに応じた1画面分の有効係数の総個数
mを演算する
The code amount / effective coefficient conversion section 81 calculates the total number m of effective coefficients for one screen from the designated desired code amount F. Since a proportional relationship is established between the code amount and the number of average effective coefficients per block as shown in FIG. 3, the code amount / effective coefficient conversion unit 81 calculates the code amount and the effective coefficient according to the designated coding amount F from the proportional relationship. Calculate the total number m of effective coefficients for one screen

【0024】量子化閾値決定部82は1画面分の有効係
数の総個数nと指定された符号量に基づいて得られる1
画面分の有効係数の総個数mの差により量子化閾値q
(i)を決定するもので、予め設定されている8×8個の
量子化閾値Q(i)(Q(i)は0以上の正の整数、i=0〜
63)を記憶する量子化閾値保持部82aと、1画面分
の有効係数の総個数nと指定された符号量に応じた1画
面分の有効係数の総個数mとの差により量子化閾値Q
(i)をスケ−リングするスケ−リングファクタ(重み係
数)SFを決定するスケ−リング制御部82bと、量子
化閾値Q(i)に重み係数SFを乗算して実際の量子化閾
値q(i)を出力する乗算器82cを備えている。
The quantization threshold value determination unit 82 obtains 1 based on the total number n of effective coefficients for one screen and the designated code amount.
Quantization threshold q by difference of total number m of effective coefficients for screen
(i) is determined, and 8 × 8 quantization thresholds Q (i) (Q (i) is a positive integer equal to or greater than 0, i = 0 to 0)
63), and a quantization threshold Q based on a difference between the total number n of effective coefficients for one screen and the total number m of effective coefficients for one screen according to the designated code amount.
A scaling control unit 82b for determining a scaling factor (weighting factor) SF for scaling (i), and multiplying the quantization threshold Q (i) by the weighting factor SF to obtain an actual quantization threshold q ( i) is provided.

【0025】重み係数SFを大にすれば、量子化閾値q
(i)は大きくなり(換言すれば量子化の粗さが大きくな
り)、有効係数の総個数nは減少し、重み係数SFを小
にすれば、量子化閾値q(i)は小さくなり(換言すれば
量子化の粗さが小さくなり)、有効係数の総個数nは増
大する。すなわち、重み係数と有効係数の総個数の関係
は図4に示すようになる。従って、スケ−リング制御部
82bは、有効係数n,mについて、その差が設定範囲
内になく、しかもn>mの場合には重み係数SFを大に
し、又、差が設定範囲内になく、かつn<mの場合には
重み係数SFを小にする。
If the weight coefficient SF is increased, the quantization threshold q
(i) increases (in other words, the roughness of quantization increases), the total number n of effective coefficients decreases, and if the weighting coefficient SF is reduced, the quantization threshold q (i) decreases ( In other words, the roughness of the quantization is reduced), and the total number n of effective coefficients is increased. That is, the relationship between the weight coefficient and the total number of effective coefficients is as shown in FIG. Therefore, the scaling control unit 82b increases the weight coefficient SF when the difference between the effective coefficients n and m is not within the set range, and when n> m, and when the difference is not within the set range. , And n <m, the weighting factor SF is reduced.

【0026】全体の動作 可変長符号化により得られるデータの符号量が所望符号
量と略等しくなるような量子化閾値q(i)(q(i)は0以
上の正の整数、i=0〜63)を、以下のステップによ
り決定する。尚、量子化閾値保持部9aには予め量子化
閾値Q(i)(Q(i)は0以上の正の整数、i=0〜63)
が保持されており、又初期時、重み係数SFは1である
とする。
Overall Quantization Threshold q (i) (q (i) is a positive integer greater than or equal to 0, i = 0, so that the code amount of data obtained by variable length coding becomes substantially equal to the desired code amount. To 63) are determined by the following steps. Note that the quantization threshold value holding unit 9a stores in advance the quantization threshold value Q (i) (Q (i) is a positive integer of 0 or more, i = 0 to 63).
, And the weighting factor SF is 1 at the initial stage.

【0027】(1) 2次元DCT変換部1は、入力された
1ブロック8×8画素の画信号データをDCTにより直
交変換して8×8個のDCT係数を求め、DCT係数保
持部2に記憶する。
(1) The two-dimensional DCT transform unit 1 orthogonally transforms the input image signal data of 8 × 8 pixels of one block by DCT to obtain 8 × 8 DCT coefficients. Remember.

【0028】(2) 符号量・有効係数変換部81は、入力
された所望の符号量Fより図3の関係に基づいて1画面
分の有効係数の総個数mを算出してスケ−リング制御部
82bに入力する。
(2) The code amount / effective coefficient conversion section 81 calculates the total number m of effective coefficients for one screen from the input desired code amount F based on the relationship shown in FIG. Input to the section 82b.

【0029】(3) DCT係数保持部2は、図示しないタ
イミング制御部からのデータ読出し信号RDTに従っ
て、DCT係数を1個づつ順次線形量子化部3の除算器
3aに出力する。
(3) The DCT coefficient holding unit 2 sequentially outputs DCT coefficients one by one to the divider 3a of the linear quantization unit 3 according to a data read signal RDT from a timing control unit (not shown).

【0030】(4) DCT係数の読み出しと同時に、量子
化閾値保持部82aから読出された量子化閾値Q(i)は
スケ−リング制御部82bから出力される初期の重み係
数SF(1とする)と乗算されて量子化閾値q(i)とな
って除算器3aに入力される。
(4) Simultaneously with the reading of the DCT coefficients, the quantization threshold value Q (i) read from the quantization threshold value holding section 82a is set to the initial weight coefficient SF (1) output from the scaling control section 82b. ) To obtain a quantization threshold value q (i), which is input to the divider 3a.

【0031】(5) 除算器3aは、受信したDCT係数を
量子化閾値q(i)で除算し、除算結果(量子化DCT係
数)を量子化DCT係数保持部4と有効係数累積部7に
出力する。
(5) The divider 3a divides the received DCT coefficient by the quantization threshold value q (i), and outputs the division result (quantized DCT coefficient) to the quantized DCT coefficient holding unit 4 and the effective coefficient accumulating unit 7. Output.

【0032】(6) 有効係数累積部7は、量子化DCT係
数のうちで零でない係数を入力されるとカウントアップ
する。 (7) 1個分のDCT係数の量子化が終了したら、タイミ
ング制御部はDCT係数保持部2に次のDCT係数の読
み出しを指示し、次のDCT係数の量子化を行う。
(6) The effective coefficient accumulating section 7 counts up when a non-zero coefficient among the quantized DCT coefficients is input. (7) When the quantization of one DCT coefficient is completed, the timing control unit instructs the DCT coefficient holding unit 2 to read the next DCT coefficient, and quantizes the next DCT coefficient.

【0033】(8) このようにして、DCT係数保持部2
に保持されているDCT係数を1個単位で読出し、その
結果を量子化DCT係数として出力し、該量子化DCT
係数の有効係数の数を有効係数累積部7に累積する処理
をブロック単位に1画面分繰り返すことにより、1画面
分の有効係数の個数nが求まる。
(8) In this way, the DCT coefficient holding unit 2
Is read out one by one, and the result is output as a quantized DCT coefficient.
By repeating the process of accumulating the number of effective coefficients in the effective coefficient accumulating unit 7 for one screen in block units, the number n of effective coefficients for one screen is obtained.

【0034】(9) 求めた有効係数の総個数nは、スケ−
リング制御部82bに出力される。 (10) スケ−リング制御部82bでは、指定された符号
量に対応する有効係数の総個数mと求めた有効係数の総
個数nの大小関係から重み係数SFを更新するか否かを
判定する。
(9) The calculated total number n of effective coefficients is
Output to the ring control unit 82b. (10) The scaling control unit 82b determines whether to update the weighting coefficient SF based on the magnitude relationship between the total number m of effective coefficients corresponding to the designated code amount and the total number n of obtained effective coefficients. .

【0035】(11) すなわち、n,mの差が予め設定さ
れている許容範囲内であれば重み係数SFの更新を終了
し、許容範囲外で、かつn>mの場合には重み係数SF
を所定量大にし、許容範囲外で、かつn<mの場合には
重み係数SFを小にする。
(11) That is, if the difference between n and m is within the preset allowable range, the updating of the weighting factor SF is terminated. If the difference is out of the allowable range and n> m, the weighting factor SF is updated.
Is increased by a predetermined amount, and when the value is out of the allowable range and n <m, the weight coefficient SF is reduced.

【0036】(12) そして、重み係数SFを更新した場
合には、以後、有効係数累積部7の累積値nを零にクリ
アして上記処理を行い、n,mの差が小さくなって許容
範囲内に入るまで繰り返す。
(12) When the weighting coefficient SF is updated, the above-described processing is performed after clearing the accumulated value n of the effective coefficient accumulating unit 7 to zero, and the difference between n and m becomes smaller and the allowable value becomes smaller. Repeat until within range.

【0037】(13) n,mの差が許容範囲内に入れば、
その時の量子化閾値q(i)を用いて、DCT係数を量子
化DCT係数に変換し、該量子化DCT係数を可変長符
号化部6で符号化して出力する。
(13) If the difference between n and m falls within the allowable range,
The DCT coefficient is converted into a quantized DCT coefficient using the quantization threshold value q (i) at that time, and the quantized DCT coefficient is encoded by the variable-length encoding unit 6 and output.

【0038】尚、重み係数の更新に際しては、予め重み
係数と有効係数の個数との対応関係を求めておき、該対
応関係を用いても良い。
When updating the weighting coefficients, the correspondence between the weighting coefficients and the number of effective coefficients may be determined in advance, and the correspondence may be used.

【0039】以上、本発明を実施例により説明したが、
本発明は請求の範囲に記載した本発明の主旨に従い種々
の変形が可能であり、本発明はこれらを排除するもので
はない。
The present invention has been described with reference to the embodiments.
The present invention can be variously modified in accordance with the gist of the present invention described in the claims, and the present invention does not exclude these.

【0040】[0040]

【発明の効果】以上本発明によれば、原画像をそれぞれ
複数の画素からなる複数のブロックに分割し、各ブロッ
ク毎に、該ブロック内の複数の画素の階調値を直交変換
し、直交変換により得られた変換係数を量子化して量子
化係数を求め、該量子化係数の内零でない有効係数の個
数を累積し、有効係数の個数に基づいて符号量を制御す
るように構成したから、可変長符号化をしなくても所望
符号量となる量子化閾値を求めることができ、従って、
簡単な構成、処理で所望符号量となるように符号化がで
きる。
As described above, according to the present invention, the original image is divided into a plurality of blocks each consisting of a plurality of pixels, and for each block, the gradation values of the plurality of pixels in the block are orthogonally transformed, and Since the transform coefficients obtained by the transform are quantized to obtain quantized coefficients, the number of non-zero effective coefficients among the quantized coefficients is accumulated, and the code amount is controlled based on the number of effective coefficients. , It is possible to obtain a quantization threshold value that provides a desired code amount without performing variable-length coding.
Encoding can be performed with a simple configuration and processing to obtain a desired code amount.

【0041】また、本発明によれば、ブロック内のN×
M個の変換係数のそれぞれをN×M個の対応する量子化
閾値q(i)(q(i)は0以上の正の整数、i=0〜N×M
−1)により除算して量子化し、量子化により得られる
量子化係数に含まれる有効係数の個数を累積して1画面
分の有効係数の個数nを求め、1画面分の有効係数の個
数nと指定された符号量に基づいて得られる有効係数の
個数mの差により量子化閾値q(i)を変更し、差が小さ
くなって設定範囲内になった時、その時の量子化閾値q
(i)を用いて可変長符号化を行うようにしたから、量子
化閾値q(i)が求まるまで可変長符号化を行う必要がな
く、換言すれば可変長符号化をしなくても所望符号量と
なる量子化閾値を求めることができ、しかも所望の符号
量にするための量子化閾値q(i)を短時間で求めること
が可能となる。
Also, according to the present invention, N ×
Each of the M transform coefficients is represented by N × M corresponding quantization thresholds q (i) (q (i) is a positive integer of 0 or more, i = 0 to N × M
-1), quantize, and accumulate the number of effective coefficients included in the quantized coefficients obtained by the quantization to obtain the number n of effective coefficients for one screen, and the number n of effective coefficients for one screen And the quantization threshold q (i) is changed according to the difference between the number m of effective coefficients obtained based on the specified code amount, and when the difference becomes small and falls within a set range, the quantization threshold q at that time is changed.
Since variable-length coding is performed using (i), it is not necessary to perform variable-length coding until the quantization threshold q (i) is obtained. In other words, it is possible to perform variable-length coding without performing variable-length coding. It is possible to obtain a quantization threshold value which is a code amount, and it is possible to obtain a quantization threshold value q (i) for obtaining a desired code amount in a short time.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】本発明の実施例構成図である。FIG. 2 is a configuration diagram of an embodiment of the present invention.

【図3】有効係数と符号量の関係図である。FIG. 3 is a relationship diagram between an effective coefficient and a code amount.

【図4】重み係数SFと有効係数の個数との関係図であ
る。
FIG. 4 is a relationship diagram between a weighting coefficient SF and the number of effective coefficients.

【図5】従来のADCT符号化回路のブロック図であ
る。
FIG. 5 is a block diagram of a conventional ADCT encoding circuit.

【図6】2次元DCT変換部のブロック図である。FIG. 6 is a block diagram of a two-dimensional DCT transform unit.

【図7】従来のADCT復元回路のブロック図である。FIG. 7 is a block diagram of a conventional ADCT restoration circuit.

【図8】2次元逆DCT変換部のブロック図である。FIG. 8 is a block diagram of a two-dimensional inverse DCT transform unit.

【図9】原画信号説明図である。FIG. 9 is an explanatory diagram of an original image signal.

【図10】DCT係数の説明図である。FIG. 10 is an explanatory diagram of DCT coefficients.

【図11】DCT係数に対する閾値説明図である。FIG. 11 is an explanatory diagram of a threshold value for a DCT coefficient.

【図12】量子化DCT係数説明図である。FIG. 12 is an explanatory diagram of quantized DCT coefficients.

【図13】量子化時の走査順序説明図である。FIG. 13 is an explanatory diagram of a scanning order at the time of quantization.

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

1・・2次元DCT変換部 3・・線形量子化部 5・・符号表 6・・可変長符号化部 7・・有効係数累積部 8・・符号量制御部 81・・符号量・有効係数変換部 82・・量子化閾値決定部 1 2D DCT transform unit 3 Linear quantization unit 5 Code table 6 Variable length coding unit 7 Effective coefficient accumulating unit 8 Code amount control unit 81 Code amount effective coefficient Transform unit 82 Quantization threshold value decision unit

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 原画像をそれぞれ複数の画素からなる複
数のブロックに分割し、各ブロック毎に、該ブロック内
の複数の画素の階調値を直交変換し、直交変換により得
られた変換係数を量子化して量子化係数を求め、該量子
化係数を符号化する画像データ符号化方法において、変
換係数を量子化して得られる量子化係数の内零でない有
効係数の個数を累積し、有効係数の個数に基づいて符号
量を制御することを特徴とする画像データ符号化方法。
1. An original image is divided into a plurality of blocks each composed of a plurality of pixels, and for each block, tone values of a plurality of pixels in the block are orthogonally transformed, and a transform coefficient obtained by the orthogonal transform is obtained. In the image data encoding method of obtaining a quantized coefficient by quantizing the quantized coefficient and accumulating the number of non-zero effective coefficients among the quantized coefficients obtained by quantizing the transform coefficient, An image data encoding method comprising controlling a code amount based on the number of image data.
【請求項2】原画像をN×M個の画素からなる複数のブ
ロックに分割し、各ブロック毎に、該ブロック内の複数
の画素の階調値を直交変換し、直交変換により得られた
変換係数を量子化して量子化係数を求め、該量子化係数
を符号化する画像データ符号化方法において、ブロック
内のN×M個の変換係数のそれぞれをN×M個の対応す
る量子化閾値q(i)(q(i)は0以上の正の整数、i=0
〜N×M−1)により除算して量子化し、量子化により
得られる量子化係数に含まれる有効係数の個数を累積し
て1画面分の有効係数の個数nを求め、1画面分の有効
係数の個数nと指定された符号量に基づいて算出される
有効係数の個数mとの差により量子化閾値q(i)を変更
することを特徴とする画像データ符号化方法。
2. An image obtained by dividing an original image into a plurality of blocks each composed of N.times.M pixels, and for each block, orthogonally transforming gradation values of a plurality of pixels in the block, and performing orthogonal transformation. In an image data encoding method for quantizing a transform coefficient to obtain a quantized coefficient and encoding the quantized coefficient, each of the N × M transform coefficients in the block is converted to N × M corresponding quantization thresholds. q (i) (q (i) is a positive integer of 0 or more, i = 0
NN × M−1), quantize, and accumulate the number of effective coefficients included in the quantized coefficients obtained by quantization to obtain the number n of effective coefficients for one screen. An image data encoding method, wherein a quantization threshold value q (i) is changed based on a difference between the number n of coefficients and the number m of effective coefficients calculated based on a designated code amount.
【請求項3】前記差が設定範囲内に入るまで量子化閾値
を変更することを特徴とする請求項2記載の画像データ
符号化方法。
3. The image data encoding method according to claim 2, wherein the quantization threshold is changed until the difference falls within a set range.
【請求項4】 予め符号量と有効係数の個数の関係を求
めておき、該関係を用いて前記指定された符号量に応じ
た有効係数の個数mを算出することを特徴とする請求項
2記載の画像データ符号化方法。
4. The method according to claim 2, wherein a relationship between the code amount and the number of effective coefficients is determined in advance, and the number m of effective coefficients according to the designated code amount is calculated using the relationship. The image data encoding method described in the above.
【請求項5】 予め、N×M個の量子化閾値Q(i)(Q
(i)は0以上の正の整数、i=0〜N×M−1)を設定
しておき、該量子化閾値Q(i)に重み係数SFを乗算す
ることにより前記量子化閾値q(i)を算出する場合にお
いて、前記差が設定範囲内になく、かつn>mの場合に
は重み係数SFを大にし、前記差が設定範囲内になく、
かつn<mの場合には重み係数SFを小にすることによ
り量子化閾値q(i)を変更することを特徴とする請求項
3記載の画像データ符号化方法。
5. N × M quantization thresholds Q (i) (Q
(i) is a positive integer equal to or greater than 0, i = 0 to N × M−1), and the quantization threshold q (i) is multiplied by a weighting coefficient SF to obtain the quantization threshold q ( In calculating i), when the difference is not within the set range and n> m, the weight coefficient SF is increased, and the difference is not within the set range,
4. The image data encoding method according to claim 3, wherein when n <m, the quantization threshold value q (i) is changed by decreasing the weight coefficient SF.
JP3057393A 1991-03-20 1991-03-20 Image data encoding method Expired - Fee Related JP2820807B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3057393A JP2820807B2 (en) 1991-03-20 1991-03-20 Image data encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3057393A JP2820807B2 (en) 1991-03-20 1991-03-20 Image data encoding method

Publications (2)

Publication Number Publication Date
JPH04291882A JPH04291882A (en) 1992-10-15
JP2820807B2 true JP2820807B2 (en) 1998-11-05

Family

ID=13054380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3057393A Expired - Fee Related JP2820807B2 (en) 1991-03-20 1991-03-20 Image data encoding method

Country Status (1)

Country Link
JP (1) JP2820807B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4183432B2 (en) 2002-04-10 2008-11-19 富士通株式会社 Image data encoding method

Also Published As

Publication number Publication date
JPH04291882A (en) 1992-10-15

Similar Documents

Publication Publication Date Title
JP3356663B2 (en) Image encoding device, image encoding method, and recording medium recording image encoding program
EP0470773A2 (en) Orthogonal transform coding apparatus
JPH08116447A (en) Coder for image signal
US5608654A (en) Image coding apparatus
JPH07184057A (en) Adct compression of minimum compression ratio
JPH07123269A (en) Corder for picture signal
US5822000A (en) Video encoding using rearrangement of transform coefficients and inter-block correlation
JP3163880B2 (en) Image compression coding device
JP3603000B2 (en) Huffman encoding apparatus, Huffman encoding method, and recording medium recording Huffman encoding processing program
US5724096A (en) Video signal encoding method and apparatus employing inter-block redundancies
JP2820807B2 (en) Image data encoding method
US5825422A (en) Method and apparatus for encoding a video signal based on inter-block redundancies
JPH04220081A (en) Method and device for picture data decoding
JPH05292326A (en) Picture data coder
JP3230336B2 (en) Recompression device and recompression system
JP2887843B2 (en) Image data restoration method and apparatus
JP2633118B2 (en) Image data compression apparatus and method
JP3392949B2 (en) Image compression device and image decompression device
JPH0310486A (en) Moving picture encoder
JP2887842B2 (en) Image data restoration method and apparatus
JP3014200B2 (en) Image data encoding apparatus and encoding method
JP3199786B2 (en) Image processing device
JPH01267781A (en) Method for compressing multilevel image data
JP2880269B2 (en) Image data compression method and apparatus
JP2802136B2 (en) Image data encoding method and apparatus

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980818

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

Free format text: PAYMENT UNTIL: 20080828

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090828

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees