JPH05292326A - Picture data coder - Google Patents

Picture data coder

Info

Publication number
JPH05292326A
JPH05292326A JP9525292A JP9525292A JPH05292326A JP H05292326 A JPH05292326 A JP H05292326A JP 9525292 A JP9525292 A JP 9525292A JP 9525292 A JP9525292 A JP 9525292A JP H05292326 A JPH05292326 A JP H05292326A
Authority
JP
Japan
Prior art keywords
quantization
block
condition
quantizing
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9525292A
Other languages
Japanese (ja)
Inventor
Takashi Morihara
隆 森原
Masayoshi Shimizu
雅芳 清水
Tsuguo Noda
嗣男 野田
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 JP9525292A priority Critical patent/JPH05292326A/en
Publication of JPH05292326A publication Critical patent/JPH05292326A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/007Transform coding, e.g. discrete cosine transform

Abstract

PURPOSE:To allow the picture data coder to generate code data from which all pictures with a different gradation change characteristic are decoded with high picture quality. CONSTITUTION:A 2-dimension DCT coefficient of each block outputted from a 2-dimension DC transformation section 151 is quantized at a linear quantization section 152 by using a quantization condition inputted from a quantization condition decision section 180. A picture quality discrimination 160 uses a quantization coefficient or the like of each block obtained through the quantization to calculate an evaluation function to discriminate the deterioration degree of a decoded picture based on the evaluation function obtained by the arithmetic operation and outputs a quantization condition to decrease the quantization error from the quantization condition decision section 180 to the linear quantization section till the degree of the deterioration in the picture quality reaches a prescribed degree or below. When the picture deterioration degree reaches a permissible degree or below, a coding command is outputted to a variable length coding section 154.

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 coding apparatus for coding multi-valued image data with high efficiency, and more specifically, it divides multi-valued image data into a plurality of blocks, and each divided block is divided into blocks. The present invention relates to an image data coding device that generates code data for image restoration by using the orthogonal transform coefficient of each block obtained by performing the orthogonal transform on the.

【0002】[0002]

【従来の技術】テレビ会議/テレビ電話、カラー静止
画、カラー動画等の分野においては、数値データに比べ
て情報量が桁違いに大きい画像データ、特に中間調画像
やカラー画像のデータを蓄積し、さらには、それらの画
像データを高速、高品質で伝送する必要があるため、画
素毎の階調値を高能率に符号化する処理が必要不可欠で
ある。
2. Description of the Related Art In the fields of video conferencing / videophones, color still images, color moving images, etc., image data having an order of magnitude greater than numerical data, especially halftone images and color image data, is stored. Furthermore, since it is necessary to transmit the image data at high speed and with high quality, it is essential to perform a process of efficiently encoding the gradation value of each pixel.

【0003】そして、このような画像データの高能率な
圧縮方式として、例えば適応離散コサイン変換符号化方
式が知られている。この適応離散コサイン変換符号化方
式(Adaptive Discrete Cosine Transform方式、以下、
略してADCT方式と称する)は、多値画像を例えば8
×8画素からなる複数のブロックに分割し、その各ブロ
ックの画信号を2次元離散コサイン変換(以下、2次元
DCTと称する)により空間周波数分布の係数(2次元
DCT係数)に変換し、次にその変換により得られた各
ブロック内の2次元DCT係数を視覚に適応した閾値に
量子化し、さらにその量子化により求められた量子化係
数を統計的に求めたハフマン・テーブルにより符号化す
るものである。
An adaptive discrete cosine transform coding method is known as a highly efficient compression method for such image data. This Adaptive Discrete Cosine Transform method, hereinafter,
The abbreviated method is called ADCT method).
It is divided into a plurality of blocks each consisting of × 8 pixels, and the image signal of each block is converted into a coefficient of spatial frequency distribution (two-dimensional DCT coefficient) by two-dimensional discrete cosine transform (hereinafter referred to as two-dimensional DCT). A two-dimensional DCT coefficient in each block obtained by the transformation is quantized into a threshold value adapted to the visual sense, and the quantized coefficient obtained by the quantization is encoded by a Huffman table obtained statistically. Is.

【0004】次に、このADCT方式の符号化動作を、
図13に示す従来の画像データ符号化装置の基本ブロッ
ク図を参照しながらより詳細に説明する。まず、多値画
像データ(原画像信号)を図14に示すような8×8画
素からなる複数のブロックに分割し、各ブロックの画信
号150を順次、2次元DCT変換部24に入力させ
る。図14に示す値は、1ブロック内の各画素の階調レ
ベル値である。
Next, the encoding operation of this ADCT method will be described.
This will be described in more detail with reference to the basic block diagram of the conventional image data encoding device shown in FIG. First, the multi-valued image data (original image signal) is divided into a plurality of blocks of 8 × 8 pixels as shown in FIG. 14, and the image signal 150 of each block is sequentially input to the two-dimensional DCT conversion section 24. The values shown in FIG. 14 are gradation level values of each pixel in one block.

【0005】アクティビティ算出部156は、ブロック
内の各画素の階調レベル値とブロック内の平均階調レベ
ル値の差の総和を算出し、その総和値をアクティビティ
として量子化条件選択部153へ出力する。量子化条件
選択部153は、その入力されるアクティビティ値の大
きさに応じて、複数の量子化条件の中から最も適した量
子化条件を選択し、その量子化条件を線形量子化部15
2に出力する。
The activity calculation unit 156 calculates the total sum of the differences between the gradation level value of each pixel in the block and the average gradation level value in the block, and outputs the total value to the quantization condition selection unit 153 as an activity. To do. The quantizing condition selecting unit 153 selects the most suitable quantizing condition from a plurality of quantizing conditions according to the magnitude of the input activity value, and sets the quantizing condition to the linear quantizing unit 15
Output to 2.

【0006】一方、2次元DCT変換部151では、入
力される1ブロックの画信号150を2次元DCTによ
り直交変換して、例えば図14に示すような1ブロック
の画信号を図15に示すような空間周波数分布の8×8
個の2次元DCT係数に変換し、線形量子化部152に
出力する。尚、図15に示す各枡目の値は、2次元DC
T係数の値である。
On the other hand, in the two-dimensional DCT conversion section 151, the input one-block image signal 150 is orthogonally transformed by the two-dimensional DCT, and for example, one-block image signal as shown in FIG. 14 is shown in FIG. 8 × 8 with various spatial frequency distribution
The two-dimensional DCT coefficients are converted and output to the linear quantization unit 152. The value of each cell shown in FIG. 15 is a two-dimensional DC.
It is the value of the T coefficient.

【0007】線形量子化部152は、上述のようにして
入力される各ブロック毎の8×8個の2次元DCT係数
を量子化条件選択部153から入力される視覚実験によ
り決められた、例えば図16に示すような閾値で構成す
る量子化マトリクス157により線形量子化する。この
線形量子化により得られる結果を図17に示す。同図に
示すように、閾値より小さい値の2次元DCT係数は0
となり、DC成分(=5)とわずかのAC成分(=−
2,−3,1,1,−1)のみが値を持つ8×8個の量
子化係数が生成される。
The linear quantizing unit 152 determines the 8 × 8 two-dimensional DCT coefficients for each block inputted as described above by a visual experiment inputted from the quantizing condition selecting unit 153, for example, Linear quantization is performed by the quantization matrix 157 configured with threshold values as shown in FIG. The result obtained by this linear quantization is shown in FIG. As shown in the figure, the two-dimensional DCT coefficient having a value smaller than the threshold is 0.
Therefore, the DC component (= 5) and the slight AC component (=-
8 × 8 quantized coefficients whose values are only 2, -3,1,1, -1) are generated.

【0008】次に、図17に示すように2次元的に配列
された8×8個の量子化係数は、図18に示す番号の順
序で量子化係数の走査を行うジグザグスキャンと呼ばれ
る走査により1次元の数値列に変換され、可変長符号化
部154に入力される。可変長符号化部154は、各ブ
ロック先頭のDC成分と前ブロック先頭のDC成分との
差分を可変長符号化する。また、AC成分については有
効係数(値が0でない係数)の値(以下、インデックス
と称する)とそこまでの無効係数(値が0の係数)のラ
ンの長さ(以下、零ラン長と称する)とを組み合わせ
て、ブロック毎に可変長符号化する。この可変長符号化
においては、DC,ACの各成分は、画像ごとの統計量
を基に作成するハフマン・テーブルで構成する符号表1
55を用いて符号化され、その符号化により得られた符
号データ158は、順次、外部に出力される。
Next, the 8 × 8 quantized coefficients arranged two-dimensionally as shown in FIG. 17 are scanned by a so-called zigzag scan for scanning the quantized coefficients in the order of the numbers shown in FIG. It is converted into a one-dimensional numerical sequence and input to the variable length coding unit 154. The variable length coding unit 154 performs variable length coding on the difference between the DC component at the beginning of each block and the DC component at the beginning of the previous block. For the AC component, the run length (hereinafter, referred to as zero run length) of the value of the effective coefficient (coefficient whose value is not 0) (hereinafter, referred to as index) and the invalid coefficient (coefficient whose value is 0) up to that value are called. ) And are combined, and variable length coding is performed for each block. In this variable length coding, each of DC and AC components is a Huffman table that is created based on a statistic for each image.
Coded data 158 obtained by the coding using 55 is sequentially output to the outside.

【0009】[0009]

【発明が解決しようとする課題】上述したように、従来
のADCT方式では、1ブロック(8×8個)の2次元
DCT係数を量子化する際、ブロック内の全ての2次元
DCT係数を1種類の量子化条件(量子化マトリクス1
57)を用いて量子化している。
As described above, in the conventional ADCT method, when the two-dimensional DCT coefficient of one block (8 × 8) is quantized, all the two-dimensional DCT coefficients in the block are set to one. Types of quantization conditions (quantization matrix 1
57) is used for quantization.

【0010】ところで、人間の視覚特性には、階調が激
しく変化する画像に対しては、画素の階調値に多少の近
似誤差があっても画質の劣化を比較的認識しにくいとい
う傾向がある。
By the way, human visual characteristics tend to make it relatively difficult to recognize deterioration of image quality for an image whose gradation changes drastically even if there are some approximation errors in the gradation values of pixels. is there.

【0011】上記量子化条件選択部153から選択出力
される図16に示す量子化マトリクス157は、この人
間の視覚特性を利用したものである。一方、人間の視覚
特性は階調変化が緩やかに変化する画像に対しては近似
誤差に対する識別力が強く、画質劣化を認識し易いとい
う傾向がある。
The quantizing matrix 157 shown in FIG. 16 which is selectively output from the quantizing condition selecting unit 153 utilizes this human visual characteristic. On the other hand, human visual characteristics have a strong discriminating power for an approximation error with respect to an image in which gradation changes gradually change, and tend to easily recognize image quality deterioration.

【0012】したがって、階調変化の激しい画像に適す
る量子化マトリクス157を用いて量子化を行った場
合、階調変化が緩やかに変化している画像を復元する
と、画像の劣化が目立つようになる。
Therefore, when quantization is performed using the quantization matrix 157 suitable for an image with a sharp gradation change, when an image with a gentle gradation change is restored, the deterioration of the image becomes noticeable. ..

【0013】このような画像劣化を防止するためには、
量子化マトリクス157の各値を低い値に設定して、量
子化の精度を高めればよい。しかしながら、このように
すると、階調変化が激しい画像においては前記有効係数
の数が増加するため、符号化する際の符号量が増加し効
率的な画像圧縮ができなくなるという新たな問題が発生
する。
In order to prevent such image deterioration,
Each value of the quantization matrix 157 may be set to a low value to improve the accuracy of quantization. However, in this case, the number of effective coefficients increases in an image in which gradation changes drastically, so that a new problem arises that the amount of code at the time of encoding increases and efficient image compression cannot be performed. ..

【0014】本発明は、階調変化の度合いにかかわら
ず、全ての画像を高画質が得られるように符号化できる
ようにすることである。
An object of the present invention is to enable all images to be coded so as to obtain high image quality regardless of the degree of gradation change.

【0015】[0015]

【課題を解決するための手段】図1、図2、図3、及び
図4は、それぞれ第1、第2、第3、及び第4の発明の
原理ブロック図である。これらの発明は、原画像の画像
データを複数のブロックに分割し、その分割された複数
の各ブロック毎に、そのブロック内の複数の画素の階調
値に対して直交変換を行い、次に、その直交変換により
得られた各ブロックの複数の直交変換係数を量子化した
後、画像復元用の符号データを生成する画像データ符号
化装置を前提とする。
FIG. 1, FIG. 2, FIG. 3, and FIG. 4 are principle block diagrams of the first, second, third, and fourth inventions, respectively. These inventions divide the image data of the original image into a plurality of blocks, perform an orthogonal transform on the gradation values of a plurality of pixels in each of the divided blocks, and then It is premised on an image data coding apparatus that quantizes a plurality of orthogonal transform coefficients of each block obtained by the orthogonal transform and then generates code data for image restoration.

【0016】まず、図1に示す第1の発明は、以下の各
手段を備える。量子化条件出力手段1は、前記各ブロッ
ク内の複数の直交変換係数を量子化するために用いる複
数の量子化条件を出力する。
First, the first invention shown in FIG. 1 comprises the following respective means. The quantization condition output means 1 outputs a plurality of quantization conditions used for quantizing a plurality of orthogonal transform coefficients in each block.

【0017】量子化手段2は量子化条件出力手段1から
の量子化条件を用いて、前記各ブロック毎にその各ブロ
ック内の複数の直交変換係数を量子化する。符号化手段
3は、量子化手段2により生成された量子化係数を符号
化する。
The quantizing means 2 quantizes a plurality of orthogonal transform coefficients in each block by using the quantizing condition from the quantizing condition outputting means 1. The encoding means 3 encodes the quantized coefficient generated by the quantization means 2.

【0018】符号化判断手段4は、量子化手段2により
量子化された上記各ブロック内の量子化係数と、量子化
手段2が上記量子化に用いた量子化条件とを用いて復元
される各ブロック内の複数の直交変換係数と量子化前の
直交変換係数を用いて、上記各ブロックの画像の劣化度
を評価する所定の評価関数の演算を行い、その演算によ
り得られた上記評価関数の値により、上記各ブロックの
復元画像の劣化度が許容範囲内にあるか否かを判断し、
その各ブロックの復元画像の劣化度が上記許容範囲を越
えている場合には、量子化条件出力手段1に対し量子化
誤差が前回の量子化よりも小さくなるような量子化条件
の出力を指示し、一方、上記各ブロックの復元画像の劣
化度が許容範囲内にあれば符号化手段3に対し符号化を
指示する。
The coding determination means 4 is restored using the quantized coefficient in each block quantized by the quantization means 2 and the quantization condition used by the quantization means 2 for the above quantization. Using a plurality of orthogonal transform coefficients in each block and the orthogonal transform coefficient before quantization, a predetermined evaluation function for evaluating the deterioration degree of the image of each block is calculated, and the evaluation function obtained by the calculation is performed. Depending on the value of, it is determined whether the degree of deterioration of the restored image of each block is within the allowable range,
When the degree of deterioration of the restored image of each block exceeds the allowable range, the quantization condition output means 1 is instructed to output the quantization condition such that the quantization error becomes smaller than the previous quantization. On the other hand, if the degree of deterioration of the restored image of each block is within the allowable range, the encoding means 3 is instructed to perform encoding.

【0019】次に、図2に示す第2の発明は、以下の各
手段を備える。量子化条件出力手段11は、前記各ブロ
ック内の複数の直交変換係数を量子化するために用いる
複数の量子化条件を出力する。
Next, the second invention shown in FIG. 2 comprises the following respective means. The quantization condition output means 11 outputs a plurality of quantization conditions used for quantizing a plurality of orthogonal transform coefficients in each block.

【0020】量子化手段12は、量子化条件出力手段1
2からの量子化条件を用いて、前記各ブロック毎にその
各ブロック内の複数の直交変換係数を量子化する。符号
化手段13は、量子化手段12により生成された量子化
係数を符号化する。
The quantizing means 12 is the quantizing condition outputting means 1
Using the quantization conditions from 2, the plurality of orthogonal transform coefficients in each block are quantized for each block. The encoding unit 13 encodes the quantized coefficient generated by the quantization unit 12.

【0021】画質判定手段14は、量子化手段12によ
り量子化された上記各ブロック内の量子化係数と、上記
量子化手段12が上記量子化に用いた量子化条件とを用
いて復元される各ブロック内の複数の直交変換係数と量
子化前の直交変換係数を用いて、上記各ブロックの画像
の劣化度を評価する所定の評価関数の演算を行い、その
演算により得られた上記評価関数の値が予め定めた所定
の条件を満足するか否かを判断する。
The image quality judging means 14 is restored by using the quantized coefficient in each block quantized by the quantizing means 12 and the quantizing condition used by the quantizing means 12 for the quantizing. Using a plurality of orthogonal transform coefficients in each block and the orthogonal transform coefficient before quantization, a predetermined evaluation function for evaluating the deterioration degree of the image of each block is calculated, and the evaluation function obtained by the calculation is performed. It is determined whether or not the value of satisfies a predetermined condition.

【0022】計数手段15は、画質判定手段14の判断
結果に基づき、原画像の画像データにおける上記所定の
条件を満足するブロック数を計数する。符号化判断手段
16は、計数手段15により計数されたブロック数が所
定数より少ない場合には、量子化条件出力手段11に対
し量子化誤差が前回の量子化よりも少なくなるような量
子化条件の出力を指示、一方、上記評価関数の値が上記
所定の条件を満足する場合には符号化手段13に対し符
号化を指示する。
The counting means 15 counts the number of blocks in the image data of the original image, which satisfies the above-mentioned predetermined condition, based on the judgment result of the image quality judging means 14. When the number of blocks counted by the counting unit 15 is smaller than a predetermined number, the encoding determination unit 16 determines a quantization condition that causes a quantization error for the quantization condition output unit 11 to be smaller than the previous quantization. On the other hand, if the value of the evaluation function satisfies the predetermined condition, the encoding means 13 is instructed to perform encoding.

【0023】続いて、図3に示す第3の発明は、以下の
各手段を備える。量子化条件出力手段21は、前記各ブ
ロック内の複数の直交変換係数を量子化するために用い
る複数の量子化条件を出力する。
Subsequently, the third invention shown in FIG. 3 comprises the following means. The quantization condition output means 21 outputs a plurality of quantization conditions used for quantizing a plurality of orthogonal transform coefficients in each block.

【0024】量子化手段22は、量子化条件出力手段2
1からの量子化条件を用いて、前記各ブロック毎にその
各ブロック内の複数の直交変換係数を量子化する。符号
化手段23は、量子化手段21により生成された量子化
係数を符号化する。
The quantizing means 22 is the quantizing condition outputting means 2
Using the quantization conditions starting from 1, a plurality of orthogonal transform coefficients in each block are quantized for each block. The encoding unit 23 encodes the quantized coefficient generated by the quantization unit 21.

【0025】評価平均値算出手段24は、上記量子化手
段22により量子化された上記各ブロック内の量子化係
数と、量子化手段22が上記量子化に用いた量子化条件
とを用いて、復元される各ブロック内の複数の直交変換
係数と量子化前の直交変換係数を用いて、上記各ブロッ
クの画像の劣化度を評価する所定の評価関数の演算を行
うことにより全ブロックの評価関数値を求め、それらの
全ブロックの評価関数値から画像全体での1ブロックの
評価関数値の平均値を求める。
The evaluation average value calculating means 24 uses the quantized coefficient in each block quantized by the quantizing means 22 and the quantizing condition used by the quantizing means 22 for the quantizing, By using a plurality of orthogonal transform coefficients in each restored block and an orthogonal transform coefficient before quantization, an evaluation function of all blocks is calculated by performing a calculation of a predetermined evaluation function for evaluating the degree of deterioration of the image of each block. The value is obtained, and the average value of the evaluation function values of one block in the entire image is obtained from the evaluation function values of all the blocks.

【0026】符号化判断手段25は、評価平均値算出手
段24により得られた平均値に基づいて、量子化条件出
力手段21に対して量子化誤差が前回の量子化よりも小
さくなるような量子化条件の出力指示または前記符号化
手段23に対する符号化の指示のいずれか一方の指示を
行う。
The encoding judging means 25 uses the average value obtained by the evaluation average value calculating means 24 to quantize the quantizing error with respect to the quantizing condition outputting means 21 so as to be smaller than the previous quantizing. Either the output instruction of the encoding condition or the encoding instruction to the encoding means 23 is performed.

【0027】そして、最後に、図4に示す第4の発明
は、以下の各手段を備える。量子化条件出力手段31
は、前記各ブロック内の複数の直交変換係数を量子化す
るために用いる複数の量子化条件を出力する。
Finally, the fourth invention shown in FIG. 4 comprises the following means. Quantization condition output means 31
Outputs a plurality of quantization conditions used to quantize a plurality of orthogonal transform coefficients in each block.

【0028】量子化手段32は、量子化条件出力手段3
1からの量子化条件を用いて、前記各ブロック毎にその
各ブロック内の複数の直交変換係数を量子化する。符号
化手段33は、量子化手段32により生成された量子化
係数を符号化する。
The quantizing means 32 is the quantizing condition outputting means 3
Using the quantization conditions starting from 1, a plurality of orthogonal transform coefficients in each block are quantized for each block. The encoding unit 33 encodes the quantized coefficient generated by the quantization unit 32.

【0029】評価関数演算手段34は、量子化手段32
により量子化された上記各ブロック内の量子化係数と、
量子化手段32が上記量子化に用いた量子化条件とを用
いて、復元される各ブロック内の複数の直交変換係数と
量子化前の直交変換係数を用いて、上記各ブロックの画
像の劣化度を評価する所定の評価関数の演算を行い、そ
の演算により得られた上記評価関数値の中で量子化誤差
が最も大きいことを示す評価関数値を求める。
The evaluation function calculation means 34 is the quantization means 32.
The quantized coefficient in each block quantized by
Using the quantization conditions used by the quantizing means 32 for the above-mentioned quantization, a plurality of orthogonal transform coefficients in each block to be restored and the orthogonal transform coefficient before quantization are used to deteriorate the image of each block. A predetermined evaluation function for evaluating the degree is calculated, and an evaluation function value indicating that the quantization error is the largest among the evaluation function values obtained by the calculation is obtained.

【0030】符号化判断手段35は、評価関数演算手段
34により求められた前記評価関数値に基づいて、量子
化条件出力手段31に対して量子化誤差が前回の量子化
よりも小さくなるような量子化条件の出力指示または符
号化手段(33)に対する符号化の指示のいずれか一方
の指示を行う。
The coding judgment means 35 is based on the evaluation function value obtained by the evaluation function calculation means 34 so that the quantization error for the quantization condition output means 31 is smaller than that of the previous quantization. Either the output instruction of the quantization condition or the encoding instruction to the encoding means (33) is given.

【0031】尚、上記量子化条件は、例えば、直交変換
係数ブロック内の各直交変換係数に対して、1対1に対
応して設定された複数の量子化閾値からなるマトリクス
(量子化マトリクス)である。
The above-mentioned quantization condition is, for example, a matrix (quantization matrix) made up of a plurality of quantization threshold values set in a one-to-one correspondence with respect to each orthogonal transform coefficient in the orthogonal transform coefficient block. Is.

【0032】[0032]

【作用】上記第1の発明においては、量子化手段2が原
画像の各分割ブロックの複数の直交変換係数を入力する
毎に、量子化条件出力手段1から入力される量子化条件
を用いて、上記各ブロックの複数の直交変換係数に対し
て量子化を行い、各直交変換係数に対応する複数の量子
化係数を生成する。
In the first aspect of the invention, the quantization condition input from the quantization condition output unit 1 is used every time the quantization unit 2 inputs a plurality of orthogonal transform coefficients of each divided block of the original image. , The plurality of orthogonal transform coefficients of each block are quantized to generate a plurality of quantized coefficients corresponding to the respective orthogonal transform coefficients.

【0033】符号化判断手段4は、上記各ブロックの複
数の直交変換係数と、上記量子化条件と、上記量子化に
より得られた上記複数の各直交変換係数に対応する複数
の量子化係数を変数とする前記評価関数の演算を行い、
その演算により得られた評価関数の値に基づいて、上記
各ブロックの復元画像の劣化度を判断し、その劣化度が
許容範囲を越えていれば、量子化条件出力手段1に対し
前回よりも量子化誤差が小さくなるような量子化条件を
量子化手段2に出力するよう指示する。
The coding determination means 4 determines a plurality of orthogonal transform coefficients of each block, the quantization condition, and a plurality of quantized coefficients corresponding to the plurality of orthogonal transform coefficients obtained by the quantization. Perform the calculation of the evaluation function as a variable,
Based on the value of the evaluation function obtained by the calculation, the degree of deterioration of the restored image of each block is judged, and if the degree of deterioration exceeds the allowable range, the quantization condition output means 1 is given more than the previous time. The quantizing means 2 is instructed to output the quantizing condition that reduces the quantizing error.

【0034】量子化条件出力手段1は、この指示に応じ
て指示された条件を満足する量子化条件を出力し、量子
化手段2はその量子化条件により再び上記量子化を行
う。この量子化処理は、符号化判断手段4が上記各ブロ
ックの復元画像の劣化度が許容範囲内にあると判断する
まで、繰り返される。そして、符号化判断手段4は、上
記各ブロックの復元画像の劣化度が許容範囲内にあると
判断すると、符号化手段3に対し符号化を指示し、符号
化手段3は、その指示を受けて量子化手段2により生成
された量子化係数の符号化を行う。
The quantizing condition output means 1 outputs a quantizing condition satisfying the instructed condition in response to this instruction, and the quantizing means 2 performs the above quantizing again according to the quantizing condition. This quantization process is repeated until the encoding determination unit 4 determines that the degree of deterioration of the restored image of each block is within the allowable range. Then, when the encoding determination means 4 determines that the degree of deterioration of the restored image of each block is within the allowable range, it instructs the encoding means 3 to perform encoding, and the encoding means 3 receives the instruction. The quantized coefficient generated by the quantization means 2 is encoded.

【0035】このように、第1の発明においては、原画
像の各分割ブロック毎に、量子化手段2により生成され
た量子化係数を用いた復元画像の劣化度がチェックさ
れ、所定以上の画質で画像を復元可能な量子化条件を用
いて画像復元用の画像データの符号化が行われる。
As described above, in the first aspect of the invention, the degree of deterioration of the restored image using the quantization coefficient generated by the quantization means 2 is checked for each divided block of the original image, and the image quality of a predetermined level or more is checked. The image data for image restoration is encoded by using the quantization condition that allows the image to be restored.

【0036】したがって、階調変化の度合いが異なる等
の表示特性が異なる全ての画像について、高画質で復元
表示することが可能な符号データを生成できる。次に、
第2の発明においては、量子化手段12により、量子化
条件出力手段11から出力される量子化条件を用いて上
記第1の発明と同様にして、原画像の各分割ブロックの
複数の直交変換係数に対し、量子化係数が生成される。
Therefore, it is possible to generate code data that can be restored and displayed with high image quality for all images having different display characteristics such as different degrees of gradation change. next,
In the second invention, the quantizing means 12 uses the quantizing condition output from the quantizing condition outputting means 11 in the same manner as in the first invention, so that a plurality of orthogonal transforms of respective divided blocks of the original image are performed. A quantized coefficient is generated for the coefficient.

【0037】画質判定手段14は、量子化手段12によ
り上記量子化が行われる毎に、上記各分割ブロックの複
数の直交変換係数と、上記量子化により得られた上記各
直交変換係数に対応する量子化係数と、上記量子化に用
いられた量子化条件とからそれらを変数とする所定の評
価関数の演算を行い、その演算により得られた評価関数
値から各分割ブロック毎に復元画像の劣化度が許容範囲
内にあるか否かを判断する。
The image quality determination means 14 corresponds to each of the plurality of orthogonal transform coefficients of each divided block and each of the orthogonal transform coefficients obtained by the quantization, each time the quantization means 12 performs the quantization. From the quantized coefficient and the quantized condition used for the above quantization, a predetermined evaluation function with those variables is calculated, and the restored image is deteriorated for each divided block from the evaluation function value obtained by the calculation. Judge whether the degree is within the allowable range.

【0038】計数手段15は、量子化手段12により各
分割ブロックの量子化係数が生成される毎に、画質判定
手段14により復元画像の劣化度が許容範囲を越えると
判断されたブロック数を計数していく。
The counting means 15 counts the number of blocks for which the image quality judging means 14 judges that the degree of deterioration of the restored image exceeds the allowable range each time the quantizing means 12 generates the quantized coefficient of each divided block. I will do it.

【0039】そして、量子化手段12により原画像の全
分割ブロックについて量子化が終了すると、符号化判断
手段16は、計数手段15から復元画像の劣化度が許容
範囲を越えるブロック数が許容範囲内であるかを調べ、
許容範囲を越える数であれば、量子化条件出力手段11
に対し、より量子化誤差が小さくなるような量子化条件
を量子化手段12に出力するように指示する。
When the quantizing means 12 completes the quantization of all the divided blocks of the original image, the coding judging means 16 determines that the number of blocks whose deterioration degree of the restored image exceeds the permissible range from the counting means 15. To see if
If the number exceeds the allowable range, the quantization condition output means 11
On the other hand, the quantizing means 12 is instructed to output the quantizing condition such that the quantizing error becomes smaller.

【0040】これを受けて、量子化手段12はその新た
に入力する量子化条件を用いて原画像の全ての分割ブロ
ックに対する量子化を再び開始し、以下、上述と同様な
動作が繰り返される。
In response to this, the quantizing means 12 restarts the quantizing for all the divided blocks of the original image using the newly inputted quantizing condition, and thereafter, the same operation as described above is repeated.

【0041】この量子化の繰り返しは、符号化判断手段
16が復元画像の劣化度が許容範囲を越える分割ブロッ
ク数が予め決められた許容数以下であると判断するまで
繰り返され、符号化手段16は上記復元画像の劣化度が
許容範囲を越える分割ブロック数が許容数以下になると
符号化手段13に符号化を指示する。
This repetition of the quantization is repeated until the coding judgment means 16 judges that the number of divided blocks in which the degree of deterioration of the restored image exceeds the allowable range is equal to or less than the predetermined allowable number, and the coding means 16 is repeated. Instructs the encoding means 13 to perform encoding when the number of divided blocks in which the degree of deterioration of the restored image exceeds the allowable range and is equal to or smaller than the allowable number.

【0042】符号化手段13は、この指示を受けて量子
化手段12により生成された原画像の全分割ブロックの
量子化係数の符号化を行う。このように、第2の発明に
おいては、原画像の全分割ブロックについて直交変換係
数の量子化を行い、その量子化により得られる量子化係
数を用いて復元される画像の劣化度が許容範囲を越える
ブロック数が許容数以下になった場合に、原画像の全分
割ブロックの量子化係数の符号化を行う。
Upon receiving this instruction, the coding means 13 codes the quantized coefficients of all the divided blocks of the original image generated by the quantizing means 12. As described above, in the second invention, the orthogonal transformation coefficient is quantized for all the divided blocks of the original image, and the deterioration degree of the image restored using the quantized coefficient obtained by the quantization is within the allowable range. When the number of blocks to be exceeded is less than or equal to the allowable number, the quantized coefficients of all the divided blocks of the original image are encoded.

【0043】したがって、第1の発明と同様に、階調変
化が異なる等の表示特性の異なる全ての画像について、
高画質で復元表示することが可能な符号データを生成で
きる。
Therefore, similar to the first invention, for all images having different display characteristics such as different gradation changes,
It is possible to generate code data that can be restored and displayed with high image quality.

【0044】次に、第3の発明においては、量子化手段
22が、量子化条件出力手段21から入力される量子化
条件を用いて、原画像の全分割ブロックについて直交変
換係数の量子化を行う。
Next, in the third invention, the quantizing means 22 uses the quantizing condition inputted from the quantizing condition outputting means 21 to quantize the orthogonal transform coefficients for all the divided blocks of the original image. To do.

【0045】評価平均値算出手段24は、量子化手段2
2により各分割ブロック単位で量子化が行われる毎に、
量子化の対象となった各分割ブロックの直交変換係数
と、量子化手段12により生成された上記各分割ブロッ
クの個々の直交変換係数に対応する量子化係数と、上記
量子化のために量子化手段12が用いた量子化条件を変
数とする所定の評価関数の演算を行い、その演算により
得られた評価値を順次累算していく。そして、量子化手
段22により原画像の全分割ブロックの量子化が終了す
ると、評価平均算出手段24は、上記累算により得た上
記原画像の全分割ブロックの評価関数値の合計を分割ブ
ロック数で除算して、1ブロックあたりの評価関数値の
平均を求め、その評価関数の平均値により上記量子化に
より得られた量子化係数を用いて画像を復元した場合の
画像全体の画質の劣化度を判断し、その画質の劣化度が
許容範囲を越えていれば、量子化条件出力手段21に対
し、量子化誤差がより小さくなるような量子化条件を量
子化手段22に出力するよう指示する。そして、再び上
述したと同様な動作が新たな量子化条件を用いて行われ
る。
The evaluation average value calculating means 24 is the quantizing means 2
2 is quantized in each divided block unit,
Orthogonal transform coefficients of each divided block to be quantized, quantized coefficients corresponding to the individual orthogonal transform coefficients of each of the divided blocks generated by the quantizing unit 12, and quantized for the above quantization. A predetermined evaluation function is calculated by using the quantization condition used by the means 12 as a variable, and the evaluation values obtained by the calculation are sequentially accumulated. Then, when the quantization unit 22 completes the quantization of all the divided blocks of the original image, the evaluation average calculation unit 24 calculates the sum of the evaluation function values of all the divided blocks of the original image obtained by the accumulation as the number of divided blocks. The average of the evaluation function values per block is obtained by dividing by, and the deterioration degree of the image quality of the entire image when the image is restored using the quantization coefficient obtained by the above quantization by the average value of the evaluation function If the deterioration degree of the image quality exceeds the allowable range, the quantization condition output means 21 is instructed to output to the quantization means 22 a quantization condition that reduces the quantization error. .. Then, the same operation as described above is performed again using the new quantization condition.

【0046】この原画像の全分割ブロックの量子化係数
の生成処理は、符号化判断手段23が、復元画像全体の
劣化度が許容範囲内になる量子化係数が全分割ブロック
について生成されるという条件が満足されるまで繰り返
し行われ、上記条件が満足されると、符号化判断手段2
3は、符号化手段25に対し符号化を指示する。
In the process of generating the quantized coefficients of all the divided blocks of the original image, the coding judgment means 23 says that the quantized coefficients of which the degree of deterioration of the entire restored image is within the allowable range are generated for all the divided blocks. The process is repeated until the condition is satisfied, and when the above condition is satisfied, the encoding determination means 2
3 instructs the encoding means 25 to perform encoding.

【0047】符号化手段25は、この指示を受けて、量
子化手段22により生成された原画像の全分割ブロック
の量子化係数を符号化する。このように、第3の発明に
おいては、上記第2の発明と同様に量子化手段22が原
画像の全分割ブロックについて量子化が終了する毎に、
生成された量子化係数を用いて復元した画像の劣化度が
許容範囲内にあるか否かが画像全体の平均劣化度を基に
判断され、許容範囲内になった時点で量子化手段22に
より生成された原画像の全分割ブロックの量子化係数の
符号化が行われる。
In response to this instruction, the encoding means 25 encodes the quantized coefficients of all the divided blocks of the original image generated by the quantization means 22. Thus, in the third aspect of the invention, as in the second aspect of the invention, every time the quantizing means 22 completes the quantization of all the divided blocks of the original image,
Whether or not the deterioration degree of the image restored using the generated quantization coefficient is within the allowable range is determined based on the average deterioration degree of the entire image, and when it is within the allowable range, the quantizing means 22 The quantized coefficients of all the divided blocks of the generated original image are encoded.

【0048】したがって、上記第1および第2の発明と
同様な効果が得られる。そして、最後に上記第4の発明
においては、上記第2および第3の発明と同様、量子化
手段32により原画像の全分割ブロックの直交変換係数
の量子化が、量子化条件出力手段31から出力される量
子化条件を用いて、各分割ブロック毎に所定の順序で連
続して行われる。
Therefore, the same effect as the first and second inventions can be obtained. Finally, in the fourth invention, as in the second and third inventions, the quantization of the orthogonal transform coefficients of all the divided blocks of the original image is performed by the quantization means 32 from the quantization condition output means 31. Using the output quantization condition, the division blocks are successively performed in a predetermined order.

【0049】これらの動作の間、評価関数算出手段34
は、量子化手段32が各分割ブロックの量子化を終了す
る毎に、その量子化の対象となった分割ブロック内の直
交変換係数と、上記量子化により得られた上記分割ブロ
ック内の量子化係数と、上記量子化に用いられた量子化
条件を変数と所定の評価関数の演算を行う。そして、評
価関数算出手段34は、上記評価関数の演算が終了する
毎に新たに得られた評価関数の値と前回得られた評価関
数の値とを比較し、量子化誤差がより大きいことを示す
評価関数値の方を保持する。
During these operations, the evaluation function calculating means 34
Every time the quantizing means 32 completes the quantization of each divided block, the orthogonal transform coefficient in the divided block that is the target of the quantization and the quantization in the divided block obtained by the above quantization. A coefficient and a quantization condition used for the above quantization are calculated as variables and a predetermined evaluation function. Then, the evaluation function calculation means 34 compares the value of the newly obtained evaluation function with the value of the previously obtained evaluation function each time the calculation of the evaluation function is completed, and confirms that the quantization error is larger. The evaluation function value shown is retained.

【0050】この結果、量子化手段32が原画像の全分
割ブロックについて量子化を終了すると、評価関数演算
手段34は、上記量子化において最も量子化誤差が大き
な量子化がなされた分割ブロックの評価関数値を保持し
ている。
As a result, when the quantizing means 32 completes the quantization of all the divided blocks of the original image, the evaluation function calculating means 34 evaluates the divided blocks having the largest quantization error in the quantization. Holds the function value.

【0051】符号化判断手段35は、評価関数算出手段
34から、その最も量子化誤差が大きな量子化がなされ
た分割ブロックの評価関数値を入力し、その評価関数値
を基に、その分割ブロックの復元画像の劣化度が許容範
囲内にあるか否かを判断し、許容範囲を越えていれば、
量子化条件出力手段31に対し、量子化誤差がより小さ
くなるような量子化条件を量子化手段32に出力するよ
う指示する。
The coding judging means 35 inputs the evaluation function value of the quantized divided block having the largest quantization error from the evaluation function calculating means 34, and based on the evaluation function value, the divided block is inputted. It is judged whether the degree of deterioration of the restored image is within the allowable range, and if it exceeds the allowable range,
The quantizing condition output means 31 is instructed to output the quantizing condition to the quantizing means 32 so that the quantizing error becomes smaller.

【0052】量子化手段32は、その新たな量子化条件
を入力すると、再び上述したような量子化処理を行い、
再び上述したと同様な動作が繰り返される。この新たな
量子化に伴う一連の動作は、符号化判断手段35が最も
量子化誤差の大きい量子化が行われた分割ブロックの復
元画像の劣化度が許容範囲にあると判断するまで繰り返
され、符号化判断手段35は、最も量子化誤差の大きい
量子化が行われた分割ブロックの復元画像の劣化度が許
容範囲にあると判断すると、符号化手段33に符号化を
指示する。
When the new quantizing condition is input, the quantizing means 32 performs the above-mentioned quantizing process again,
The same operation as described above is repeated again. The series of operations associated with the new quantization is repeated until the encoding determination unit 35 determines that the degree of deterioration of the restored image of the quantized divided block having the largest quantization error is within the allowable range. When the encoding determination unit 35 determines that the degree of deterioration of the restored image of the quantized divided block with the largest quantization error is within the allowable range, it instructs the encoding unit 33 to perform encoding.

【0053】符号化手段33は、この指示を受けて、量
子化手段22により生成された原画像の全分割ブロック
の量子化係数を符号化する。このように第4の発明にお
いては、画像を復元した場合に最も劣化度が大きくなる
分割ブロックの劣化度を基準とし、その劣化度が所定の
許容範囲内にあると判断した時点で原画像の全分割ブロ
ックの量子化係数の符号化を行う。
In response to this instruction, the coding means 33 codes the quantized coefficients of all the divided blocks of the original image generated by the quantizing means 22. As described above, according to the fourth aspect of the invention, the deterioration degree of the divided block having the largest deterioration degree when the image is restored is used as a reference, and the deterioration degree of the original image is determined when the deterioration degree is within a predetermined allowable range. Encode the quantized coefficients of all divided blocks.

【0054】したがって、上記第1、第2、及び第3の
発明と同様な効果が得られる。
Therefore, the same effect as the first, second and third inventions can be obtained.

【0055】[0055]

【実施例】以下、図面を参照しながら本発明の実施例を
説明する。図5は、本発明の一実施例の画像データ符号
化装置のシステムブロック図である。同図において、前
述した図13に示す従来の画像符号化装置内のブロック
と同一のブロックには、同一の名称・符号を付与してい
る。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 5 is a system block diagram of an image data encoding apparatus according to an embodiment of the present invention. In the same figure, the same name and code are given to the same blocks as the blocks in the conventional image coding apparatus shown in FIG.

【0056】画質判定部160は、2次元DCT変換部
151から入力する原画像の2次元DCT係数、線形量
子化部152から入力する上記2次元DCT係数の量子
化係数、及び量子化条件決定部180から入力する量子
化の際に用いられた量子化条件(量子化マトリクス)と
から、各ブロック毎に評価関数値を算出する。そして、
その算出結果に基づいて、線形量子化部152により生
成された量子化係数を用いて復元される画像の画質劣化
の度合を判断し、画質劣化の度合が所定基準以下であれ
ば可変長符号化部154に対し、上記線形量子化部15
2により生成された量子化係数を可変長符号化するよう
に指示する。一方、画質判定部160は、画質劣化の度
合が所定基準を越えていれば、量子化条件決定部180
に対し、さらに精度の高い量子化を行うように指示す
る。
The image quality determination unit 160 includes a two-dimensional DCT coefficient of the original image input from the two-dimensional DCT conversion unit 151, a quantized coefficient of the two-dimensional DCT coefficient input from the linear quantization unit 152, and a quantization condition determination unit. An evaluation function value is calculated for each block from the quantization condition (quantization matrix) used at the time of quantization input from 180. And
Based on the calculation result, the degree of image quality deterioration of the image to be restored is determined using the quantization coefficient generated by the linear quantization unit 152, and if the degree of image quality deterioration is less than or equal to a predetermined standard, variable length coding is performed. For the unit 154, the linear quantization unit 15
2 is instructed to perform variable length coding on the quantized coefficient generated. On the other hand, the image quality determination unit 160, if the degree of image quality deterioration exceeds a predetermined standard, the quantization condition determination unit 180.
, And instruct to perform more accurate quantization.

【0057】量子化条件決定部180は、予め定めてあ
る量子化条件(量子化マトリクス)VTH0を格納して
おり、線形量子化部152に対し、1ブロックの2次元
DCT係数を線形量子化するための量子化マトリクスと
して、最初にその量子化条件VTH0を出力する。そし
て、以後、画質判定部160からの指示に応じて、より
細かい量子化が行われるための量子化条件(量子化マト
リクス)を画質判定部160が上記評価関数値の値が所
定の条件を満足するまで出力し続ける。
The quantization condition determination unit 180 stores a predetermined quantization condition (quantization matrix) VTH0, and linearly quantizes one block of the two-dimensional DCT coefficient with respect to the linear quantization unit 152. As the quantization matrix for, the quantization condition VTH0 is first output. Then, thereafter, in accordance with an instruction from the image quality determination unit 160, the image quality determination unit 160 determines a quantization condition (quantization matrix) for performing finer quantization, and the value of the evaluation function value satisfies a predetermined condition. Continue to output until.

【0058】次に、上記構成の実施例の動作を図6のフ
ローチャートを参照しながら説明する。まず、2次元D
CT変換部151は、原画像の画信号150を、複数の
画素からなるブロック(例えば8×8画素)に分割して
得られる各ブロックごとに、ブロック内の前記複数の画
素の階調値(階調レベル値)を2次元離散コサイン変換
して上記複数の画素と同数の2次元DCT係数を求め、
その各ブロックの複数の2次元DCT係数を線形量子化
部152に出力すると共に、画質判定部160内のメモ
リに格納する(S1)。
Next, the operation of the embodiment having the above structure will be described with reference to the flowchart of FIG. First, two-dimensional D
The CT conversion unit 151 divides the image signal 150 of the original image into blocks (for example, 8 × 8 pixels) composed of a plurality of pixels, and obtains the gradation values of the plurality of pixels in each block (8 × 8 pixels). (Gradation level value) is subjected to two-dimensional discrete cosine transformation to obtain the same number of two-dimensional DCT coefficients as the plurality of pixels,
The plurality of two-dimensional DCT coefficients of each block are output to the linear quantization unit 152 and stored in the memory in the image quality determination unit 160 (S1).

【0059】次に量子化条件決定部180は、予め定め
られ、自らが格納している量子化条件(量子化マトリク
ス)VTH0を線形量子化部152に選択・出力する
(S2)。
Next, the quantization condition determining unit 180 selects and outputs the quantization condition (quantization matrix) VTH0, which is predetermined and stored by itself, to the linear quantization unit 152 (S2).

【0060】線形量子化部152は、その選択された量
子化条件VTH0を用いて、2次元DCT変換部151
から入力される各ブロックの複数の2次元DCT係数を
量子化し、各ブロック内の全ての2次元DCT係数の量
子化が終了すると、それらの各ブロック内の全ての2次
元DCT係数の量子化係数を画質判定部160に出力す
る(S3)。
The linear quantizer 152 uses the selected quantizing condition VTH0 to select the two-dimensional DCT transformer 151.
When a plurality of two-dimensional DCT coefficients of each block input from are quantized and all the two-dimensional DCT coefficients in each block are quantized, the quantized coefficients of all the two-dimensional DCT coefficients in each of these blocks are quantized. Is output to the image quality determination unit 160 (S3).

【0061】画質判定部160は、各ブロックの量子化
係数が入力される毎に、量子化条件決定部180から前
記処理S3で量子化処理を行うために用いられた量子化
条件(量子化マトリクス)を入力し、上記各ブロックの
量子化係数、上記量子化条件、及び前記処理S1で自メ
モリ内に格納された上記各ブロックの量子化前の2次元
DCT係数を用いて、上記各ブロック毎の評価関数値を
算出する(S4)。
The image quality determination unit 160 receives the quantization coefficient (quantization matrix) used for performing the quantization processing in the processing S3 from the quantization condition determination unit 180 every time the quantization coefficient of each block is input. ) Is input to each block by using the quantized coefficient of each block, the quantization condition, and the two-dimensional DCT coefficient before quantization of each block stored in its own memory in the process S1. The evaluation function value of is calculated (S4).

【0062】画質判定部160は、上記評価関数値を得
るための評価関数として、例えば量子化による誤差を評
価する式を用いる。すなわち、その一例として、ブロッ
クごとのAC成分の量子化誤差(振幅幅に対する率)の
二乗和を算出する評価関数Eを用いる。
The image quality judging section 160 uses, for example, an expression for evaluating an error due to quantization as an evaluation function for obtaining the evaluation function value. That is, as an example thereof, the evaluation function E that calculates the sum of squares of the quantization error (rate to the amplitude width) of the AC component for each block is used.

【0063】この評価関数の式を下記に示す。The formula of this evaluation function is shown below.

【0064】[0064]

【数1】 [Equation 1]

【0065】(但し、X=Y=0、すなわち直流成分F
0 (0,0)は除く)ここで、 G1 (X,Y)=F0 (X,Y)・Q(X,Y) ・・・・・・ 上記式、において、F0 (X,Y)は2次元DCT
係数、F1 (X,Y)は上記2次元DCT係数F
0 (X,Y)を量子化閾値Q(X,Y)により量子化す
ることにより得られた量子化係数である。
(However, X = Y = 0, that is, DC component F
0 (0, 0) is excluded) where, G 1 (X, Y) = F 0 (X, Y) · Q (X, Y) ······ above formula, in, F 0 (X, Y) is a two-dimensional DCT
Coefficient, F 1 (X, Y) is the two-dimensional DCT coefficient F
It is a quantized coefficient obtained by quantizing 0 (X, Y) with a quantization threshold Q (X, Y).

【0066】上記式において、その分母、すなわち
〔F0 (X,Y)−G1 (X,Y)〕は量子化誤差に等
しい。この式に示す評価関数を用いた画質劣化の判断
は、次のようにして行う。大きな画質劣化を生じる場合
には、量子化により大きな誤差が生じているため、上記
評価関数の式の分母が大きくなり、前記評価関数Eは小
さな値となる。一方、画質劣化が少ない場合には、量子
化による誤差は小さいため、前記評価関数Eは大きな値
となる。したがって、この評価関数の値Eにより、量子
化による画質劣化の度合を推定できる。
In the above equation, its denominator, that is, [F 0 (X, Y) -G 1 (X, Y)] is equal to the quantization error. The judgment of the image quality deterioration using the evaluation function shown in this equation is performed as follows. When a large image quality deterioration occurs, a large error occurs due to quantization, so that the denominator of the expression of the evaluation function becomes large and the evaluation function E becomes a small value. On the other hand, when the image quality deterioration is small, the evaluation function E has a large value because the error due to the quantization is small. Therefore, the value E of this evaluation function can be used to estimate the degree of image quality deterioration due to quantization.

【0067】この評価関数Eの値の算出後、画質判定部
160は、評価関数Eの値が許容値以上であるか否かを
判断する(S5)。そして、画質判定部160は、上記
評価関数Eの値が、上記許容値以上である場合には、可
変長符号化部154に符号表155を用いて、前記量子
化係数をそのまま可変長符号化させる(S7)。
After calculating the value of the evaluation function E, the image quality determination unit 160 determines whether the value of the evaluation function E is equal to or more than the allowable value (S5). Then, when the value of the evaluation function E is equal to or more than the allowable value, the image quality determination unit 160 uses the code table 155 in the variable length coding unit 154 to directly code the quantized coefficient in the variable length coding. (S7).

【0068】一方、画質判定部160は、上記判断処理
S5において、上記評価関数Eの値が上記許容値より小
さいと判断すると、量子化条件決定部180に対し、さ
らに細かい量子化を行うように指示し、その量子化条件
決定部180に量子化条件(量子化マトリクス)を変更
させた後(S7)、前記線形量子化部152にその変更
した量子化条件(量子化マトリクス)を用いて、上記2
次元DCT係数F0 (X,Y)を再量子化させる(S
3)。
On the other hand, when the image quality judging unit 160 judges in the judging process S5 that the value of the evaluation function E is smaller than the allowable value, the quantizing condition deciding unit 180 is made to perform finer quantization. After instructing and changing the quantization condition (quantization matrix) by the quantization condition determination unit 180 (S7), the linear quantization unit 152 uses the changed quantization condition (quantization matrix), 2 above
Requantize the dimensional DCT coefficient F 0 (X, Y) (S
3).

【0069】以下、上記判断処理S5において、画質判
定部160が上記評価関数Eの値が許容値以上であると
判断するまで、量子化条件を変更して量子化及び評価関
数Eの値の算出を繰り返し(S3〜S6)、画質判定部
160は、上記評価関数Eの値が上記許容値以上になっ
たと判断すると(S5)、可変長符号化部154に対し
符号化を指示し、可変長符号化部154は線形量子化部
152から各ブロックの量子化係数を入力し、それらの
各ブロックの量子化係数を可変長符号化する(S7)。
Hereinafter, in the determination processing S5, the quantization condition is changed and the value of the evaluation function E is calculated until the image quality determination unit 160 determines that the value of the evaluation function E is equal to or larger than the allowable value. When the image quality determination unit 160 determines that the value of the evaluation function E is equal to or greater than the allowable value (S5) (S3 to S6), the image quality determination unit 160 instructs the variable length encoding unit 154 to perform encoding to change the variable length. The encoding unit 154 inputs the quantization coefficient of each block from the linear quantization unit 152, and performs variable length encoding of the quantization coefficient of each block (S7).

【0070】したがって、この実施例によれば、2次元
DCT変換により得られる2次元DCT係数とその2次
元DCT係数を量子化することにより得られる量子化係
数とその量子化に用いられた量子化条件とを用いて、量
子化条件(量子化マトリクス)を決定することにより、
正確に画質を制御することが可能となる。すなわち、階
調変化の緩やかな部分の多い画像では細かな量子化処理
を行い、階調変化の激しい部分の多い画像では粗い量子
化を行うことが可能となり、階調変化の度合が異なる全
ての画像について、所定レベル以上の画質を確保するこ
とができる。
Therefore, according to this embodiment, the two-dimensional DCT coefficient obtained by the two-dimensional DCT transform, the quantized coefficient obtained by quantizing the two-dimensional DCT coefficient, and the quantization used for the quantization. By determining the quantization condition (quantization matrix) using
It is possible to accurately control the image quality. In other words, it is possible to perform fine quantization processing for an image with many gradation change portions and coarse quantization for an image with many gradation change portions. It is possible to secure an image quality of a predetermined level or higher.

【0071】尚、画質の劣化度を評価する評価関数とし
ては、上記式に示したもの以外に、例えば、下記のよ
うな絶対値を用いた式を採用しても良い。
As the evaluation function for evaluating the deterioration degree of the image quality, for example, the following expressions using absolute values may be adopted in addition to those shown in the above expressions.

【0072】[0072]

【数2】 [Equation 2]

【0073】ここで、 G1 (X,Y)=F1 (X,Y)・Q(X,Y) 図7は、前記図5に示した実施例内の画質判定部160
の一構成例を示す図である。同図において、係数格納部
A165は、図5に示す2次元DCT変換部151の出
力する各ブロック毎の2次元DCT係数を格納する。
Here, G 1 (X, Y) = F 1 (X, Y) · Q (X, Y) FIG. 7 shows the image quality judgment unit 160 in the embodiment shown in FIG.
It is a figure which shows one structural example. In the figure, the coefficient storage unit A165 stores the two-dimensional DCT coefficient for each block output from the two-dimensional DCT conversion unit 151 shown in FIG.

【0074】また、係数格納部B166は、線形量子化
部152から出力される量子化係数を格納する。アドレ
ス発生部164は、上記2つの係数格納部165,16
6からそれぞれ同一ブロック内の対応する2次元DCT
係数及びその量子化係数が、同期して読み出されるため
のアドレス信号を、上記2つの係数格納部165,16
6に出力する。
Further, the coefficient storage unit B166 stores the quantized coefficient output from the linear quantization unit 152. The address generation unit 164 uses the two coefficient storage units 165, 16 described above.
6 to the corresponding two-dimensional DCT in the same block
An address signal for synchronously reading the coefficient and its quantized coefficient is used as the two coefficient storage units 165, 16.
Output to 6.

【0075】関数算出部168は,上記係数格納部16
5,166から、同一ブロック内の対応する2次元DC
T係数F0 (X,Y)及び量子化係数F1 (X,Y)を
入力すると共に、それらの係数の入力に同期して量子化
条件決定部180から上記係数格納部Bに格納されてい
る量子化係数F1 (X,Y)を得るために用いられた量
子化閾値Q(X,Y)を入力する。
The function calculation section 168 uses the coefficient storage section 16
5, 166 corresponding two-dimensional DC in the same block
The T coefficient F 0 (X, Y) and the quantized coefficient F 1 (X, Y) are input and stored in the coefficient storage unit B from the quantization condition determination unit 180 in synchronization with the input of these coefficients. Input the quantization threshold value Q (X, Y) used to obtain the quantization coefficient F 1 (X, Y).

【0076】関数算出部168は、前記式の処理によ
り、各ブロックごとのAC成分の評価関数の値Eを算出
し、その値Eを比較部170に出力する。上限値格納部
167は、前記評価関数の値Eの許容値δ(以下、上限
値δと記述する)を格納する。また、量子化条件格納部
169は、線形量子化部152が量子化係数を得るため
に用いた量子化条件(量子化マトリクス)を格納する。
The function calculation unit 168 calculates the value E of the evaluation function of the AC component for each block by the processing of the above formula, and outputs the value E to the comparison unit 170. The upper limit storage unit 167 stores an allowable value δ of the value E of the evaluation function (hereinafter, referred to as an upper limit δ). The quantization condition storage unit 169 also stores the quantization condition (quantization matrix) used by the linear quantization unit 152 to obtain the quantization coefficient.

【0077】比較部170は、関数算出部168から入
力される上記評価関数の値Eと上限値格納部167内に
格納されている上限値δとを比較し、その評価関数の値
Eが上限値δ以上の場合には、許容限ブロック数格納部
171内の値をインクリメントする。許容限ブロック数
格納部171は、評価関数の値Eが前記上限値δ以上と
なっている、すなわち復元画像の画質が目標を上回る精
細度となっているブロック数を格納する。
The comparing section 170 compares the value E of the evaluation function input from the function calculating section 168 with the upper limit value δ stored in the upper limit storage section 167, and the value E of the evaluation function is the upper limit. When the value is δ or more, the value in the allowable limit block number storage unit 171 is incremented. The allowable limit block number storage unit 171 stores the number of blocks in which the value E of the evaluation function is equal to or more than the upper limit value δ, that is, the image quality of the restored image exceeds the target.

【0078】ブロック数閾値格納部172は、判定部1
73が再量子化が必要か否かの判断を行うためのブロッ
ク数の閾値を格納する。判定部173は、許容限ブロッ
ク数格納部171から出力されるブロック数とブロック
数条件格納部172に格納されているブロック数閾値と
を比較し、評価関数の値Eが前記上限値δ以上となるブ
ロックが上記ブロック数閾値以上存在する場合には、可
変長符号化部154に対し、線形量子化部152で得ら
れた量子化係数を可変長符号化するように指示する。可
変長符号化部154は、この指示を受けて、前記線形量
子化部152の量子化係数をジグザグスキャンしつつ、
符号表155を参照して可変長符号化を実行し、作成し
た符号データを出力する。そして、原画像の全ブロック
の全量子化係数の符号化を終了した時点で符号化処理は
終了する。
The block number threshold value storage unit 172 includes the determination unit 1
73 stores the threshold value of the number of blocks for determining whether or not requantization is necessary. The determination unit 173 compares the number of blocks output from the allowable limit block number storage unit 171 with the block number threshold value stored in the block number condition storage unit 172, and determines that the value E of the evaluation function is the upper limit value δ or more. If there are more blocks than the block number threshold value, the variable length coding unit 154 is instructed to perform variable length coding on the quantized coefficient obtained by the linear quantization unit 152. In response to this instruction, the variable length coding unit 154 zigzag scans the quantization coefficient of the linear quantization unit 152,
Variable length coding is executed with reference to the code table 155, and the created code data is output. Then, the encoding process ends when the encoding of all the quantized coefficients of all the blocks of the original image is completed.

【0079】一方、判定部173は、評価関数の値Eが
前記上限値δ以上のブロックが前記ブロック数閾値より
少ない場合には、量子化条件決定部180に対し、より
細かい量子化が行われる量子化条件を出力するように線
形量子化部152に指示する。 量子化条件決定部18
0の一構成例を図8に示す。
On the other hand, when the number E of the evaluation function value E is equal to or larger than the upper limit value δ is smaller than the block number threshold value, the determination unit 173 performs finer quantization on the quantization condition determination unit 180. The linear quantizing unit 152 is instructed to output the quantizing condition. Quantization condition determination unit 18
8 shows an example of the configuration of 0.

【0080】同図において、選択部181は、画質判定
部160内の判定部173からの指示により、3種類の
量子化条件(量子化マトリクス)を線形量子化部152
に選択出力する。
In the figure, the selection unit 181 receives three types of quantization conditions (quantization matrices) according to an instruction from the determination unit 173 in the image quality determination unit 160, and the linear quantization unit 152.
Selectively output to.

【0081】量子化条件1格納部182、量子化条件2
格納部183、及び量子化条件3格納部183は、それ
ぞれ量子化条件1(量子化マトリクス1)、量子化条件
2(量子化マトリクス2)、及び量子化条件3(量子化
マトリクス3)を格納する。
Quantization condition 1 storage unit 182, quantization condition 2
The storage unit 183 and the quantization condition 3 storage unit 183 store the quantization condition 1 (quantization matrix 1), the quantization condition 2 (quantization matrix 2), and the quantization condition 3 (quantization matrix 3), respectively. To do.

【0082】これらの3種類の量子化条件1、量子化条
件2、量子化条件3の復元画像の画質劣化との関係は、
量子化条件1、量子化条件2、量子化条件3の順に復元
画像がより精細となるように量子化される。
The relationship between these three kinds of quantization condition 1, quantization condition 2, and quantization condition 3 with respect to the deterioration of the image quality of the restored image is as follows:
The restored image is quantized in the order of quantization condition 1, quantization condition 2, and quantization condition 3 so that the restored image becomes finer.

【0083】すなわち、量子化条件1、量子化条件2、
量子化条件3の順に、2次元DCT係数のDC成分及び
各AC成分に対する量子化閾値が小さくなっている。次
に、上記構成の画質判定部160及び量子化条件決定部
180を有する図5に示す画像データ符号化装置の動作
を、図9のフローチャートを参照しながら説明する。
That is, quantization condition 1, quantization condition 2,
In the order of the quantization condition 3, the quantization threshold for the DC component and each AC component of the two-dimensional DCT coefficient becomes smaller. Next, the operation of the image data encoding device shown in FIG. 5 having the image quality determination unit 160 and the quantization condition determination unit 180 having the above configuration will be described with reference to the flowchart of FIG.

【0084】まず、2次元DCT変換部151は、1フ
レームの多値の原画像の画信号150を8×8画素のブ
ロック単位で順次入力し、そのブロックを8×8個の2
次元DCT係数から成るブロック(2次元DCT係数ブ
ロック)に変換し(SA1)、その8×8個の2次元D
CT係数ブロックを内部のメモリに格納する(SA
2)。2次元DCT変換部151は、上記一連の処理S
A1,SA2を、上記多値の原画像の全てのブロックに
ついて行う(SA1〜SA3)。
First, the two-dimensional DCT converter 151 sequentially inputs the image signal 150 of a multivalued original image of one frame in block units of 8 × 8 pixels, and the blocks are divided into 8 × 8 2 blocks.
Converted to a block (two-dimensional DCT coefficient block) composed of three-dimensional DCT coefficients (SA1), and the 8 × 8 two-dimensional D
Store CT coefficient block in internal memory (SA
2). The two-dimensional DCT conversion unit 151 uses the series of processing S described above.
A1 and SA2 are performed for all blocks of the multivalued original image (SA1 to SA3).

【0085】続いて、2次元DCT変換部151は、多
値の原画像の最初の2次元DCT係数ブロックを、図7
に示す画質判定部160内の係数格納部A165に格納
すると共に、線形量子化部152にも出力する。
Subsequently, the two-dimensional DCT transform section 151 converts the first two-dimensional DCT coefficient block of the multivalued original image into the one shown in FIG.
It is stored in the coefficient storage unit A165 in the image quality determination unit 160 shown in (1) and is also output to the linear quantization unit 152.

【0086】画質判定部160は、上記最初の2次元D
CT係数ブロックの入力を受けて、量子化条件決定部1
80に量子化マトリクスとして量子化条件1を選択する
旨を指示する。量子化条件決定部180は、この指示を
受けて選択部181により量子化条件1格納部182か
ら量子化条件1を読み出して線形量子化部152に選択
出力すると共に、画質判定部160内の量子化条件格納
部169に格納する(SA4)。
The image quality determination unit 160 determines the first two-dimensional D
Upon receiving the input of the CT coefficient block, the quantization condition determining unit 1
80 is instructed to select the quantization condition 1 as the quantization matrix. In response to this instruction, the quantizing condition determining unit 180 reads the quantizing condition 1 from the quantizing condition 1 storing unit 182 by the selecting unit 181 and selectively outputs it to the linear quantizing unit 152. The data is stored in the conversion condition storage unit 169 (SA4).

【0087】線形量子化部152は、上記量子化条件1
を入力すると、上記2次元DCT変換部151から入力
された最初の2次元DCT係数ブロック内の各2次元D
CT係数をその量子化条件1を用いて線形量子化し、そ
の線形量子化により得られた8×8個の量子化係数から
成るブロックを画質判定部180内の係数格納部B16
6に格納する(SA5)。
The linear quantization unit 152 uses the above quantization condition 1
Is input, each two-dimensional D in the first two-dimensional DCT coefficient block input from the above two-dimensional DCT transform unit 151.
The CT coefficient is linearly quantized using the quantization condition 1, and a block composed of 8 × 8 quantized coefficients obtained by the linear quantization is used as a coefficient storage unit B16 in the image quality determination unit 180.
6 (SA5).

【0088】続いて、画質判定部160内の関数算出部
168は、係数格納部A165に格納されている最初の
2次元DCT係数ブロック内の63個の2次元DCT係数
0(X,Y)、係数格納部B166内の63個の量子化
係数F1 (X,Y)、及び量子化条件格納部169に格
納されている量子化条件1の63個の量子化閾値Q(X,
Y)を用いて、前記式またはで表される評価関数の
値Eを算出し、その値Eを比較部170に出力する(S
A6)。
Subsequently, the function calculating section 168 in the image quality determining section 160 has 63 two-dimensional DCT coefficients F 0 (X, Y) in the first two-dimensional DCT coefficient block stored in the coefficient storage section A 165. , 63 quantization coefficients F 1 (X, Y) in the coefficient storage unit B 166, and 63 quantization thresholds Q (X, X, of the quantization condition 1 stored in the quantization condition storage unit 169).
Y) is used to calculate the value E of the evaluation function represented by the above expression or, and the value E is output to the comparison unit 170 (S
A6).

【0089】尚、上記変数(X,Y)は、X=0〜7,
Y=0〜7の値をとる。但し、X=Y=0は除く。次
に、比較部170は、入力される上記評価関数の値Eと
上限値格納部167に格納されている上限値δとを比較
し、評価関数の値Eがその上限値δ以上であるか、すな
わち評価関数の値Eにより示される誤差は許容範囲内で
あるか否かを判別し(SA7)、許容範囲内であれば許
容限ブロック数格納部171の値を“1”増加(インク
リメント)する(SA8)。尚、許容限ブロック数格納
部171は、このフローチャートに示す処理が開始され
る前に“0”に初期設定される。
The above variables (X, Y) are X = 0 to 7,
It takes a value of Y = 0 to 7. However, X = Y = 0 is excluded. Next, the comparison unit 170 compares the input evaluation function value E with the upper limit value δ stored in the upper limit value storage unit 167, and determines whether the evaluation function value E is greater than or equal to the upper limit value δ. That is, it is determined whether or not the error indicated by the value E of the evaluation function is within the allowable range (SA7), and if it is within the allowable range, the value of the allowable limit block number storage unit 171 is increased by "1" (increment). Yes (SA8). The allowable limit block number storage unit 171 is initialized to "0" before the processing shown in this flowchart is started.

【0090】上記一連の処理SA5〜SA8は、2次元
DCT変換部151により変換された1フレームの原画
像の全ての2次元DCT係数ブロックについて行われる
(SA5〜SA9)。
The above series of processes SA5 to SA8 are performed for all the two-dimensional DCT coefficient blocks of the original image of one frame converted by the two-dimensional DCT converter 151 (SA5 to SA9).

【0091】そして、上記2次元DCT係数ブロックの
全ブロックについて、上記処理SA5〜SA8が終了す
ると(SA9)、画質判定部160内の判定部173
は、許容限ブロック数格納部171に格納されている有
効ブロック数とブロック数閾値格納部172に格納され
ているブロック数閾値とを比較し、有効ブロック数の方
がブロック数閾値よりも大きければ(SA10,YE
S)、直ちに可変長符号化部154に対し線形量子化部
152により生成された1フレームの原画像の各ブロッ
クの量子化係数を符号化するように指示する。可変長符
号化部154は、この指示を受けて、上記各ブロックの
量子化係数をADCT方式により符号化する(SA1
2)。
When the processes SA5 to SA8 are completed for all the blocks of the two-dimensional DCT coefficient block (SA9), the determination unit 173 in the image quality determination unit 160 is performed.
Compares the effective block number stored in the allowable limit block number storage unit 171 with the block number threshold value stored in the block number threshold value storage unit 172, and if the effective block number is larger than the block number threshold value, (SA10, YE
S) Immediately, it instructs the variable length coding unit 154 to code the quantized coefficient of each block of the original image of one frame generated by the linear quantization unit 152. Upon receipt of this instruction, the variable length coding unit 154 codes the quantized coefficient of each block by the ADCT method (SA1).
2).

【0092】一方、判定部173は、上記処理SA10
で上記有効ブロック数が上記ブロック数閾値以下であれ
ば、量子化条件決定部180に対し、上記1フレームの
原画像がもっと精細に復元されるような量子化が行われ
るための量子化条件を線形量子化部152に出力するよ
うに指示する。量子化条件決定部180は、この指示を
受けて、選択部181により量子化条件2格納部183
からより精度の高い量子化を行うための量子化条件2
を、線形量子化部152に出力すると共に画質判定部1
60の量子化条件格納部169に格納する(SA1
1)。
On the other hand, the determination unit 173 determines that the process SA10
If the number of effective blocks is equal to or less than the threshold value of the number of blocks, the quantization condition determination unit 180 is provided with a quantization condition for performing quantization such that the original image of one frame is more finely restored. The linear quantizing unit 152 is instructed to output. In response to this instruction, the quantization condition determination unit 180 causes the selection unit 181 to store the quantization condition 2 storage unit 183.
Quantization condition 2 for more accurate quantization from
Is output to the linear quantization unit 152 and the image quality determination unit 1
It is stored in the quantization condition storage unit 169 of 60 (SA1
1).

【0093】そして、続いて、量子化条件2を用いて、
再度上記処理SA5〜SA10を行い、全ブロックのD
CT係数に対し、線形量子化部152で線形量子化を行
い、関数値比較部160内の関数算出部168で評価関
数の値Eを算出する。
Then, using the quantization condition 2,
The above processing SA5 to SA10 is performed again, and D of all blocks is performed.
The linear quantization unit 152 performs linear quantization on the CT coefficient, and the function calculation unit 168 in the function value comparison unit 160 calculates the value E of the evaluation function.

【0094】そして、上述したようにして、再び画質判
定部160内の判定部173は、許容限ブロック数格納
部171に格納されている有効ブロック数とブロック数
閾値格納部172に格納されているブロック数閾値とを
比較し、有効ブロック数の方がブロック数閾値よりも大
きい、すなわちこの線形量子化により得られた量子化係
数で十分な画質に原画像を復元できると判別すると(S
A10,YES)、前記処理SA12により可変長符号
化部154で上記量子化係数を用いて原画像の符号化を
行う。
Then, as described above, the determination unit 173 in the image quality determination unit 160 is again stored in the valid block number and block number threshold storage unit 172 stored in the allowable limit block number storage unit 171. When it is determined that the number of effective blocks is larger than the block number threshold value, that is, the quantization coefficient obtained by this linear quantization can restore the original image to a sufficient image quality (S
A10, YES), and the process SA12 causes the variable length coding unit 154 to code the original image using the quantized coefficient.

【0095】また、一方、量子化条件2を用いて線形量
子化を行っても、十分な画質に原画像を復元できない場
合には、判定部173は量子化条件決定部180に対
し、さらに精度の高い量子化が行われるための量子化条
件の出力の指示を量子化条件決定部180に出力する。
量子化条件決定部180は、この指示を受けて選択部1
81により量子化条件3を量子化条件3格納部184か
ら読み出して、線形量子化部152に選択出力すると共
に、画質判定部160内の量子化条件格納部169に格
納した後(SA11)再び上記処理SA5に戻り、量子
化条件3を用いた3回目の量子化を開始する。
On the other hand, if the original image cannot be restored to a sufficient image quality even if the linear quantization is performed using the quantization condition 2, the determination unit 173 gives the quantization condition determination unit 180 more accuracy. Output to the quantization condition determination unit 180 an instruction to output a quantization condition for performing high quantization.
Upon receiving this instruction, the quantization condition determination unit 180 receives the instruction from the selection unit 1.
After 81, the quantization condition 3 is read from the quantization condition 3 storage unit 184, selectively output to the linear quantization unit 152, and stored in the quantization condition storage unit 169 in the image quality determination unit 160 (SA11). Returning to step SA5, the third quantization using the quantization condition 3 is started.

【0096】そして、上記処理SA5〜SA9を2次元
DCT係数ブロックの全ブロックについて行い、有効ブ
ロック数が上記ブロック数閾値よりも大きい場合には
(SA10,YES)、可変長符号化部154がその3
回目の量子化により得られた量子化係数を可変長符号化
する(SA12)。
Then, the processes SA5 to SA9 are performed for all the blocks of the two-dimensional DCT coefficient block, and when the number of effective blocks is larger than the block number threshold value (SA10, YES), the variable length coding unit 154 determines that. Three
Variable length coding is performed on the quantized coefficient obtained by the quantized time (SA12).

【0097】このように、原画像が所定の精度以上に復
元されるようになるまで、3種類の量子化条件1,2,
3を用いて、原画像の2次元DCT係数ブロックを順次
量子化誤差が小さくなるように量子化していく。そし
て、原画像を目標とする画質まで復元できる量子化係数
が得られた時点で、それらの量子化係数を可変長符号化
する。
As described above, three kinds of quantization conditions 1, 2,
3 is used to sequentially quantize the two-dimensional DCT coefficient block of the original image so that the quantization error becomes smaller. Then, when the quantized coefficients that can restore the original image to the target image quality are obtained, those quantized coefficients are variable length coded.

【0098】尚、上記実施例とは逆に、十分な画質に原
画像を復元できないブロック数を計数して、そのブロッ
ク数が所定数以上の場合、量子化条件を変更して、量子
化係数ブロックを再量子化するようにしてもよい。
Contrary to the above embodiment, the number of blocks in which the original image cannot be restored to a sufficient image quality is counted, and if the number of blocks is a predetermined number or more, the quantization condition is changed and the quantization coefficient is changed. The blocks may be requantized.

【0099】次に、量子化条件決定部180の他の構成
例を図10(a) 、(b) 、(c) 、(d)に示す。これらの量
子化条件決定部180は、いずれも基本となる1種類の
量子化条件(以後、基本量子化条件と表現する)を格納
する基本条件格納部191を有し、その基本条件格納部
191に格納されている基本量子化条件を用いて、複数
の量子化条件を生成・出力するものである。
Next, another configuration example of the quantization condition determining unit 180 is shown in FIGS. 10 (a), (b), (c) and (d). Each of these quantization condition determination units 180 has a basic condition storage unit 191 that stores one type of basic quantization condition (hereinafter referred to as a basic quantization condition), and the basic condition storage unit 191. A plurality of quantization conditions are generated and output using the basic quantization conditions stored in.

【0100】まず、同図(a) に示す量子化条件決定部1
80Aは、2次元DCT係数ブロックを線形量子化する
ための基本となる1種類の基本量子化条件を格納する基
本条件格納部191と、その基本量子化条件の各値を除
算することにより、線形量子化部152で使用する複数
の量子化条件を生成する除算部190、及びその除算部
190が上記除算を行う場合に使用する複数の除数を格
納する除数格納部192から成る。このような構成の量
子化条件決定部180において、除数格納部192の初
期値は、例えば“1”であり、前記画質判定部160内
の判定部173から量子化条件の選択信号が入力される
毎に、“1”づつインクリメントされる。すなわち、2
回目の量子化処理の時には、除数格納部192内に格納
される除数は“2”となり、線形量子化部152が2回
目の線形量子化に用いる量子化条件の各マトリクスの値
は、1回目の値の1/2となる。以後、同様にして、3
回目以降の2次元DCT係数ブロックの線形量子化に用
いられる量子化条件の各マトリクスの値は、順次、1/
3,1/4,・・・となる。したがって、前述した図8
に示す量子化条件決定部180と同様な機能を有する。
First, the quantization condition determining unit 1 shown in FIG.
The 80A is a linear condition by dividing a basic condition storage unit 191 that stores one type of basic quantization condition that is a basis for linearly quantizing a two-dimensional DCT coefficient block and each value of the basic quantization condition. The division unit 190 includes a division unit 190 that generates a plurality of quantization conditions used by the quantization unit 152, and a divisor storage unit 192 that stores a plurality of divisors used when the division unit 190 performs the division. In the quantization condition determination unit 180 having such a configuration, the initial value of the divisor storage unit 192 is, for example, "1", and the determination unit 173 in the image quality determination unit 160 receives the quantization condition selection signal. Each time, it is incremented by "1". Ie 2
At the time of the quantization process of the second time, the divisor stored in the divisor storage unit 192 becomes “2”, and the value of each matrix of the quantization conditions used by the linear quantization unit 152 for the second linear quantization is the first time. It becomes 1/2 of the value of. After that, in the same way, 3
The value of each matrix of the quantization conditions used for the linear quantization of the two-dimensional DCT coefficient block after the first time is 1 / sequentially.
It becomes 3, 1/4, ... Therefore, as shown in FIG.
It has the same function as the quantization condition determination unit 180 shown in FIG.

【0101】また、同図(b) に示す量子化条件決定部1
80bは、高次成分の値が低次成分の値より大きくなる
という2次元DCT係数の特性を利用したものであり、
除数格納部として、低次の2次元DCT係数用の除数を
格納する低次用除数格納部192Aと高次の2次元DC
T係数用の除数を格納する高次用除数格納部192Bの
2つを有するものである。低次用係数格納部192A、
高次用係数格納部192Bには、それぞれ例えば、
“2”,“3”を格納しておき、画質判定部160の判
定部173から量子化条件の選択信号が入力される毎
に、低次用係数格納部192A、高次用係数格納部19
2Bに格納される値を適切に変化させ、低次部用の除数
値と高次部用の除数値とを異なる割合で変化させなが
ら、各2次元DCT係数ブロックを最適な量子化条件
(量子化マトリクス)で線形量子化させる。尚、マルチ
プレクサ(MPX)199は、線形量子化部152から
加わる選択信号に応じて低次用の量子化係数生成の際に
は基本条件格納部191内に格納されている基本量子化
条件と低次用除数格納部192Aに格納されている除数
を選択出力し、次に続く高次用の量子化係数の生成の際
には、基本条件格納部191に格納されている基本量子
化条件と高次用除数格納部192Bに格納されている除
数を除算部192Aに選択出力する。
Further, the quantization condition determining unit 1 shown in FIG.
80b utilizes the characteristic of the two-dimensional DCT coefficient that the value of the high-order component becomes larger than the value of the low-order component,
As a divisor storage unit, a low-order divisor storage unit 192A that stores a divisor for a low-order two-dimensional DCT coefficient and a high-order two-dimensional DC
It has two high-order divisor storage units 192B for storing divisors for T coefficients. Low order coefficient storage unit 192A,
The high-order coefficient storage unit 192B stores, for example,
“2” and “3” are stored in advance, and every time the selection signal of the quantization condition is input from the determination unit 173 of the image quality determination unit 160, the low-order coefficient storage unit 192A and the high-order coefficient storage unit 19 are stored.
By appropriately changing the value stored in 2B and changing the divisor value for the low-order part and the divisor value for the high-order part at different rates, each two-dimensional DCT coefficient block is optimized for the optimum quantization condition (quantum Quantization matrix). It should be noted that the multiplexer (MPX) 199 sets the basic quantization condition stored in the basic condition storage unit 191 and the low quantization coefficient when the low-order quantized coefficient is generated according to the selection signal added from the linear quantization unit 152. The divisor stored in the next divisor storage unit 192A is selectively output, and when the next high-order quantized coefficient is generated, the basic quantization condition stored in the basic condition storage unit 191 The divisor stored in the next divisor storage unit 192B is selectively output to the division unit 192A.

【0102】次に、同図(c) に示す量子化条件決定部1
80Cは、除算部100が量子化係数を算出するために
用いる除数値を、前記ジグザグスキャン順に格納してい
る除数マトリクス格納部192Cを有している。すなわ
ち、この除数マトリクス格納部192C内には、基本条
件格納部191に格納されている基本量子化条件の各量
子化閾値に1対1に対応する8×8個の個別の除算値を
ジグザグスキャン順に格納している。そして、除算部1
90は、基本条件格納部191と除数マトリクス格納部
192Cからジグザグ走査順にそれぞれ量子化閾値と除
算値とを読み出し、その量子化閾値をその除算値で除算
し、その除算により得られた値を量子化条件の量子化閾
値値として線形量子化部152へ出力する。
Next, the quantization condition determining unit 1 shown in FIG.
80C has a divisor matrix storage unit 192C that stores the divisor values used by the division unit 100 to calculate the quantized coefficient in the zigzag scan order. That is, in the divisor matrix storage unit 192C, 8 × 8 individual division values corresponding to the quantization thresholds of the basic quantization conditions stored in the basic condition storage unit 191 one-to-one are zigzag-scanned. Stored in order. And the division unit 1
90 reads the quantization threshold value and the division value from the basic condition storage unit 191 and the divisor matrix storage unit 192C respectively in the zigzag scanning order, divides the quantization threshold value by the division value, and the value obtained by the division is quantized. The quantization threshold value of the quantization condition is output to the linear quantization unit 152.

【0103】そして、最後に同図(d) に示す量子化条件
決定部180Dは、上記除算部190及び基本条件格納
部191以外に、除算部190が量子化閾値を生成する
ために用いる除数を発生する関数格納部192Dを備え
ている。この関数格納部192Dは、例えば y=ax2 +bx+c というxを変数とする関数yを演算することにより、そ
の演算結果を除数値として除算部190に出力する。
Finally, in addition to the division unit 190 and the basic condition storage unit 191, the quantization condition determination unit 180D shown in FIG. 9D is the divisor used by the division unit 190 to generate the quantization threshold. A function storage unit 192D for generating is provided. The function storage unit 192D calculates a function y having x as a variable such as y = ax 2 + bx + c, and outputs the calculation result to the division unit 190 as a divisor value.

【0104】この関数格納部192Dは、画質判定部1
60の判定部173から量子化条件の選択信号が入力さ
れる毎に変数xの値を順次増加して、上記関数yの演算
を行い、順次より大きな値の除算値を除算部190に出
力する。除算部190は、基本条件格納部190内に格
納されている基本量子化条件の各量子化閾値をその除算
値で除算することにより、線形量子化部152が2次元
DCT係数ブロックを量子化する際の量子化条件の各量
子化閾値を、1回目、2回目、3回目・・・の量子化の
順に、順次小さな値に変化させて線形量子化部152に
出力する。
This function storage unit 192D is used by the image quality determination unit 1
Each time the selection signal of the quantization condition is input from the determination unit 173 of 60, the value of the variable x is sequentially increased, the calculation of the function y is performed, and the division value having a larger value is sequentially output to the division unit 190. .. The division unit 190 divides each quantization threshold value of the basic quantization condition stored in the basic condition storage unit 190 by the division value, so that the linear quantization unit 152 quantizes the two-dimensional DCT coefficient block. Each quantization threshold value of the quantization condition at that time is sequentially changed to a small value in the order of the first, second, third, ... Quantization, and is output to the linear quantization unit 152.

【0105】尚、上述した高次用除数格納部192A及
び低次用除数格納部192Bに格納される値は、あくま
でも一例であり、それらの格納部に格納される値は、こ
れらの値に限定されるものではない。 また、関数格納
部192Dが除算値算出用に用いる関数も、上記関数y
に限定されるものではなく、その他の各種関数を用いて
もよい。
The values stored in the high-order divisor storage unit 192A and the low-order divisor storage unit 192B described above are merely examples, and the values stored in these storage units are limited to these values. It is not something that will be done. Further, the function used by the function storage unit 192D for calculating the divided value is also the above-mentioned function y.
However, other various functions may be used.

【0106】次に、図11は画質判定部の他の構成例を
示す図である。尚、同図において前述した図7に示す画
質判定部160内のブロックと同一機能を有するブロッ
クには、同一名称・符号を記している。
Next, FIG. 11 is a diagram showing another example of the configuration of the image quality judging section. In the figure, blocks having the same functions as the blocks in the image quality determination unit 160 shown in FIG. 7 described above have the same names and reference numerals.

【0107】この画質判定部160Aは、評価関数の値
を、画像全体の平均値として求めるものである。関数算
出部168Aは、係数格納部A165,B166にそれ
ぞれ格納されている2次元DCT係数及び量子化係数値
と量子化条件格納部169に格納されている量子化条件
の量子化閾値とから各ブロック毎の各次数の元の2次元
DCT係数に対する量子化係数の誤差を累算してゆく機
能を持つ。そして、関数算出部168Aは、全ブロック
の量子化係数の元の2次元DCT係数に対する誤差を累
算後、その累算値を全ブロック数で除算してその除算に
より得られた画像全体の評価関数値の平均を比較部17
0に出力し、比較部170は、その平均値を上限値格納
部167に格納されている上限値δと比較する。他の処
理は、図7に示す前記画像判定部160と同様である。
この画質判定部160aはブロック毎の条件比較を行わ
ないため、前記画像判定部160よりも処理が簡単とな
る利点がある。
The image quality judgment unit 160A obtains the value of the evaluation function as the average value of the entire image. The function calculation unit 168A determines each block from the two-dimensional DCT coefficient and the quantization coefficient value stored in the coefficient storage units A165 and B166, and the quantization threshold of the quantization condition stored in the quantization condition storage unit 169. It has a function of accumulating the error of the quantized coefficient with respect to the original two-dimensional DCT coefficient of each degree for each. Then, the function calculation unit 168A accumulates the errors of the quantized coefficients of all blocks with respect to the original two-dimensional DCT coefficients, divides the accumulated value by the total number of blocks, and evaluates the entire image obtained by the division. Comparing the average of the function values 17
Then, the comparison unit 170 compares the average value with the upper limit value δ stored in the upper limit value storage unit 167. Other processes are the same as those of the image determination unit 160 shown in FIG.
Since the image quality determination unit 160a does not compare the conditions for each block, there is an advantage that the processing is simpler than that of the image determination unit 160.

【0108】図12は、上記構成の画質判定部160A
を用いた図5に示す画像データ符号化装置の動作を説明
するフローチャートである。まず、2次元DCT変換部
151は、前述した図9のフローチャートに示す処理S
A1〜SA3と同様な処理SB1〜SB3を行い、原画
像の全ブロックについて2次元DCT係数ブロックを生
成する。
FIG. 12 shows the image quality judgment unit 160A having the above structure.
6 is a flowchart for explaining the operation of the image data encoding device shown in FIG. First, the two-dimensional DCT conversion unit 151 performs the process S shown in the flowchart of FIG. 9 described above.
The same processing SB1 to SB3 as A1 to SA3 is performed to generate the two-dimensional DCT coefficient block for all blocks of the original image.

【0109】続いて、画質判定部160は、量子化条件
決定部180に指示して、量子化条件決定部180から
最初の量子化条件を線形量子化部152に出力させると
共に、自らも量子化条件格納部169内にその量子化条
件を取り込む(SB4)。
Subsequently, the image quality judgment unit 160 instructs the quantization condition determination unit 180 to cause the quantization condition determination unit 180 to output the first quantization condition to the linear quantization unit 152, and also quantize itself. The quantization condition is stored in the condition storage unit 169 (SB4).

【0110】続いて、線形量子化部152は、2次元D
CT変換部151から2次元DCT係数ブロックを順次
入力し、上記入力された量子化条件(量子化マトリク
ス)を用いて、各2次元DCT係数ブロックを線形量子
化して量子化係数ブロックに変換する毎に、その線形量
子化により得られた量子化係数ブロックを画質判定部1
60A内の係数格納部169に格納する(SB5)。
Then, the linear quantizing unit 152 uses the two-dimensional D
Each time a two-dimensional DCT coefficient block is sequentially input from the CT transformation unit 151 and each two-dimensional DCT coefficient block is linearly quantized and converted into a quantized coefficient block using the input quantization condition (quantization matrix). Then, the quantized coefficient block obtained by the linear quantization is assigned to the image quality determination unit 1
It stores in the coefficient storage part 169 in 60A (SB5).

【0111】一方、画質判定部160Aの関数算出部1
68Aは、2次元DCT変換部151により係数格納部
A165に格納された2次元DCT係数ブロックと線形
量子化部152により係数格納部B166に格納された
上記2次元DCT係数ブロックを線形量子化することに
より得られた量子化係数ブロック、及び量子化条件決定
部180により量子化条件格納部169に格納された量
子化条件(量子化マトリクス)とから、評価関数の値を
算出する(SB6)。
On the other hand, the function calculating section 1 of the image quality judging section 160A
68A linearly quantizes the two-dimensional DCT coefficient block stored in the coefficient storage unit A165 by the two-dimensional DCT conversion unit 151 and the two-dimensional DCT coefficient block stored in the coefficient storage unit B166 by the linear quantization unit 152. The value of the evaluation function is calculated from the quantized coefficient block obtained by the above and the quantization condition (quantization matrix) stored in the quantization condition storage unit 169 by the quantization condition determination unit 180 (SB6).

【0112】上記処理SB5とSB6は、線形量子化部
152により量子化係数ブロックが生成する毎に繰り返
し行われ、関数算出部168Aは、各量子化係数ブロッ
クの評価関数の値を累算(累計)していく。そして、関
数算出部168Aは、全ての量子化係数ブロックの評価
関数値の累算を終了すると、その累算値を全量子化係数
ブロックのブロック数で除算して、評価関数の画像内平
均値を算出する。
The processings SB5 and SB6 are repeatedly performed each time the quantized coefficient block is generated by the linear quantization unit 152, and the function calculation unit 168A accumulates (accumulates) the values of the evaluation function of each quantized coefficient block. ) Will continue. When the function calculating unit 168A finishes accumulating the evaluation function values of all the quantized coefficient blocks, the function calculation unit 168A divides the accumulated value by the number of blocks of all the quantized coefficient blocks to obtain the in-image average value of the evaluation function. To calculate.

【0113】続いて、比較部170は、上記評価関数の
画像内平均値が上限値格納部167に格納されている上
限値δよりも大きいか否かの比較を行い(SB7)、評
価関数の画像内平均値が上限値δより大きければ(SB
7,YES)、可変長符号化部154に対して符号化を
指示し、これを受けて可変長符号化部154は線形量子
化部152から全ての量子化係数ブロックを所定の順序
で順次入力し、ADCT方式の符号データを生成・出力
する(SB8)。
Subsequently, the comparison section 170 compares whether or not the in-image average value of the evaluation function is larger than the upper limit value δ stored in the upper limit value storage section 167 (SB7), and the evaluation function If the average value in the image is larger than the upper limit value δ (SB
7, YES), and instructs the variable length coding unit 154 to perform coding, and in response to this, the variable length coding unit 154 sequentially inputs all the quantized coefficient blocks from the linear quantization unit 152 in a predetermined order. Then, the ADCT code data is generated and output (SB8).

【0114】一方、比較部170は、上記処理SB7で
評価関数の画像内平均値が上限値δ以下であれば、量子
化条件決定部180に対し、より細かい量子化が行われ
るための量子化条件を線形量子化部152に選択・出力
させると共に、量子化条件格納部169内にもその量子
化条件を格納させる(SB8)。
On the other hand, if the in-image average value of the evaluation function is equal to or less than the upper limit value δ in the processing SB7, the comparing section 170 instructs the quantization condition determining section 180 to perform quantization for finer quantization. The condition is selected and output to the linear quantization unit 152, and the quantization condition is also stored in the quantization condition storage unit 169 (SB8).

【0115】そして、以後、上記処理SB5〜SB8
が、上記判別処理SB7で評価関数の画像内平均値が上
限値δより大きいと判別されるまで、繰り返し行われ
る。ところで、上記図11に示す関数算出部168A
を、各ブロックの評価関数値を算出する毎に、その評価
関数値を前回算出した前ブロックの評価関数値と比較し
て、値が小さい方の評価関数値の方を保持してゆくこと
により、全てのブロックについて評価関数値を求めた段
階で、評価関数値の最小値を得、その最小値が上記上限
値δよりも小さい場合に再量子化を行うようにしてもよ
い。
Then, the above processing SB5 to SB8 is performed thereafter.
However, it is repeatedly performed until it is determined in the determination process SB7 that the in-image average value of the evaluation function is larger than the upper limit value δ. By the way, the function calculation unit 168A shown in FIG.
Every time the evaluation function value of each block is calculated, the evaluation function value is compared with the evaluation function value of the previous block calculated last time, and the evaluation function value with the smaller value is retained. The minimum value of the evaluation function value may be obtained at the stage of obtaining the evaluation function value for all the blocks, and the requantization may be performed when the minimum value is smaller than the upper limit value δ.

【0116】このような方法を用いることにより、復元
画像の中で最も画質の劣化が目立つブロックを基準とし
て、量子化誤差をより小さくするための再量子化が必要
か否かを判断できる。
By using such a method, it is possible to judge whether or not requantization for reducing the quantization error is necessary with reference to the block in which the deterioration of image quality is most noticeable in the restored image.

【0117】尚、評価関数は、上記の例に限定されるも
のではなく、量子化による電力(電力スペクトル密度)
の誤差を用いる関数であってもよい。さらに、上記実施
例では量子化条件の変更を除算により行っているが、除
算以外の各種演算を用いるようにしてもよい。
The evaluation function is not limited to the above example, but the power (power spectral density) due to quantization is used.
It may be a function using the error of. Further, although the quantization condition is changed by division in the above embodiment, various operations other than division may be used.

【0118】また、上記実施例では、画像データの直交
変換を、離散コサイン変換(DCT)によって行ってい
るが、本発明は、離散サイン変換(DST)、離散ルジ
ャンドル(Legendre) 変換、アダマール変換(Hadamar
d) 、ハール(Harr) 変換、カルーネン・レーベ変換、
スラント変換等の他の直交変換を用いて画像データの符
号化を行う画像データ符号化装置にも適用可能なもので
ある。
Further, in the above embodiment, the orthogonal transform of the image data is performed by the discrete cosine transform (DCT), but the present invention is the discrete sine transform (DST), the discrete Legendre transform, and the Hadamard transform ( Hadamar
d), Harr transform, Karhunen-Loeve transform,
It is also applicable to an image data encoding device that encodes image data using other orthogonal transformation such as slant transformation.

【0119】[0119]

【発明の効果】以上説明したように、本発明では、復元
画像の劣化度を予測して、この劣化度が予め定められた
許容範囲内にある場合にのみ可変長符号化を行うように
したので、画像の階調変化特性の違いに係わらず、常に
高い画質の復元が可能な画像データの符号化を行うこと
ができる。
As described above, in the present invention, the degree of deterioration of the restored image is predicted, and the variable length coding is performed only when the degree of deterioration is within a predetermined allowable range. Therefore, it is possible to always encode the image data capable of restoring the high image quality regardless of the difference in the gradation change characteristics of the image.

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

【図1】本発明の原理ブロック図(その1)である。FIG. 1 is a block diagram (1) of the principle of the present invention.

【図2】本発明の原理ブロック図(その2)である。FIG. 2 is a block diagram (No. 2) of the principle of the present invention.

【図3】本発明の原理ブロック図(その3)である。FIG. 3 is a principle block diagram (No. 3) of the present invention.

【図4】本発明の原理ブロック図(その4)である。FIG. 4 is a principle block diagram (No. 4) of the present invention.

【図5】本発明の一実施例の画像データ符号化装置のシ
ステムブロック図である。
FIG. 5 is a system block diagram of an image data encoding device according to an embodiment of the present invention.

【図6】上記一実施例の動作を説明するフローチャート
である。
FIG. 6 is a flowchart illustrating the operation of the above-described embodiment.

【図7】画質判定部の一構成例を示す図である。FIG. 7 is a diagram illustrating a configuration example of an image quality determination unit.

【図8】量子化条件決定部の一構成例を示す図である。FIG. 8 is a diagram illustrating a configuration example of a quantization condition determination unit.

【図9】図8に示す量子化条件決定部を有する図5に示
す画像データ符号化装置の動作を説明するフローチャー
トである。
9 is a flowchart illustrating an operation of the image data encoding device illustrated in FIG. 5 including the quantization condition determination unit illustrated in FIG.

【図10】演算を用いる量子化条件決定部の4種の構成
例を示す図である。
FIG. 10 is a diagram showing four types of configuration examples of a quantization condition determining unit using calculation.

【図11】画質判定部の他の構成例を示す図である。FIG. 11 is a diagram illustrating another configuration example of an image quality determination unit.

【図12】図11に示す画質判定部を有する図5に示す
画像データ符号化装置の動作を説明するフローチャート
である。
12 is a flowchart illustrating an operation of the image data encoding device shown in FIG. 5 having the image quality determination unit shown in FIG.

【図13】従来の画像データ符号化装置の基本ブロック
図である。
FIG. 13 is a basic block diagram of a conventional image data encoding device.

【図14】原画像信号の1ブロックの一例を示す図であ
る。
FIG. 14 is a diagram showing an example of one block of an original image signal.

【図15】2次元DCT変換により得られた2次元DC
T係数ブロックの一例を示す図である。
FIG. 15: Two-dimensional DC obtained by two-dimensional DCT transformation
It is a figure which shows an example of a T coefficient block.

【図16】量子化マトリクスの一構成例を示す図であ
る。
FIG. 16 is a diagram showing a configuration example of a quantization matrix.

【図17】量子化係数ブロックの一例を示す図である。FIG. 17 is a diagram showing an example of a quantized coefficient block.

【図18】量子化係数の走査順序を示す図である。FIG. 18 is a diagram showing a scanning order of quantized coefficients.

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

1,11,21,31 量子化条件出力手段 2,12,22,32 量子化手段 3,13,23,33 符号化手段 4,16,25,35 符号化判断手段 14 画質判定手段 15 計数手段 24 評価平均値算出手段 34 評価関数算出手段 1, 11, 21, 31 Quantization condition output means 2, 12, 22, 32 Quantization means 3, 13, 23, 33 Coding means 4, 16, 25, 35 Coding judgment means 14 Image quality judgment means 15 Counting means 24 Evaluation Average Value Calculation Means 34 Evaluation Function Calculation Means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 原画像の画像データを複数のブロックに
分割し、その分割された複数の各ブロック毎に、そのブ
ロック内の複数の画素の階調値に対して直交変換を行
い、次に、その直交変換により得られた各ブロックの複
数の直交変換係数を量子化した後、画像復元用の符号デ
ータを生成する画像データ符号化装置において、 前記各ブロック内の複数の直交変換係数を量子化するた
めに用いる複数の量子化条件を出力する量子化条件出力
手段(1)と、 該量子化条件出力手段(1)から量子化条件を用いて、
前記各ブロック毎にその各ブロック内の複数の直交変換
係数を量子化する量子化手段(2)と、 該量子化手段(2)により生成された量子化係数を符号
化する符号化手段(3)とを有するとともに、 前記量子化係数と上記量子化手段(2)が上記量子化に
用いた量子化条件とを用いて、上記各ブロック内の上記
複数の直交変換係数を復元し、該復元された直交変換係
数と前記各ブロック内の複数の直交変換係数とから、上
記各ブロックの画像の劣化度を評価する所定の評価関数
の演算を行い、その演算により得られた上記評価関数の
値により上記各ブロックの復元画像の劣化度が許容範囲
内にあるか否かを判断し、その各ブロックの復元画像の
劣化度が上記許容範囲を越えていれば、前記量子化条件
出力手段(1)に対し量子化誤差が前回の量子化よりも
小さくなるような量子化条件の出力を指示し、一方、上
記各ブロックの復元画像の劣化度が上記許容範囲内にあ
れば、前記符号化手段(3)に対し符号化を指示する符
号化判断手段(4)と、 を備えたことを特徴とする画像データ符号化装置。
1. The image data of an original image is divided into a plurality of blocks, the gradation values of a plurality of pixels in the blocks are subjected to orthogonal transformation for each of the plurality of divided blocks, and then, , An image data encoding device for generating code data for image restoration after quantizing a plurality of orthogonal transform coefficients of each block obtained by the orthogonal transform, in which a plurality of orthogonal transform coefficients in each block are quantized. Quantizing condition output means (1) for outputting a plurality of quantizing conditions used for quantization, and using the quantizing condition from the quantizing condition outputting means (1),
For each block, a quantizing means (2) for quantizing a plurality of orthogonal transform coefficients in each block, and an encoding means (3 for coding the quantizing coefficient generated by the quantizing means (2). ) And using the quantized coefficient and the quantization condition used by the quantization means (2) for the quantization, the plurality of orthogonal transform coefficients in each block are restored and the restored From the orthogonal transformation coefficients and the plurality of orthogonal transformation coefficients in each block, a predetermined evaluation function for evaluating the deterioration degree of the image of each block is calculated, and the value of the evaluation function obtained by the calculation. It is determined whether or not the degree of deterioration of the restored image of each block is within the allowable range, and if the degree of deterioration of the restored image of each block exceeds the allowable range, the quantization condition output means (1 ), The quantization error was If the degree of deterioration of the restored image of each block is within the permissible range, an instruction to output a quantization condition that is smaller than the quantization is given, and the encoding means (3) is instructed to perform the encoding. An image data encoding device comprising: an encoding determination means (4) for
【請求項2】 原画像の画像データを複数のブロックに
分割し、その分割された複数の各ブロック毎に、そのブ
ロック内の複数の画素の階調値に対して直交変換を行
い、次に、その直交変換により得られた各ブロックの複
数の直交変換係数を量子化した後画像復元用の符号デー
タを生成する画像データ符号化装置において、 前記各ブロック内の複数の直交変換係数を量子化するた
めに用いる複数の量子化条件を出力する量子化条件出力
手段(11)と、 該量子化条件出力手段(11)からの量子化条件を用い
て、前記各ブロック毎にその各ブロック内の複数の直交
変換係数を量子化する量子化手段(12)と、 該量子化手段(12)により生成された量子化係数を符
号化する符号化手段(13)とを有するとともに、 前記量子化係数と上記量子化手段(12)が上記量子化
に用いた量子化条件を用いて、上記各ブロック内の上記
複数の直交変換係数を復元し、該復元された直交変換係
数と前記各ブロック内の複数の直交変換係数とから、上
記各ブロックの画像の劣化度を評価する所定の評価関数
の演算を行い、その演算により得られた上記評価関数の
値が予め定めた所定の条件を満足するか否かを判断する
画質判定手段(14)と、 該画質判定手段(14)の判断結果に基づき、原画像の
画像データにおける上記所定の条件を満足するブロック
数を計数する計数手段(15)と、 該計数手段(15)により計数されたブロック数が所定
数より少ない場合には、前記量子化条件出力手段(1
1)に対し量子化誤差が前回の量子化よりも少なくなる
ような量子化条件の出力を指示し、一方、上記評価関数
の値が上記所定の条件を満足する場合には符号化手段
(13)に対し符号化を指示する符号化判断手段(1
6)と、 を備えたことを特徴とする画像データ符号化装置。
2. The image data of an original image is divided into a plurality of blocks, the gradation values of a plurality of pixels in the blocks are subjected to orthogonal transformation for each of the plurality of divided blocks, and then, , An image data coding apparatus for generating coded data for image restoration after quantizing a plurality of orthogonal transform coefficients of each block obtained by the orthogonal transform, wherein a plurality of orthogonal transform coefficients in each block are quantized. Using a quantization condition output means (11) for outputting a plurality of quantization conditions used for the above and a quantization condition from the quantization condition output means (11), The quantization coefficient (12) for quantizing a plurality of orthogonal transformation coefficients and the coding means (13) for encoding the quantized coefficient generated by the quantization means (12) are provided. And above The substituting means (12) restores the plurality of orthogonal transform coefficients in each block using the quantization condition used for the quantization, and restores the restored orthogonal transform coefficients and the plurality of orthogonal transform coefficients in each block. Whether or not a predetermined evaluation function for evaluating the degree of deterioration of the image of each block is calculated from the orthogonal transformation coefficient and whether the value of the evaluation function obtained by the calculation satisfies a predetermined condition. An image quality determination means (14) for determining the number of blocks, and a counting means (15) for counting the number of blocks in the image data of the original image that satisfy the above-mentioned predetermined conditions based on the determination result of the image quality determination means (14) When the number of blocks counted by the counting means (15) is less than a predetermined number, the quantization condition output means (1
If the value of the evaluation function satisfies the predetermined condition, the encoding means (13) is instructed to 1) to output the quantization condition such that the quantization error becomes smaller than the previous quantization. ), A coding judgment means (1
6) An image data encoding device comprising:
【請求項3】 原画像の画像データを複数のブロックに
分割し、その分割された複数の各ブロック毎に、そのブ
ロック内の複数の画素の階調値に対して直交変換を行
い、次に、その直交変換により得られた各ブロックの複
数の直交変換係数を量子化した後画像復元用の符号デー
タを生成する画像データ符号化装置において、 前記各ブロック内の複数の直交変換係数を量子化するた
めに用いる複数の量子化条件を出力する量子化条件出力
手段(21)と、 該量子化条件出力手段(21)からの量子化条件を用い
て、前記各ブロック毎にその各ブロック内の複数の直交
変換係数を量子化する量子化手段(22)と、 該量子化手段(22)により生成された量子化係数を符
号化する符号化手段(23)とを有するとともに、 前記量子化係数と上記量子化手段(22)が上記量子化
に用いた量子化条件とを用いて、上記各ブロック内の上
記複数の直交変換係数を復元し、該復元された直交変換
係数と前記ブロック内の複数の直交変換係数とから、上
記各ブロックの画像の劣化度を評価する所定の評価関数
の演算を行うことにより、全ブロックの評価関数値を求
め、それらの全ブロックの評価関数値から画像全体での
1ブロックの評価関数値の平均値を求める評価平均値算
出手段(24)と、 該評価平均値算出手段(24)により得られた平均値に
基づいて、前記量子化条件出力手段(21)に対して量
子化誤差が前回の量子化よりも小さくなるような量子化
条件の出力指示または前記符号化手段(23)に対する
符号化の指示のいずれか一方の指示を行う符号化判断手
段(25)と、 を備えたことを特徴とする画像データ符号化装置。
3. The image data of an original image is divided into a plurality of blocks, the gradation values of a plurality of pixels in the blocks are subjected to orthogonal transformation for each of the plurality of divided blocks, and then, , An image data coding apparatus for generating coded data for image restoration after quantizing a plurality of orthogonal transform coefficients of each block obtained by the orthogonal transform, wherein a plurality of orthogonal transform coefficients in each block are quantized. Using a quantization condition output means (21) for outputting a plurality of quantization conditions used for the above and a quantization condition from the quantization condition output means (21), The quantization coefficient (22) for quantizing a plurality of orthogonal transformation coefficients and the coding means (23) for encoding the quantized coefficient generated by the quantization means (22) are provided. And above The substituting means (22) restores the plurality of orthogonal transform coefficients in each block using the quantization condition used for the quantization, and restores the restored orthogonal transform coefficients and the plurality of orthogonal transform coefficients in the block. From the orthogonal transformation coefficient, by calculating a predetermined evaluation function for evaluating the deterioration degree of the image of each block, the evaluation function values of all blocks are obtained, and the evaluation function values of all the blocks An evaluation average value calculating means (24) for obtaining an average value of evaluation function values of one block, and a quantization condition output means (21) based on the average value obtained by the evaluation average value calculating means (24). On the other hand, a coding determination means (25) which gives either one of a quantization condition output instruction for which a quantization error is smaller than that of the previous quantization or an encoding instruction to the encoding means (23). And Image data encoding apparatus characterized by a.
【請求項4】 原画像の画像データを複数のブロックに
分割し、その分割された複数の各ブロック毎に、そのブ
ロック内の複数の画素の階調値に対して直交変換を行
い、次に、その直交変換により得られた各ブロックの複
数の直交変換係数を量子化した後画像復元用の符号デー
タを生成する画像データ符号化装置において、 前記各ブロック内の複数の直交変換係数を量子化するた
めに用いる複数の量子化条件を出力する量子化条件出力
手段(31)と、 該量子化条件出力手段(31)からの量子化条件を用い
て、前記各ブロック毎にその各ブロック内の複数の直交
変換係数を量子化する量子化手段(32)と、 該量子化手段(32)により生成された量子化係数を符
号化する符号化手段(33)とを有するとともに、 上記量子化手段(32)が上記量子化に用いた量子化条
件とを用いて、上記各ブロック内の上記複数の直交変換
係数を復元し、該復元された直交変換係数と前記各ブロ
ック内の複数の直交変換係数とから、上記各ブロックの
画像の劣化度を評価する所定の評価関数の演算を行い、
その演算により得られた上記評価関数値の中で量子化誤
差が最も大きいことを示す評価関数値を求める評価関数
演算手段(34)と、 該評価関数演算手段(34)により求められた前記評価
関数値に基づいて、前記量子化条件出力手段(31)に
対して量子化誤差が前回の量子化よりも小さくなるよう
な量子化条件の出力指示または前記符号化手段(33)
に対する符号化の指示のいずれか一方の指示を行う符号
化判断手段(35)と、 を備えたことを特徴とする画像データ符号化装置。
4. The image data of an original image is divided into a plurality of blocks, the gradation values of a plurality of pixels in the blocks are subjected to orthogonal transformation for each of the plurality of divided blocks, and then, , An image data coding apparatus for generating coded data for image restoration after quantizing a plurality of orthogonal transform coefficients of each block obtained by the orthogonal transform, wherein a plurality of orthogonal transform coefficients in each block are quantized. For each block, the quantization condition output means (31) for outputting a plurality of quantization conditions to be used for outputting and the quantization conditions from the quantization condition output means (31) The quantizing means (32) for quantizing a plurality of orthogonal transform coefficients, and the coding means (33) for coding the quantized coefficients generated by the quantizing means (32), and the quantizing means (32 Using the quantization condition used for the quantization, restores the plurality of orthogonal transform coefficients in each block, and from the restored orthogonal transform coefficient and the plurality of orthogonal transform coefficients in each block. , Calculating a predetermined evaluation function for evaluating the degree of deterioration of the image of each block,
Evaluation function calculation means (34) for obtaining an evaluation function value indicating that the quantization error is the largest among the evaluation function values obtained by the calculation, and the evaluation obtained by the evaluation function calculation means (34). Based on the function value, the quantization condition output means (31) is instructed to output the quantization condition such that the quantization error is smaller than the previous quantization, or the encoding means (33).
An image data encoding device, comprising: an encoding determination means (35) for instructing either one of the encoding instructions for
JP9525292A 1992-04-15 1992-04-15 Picture data coder Pending JPH05292326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9525292A JPH05292326A (en) 1992-04-15 1992-04-15 Picture data coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9525292A JPH05292326A (en) 1992-04-15 1992-04-15 Picture data coder

Publications (1)

Publication Number Publication Date
JPH05292326A true JPH05292326A (en) 1993-11-05

Family

ID=14132570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9525292A Pending JPH05292326A (en) 1992-04-15 1992-04-15 Picture data coder

Country Status (1)

Country Link
JP (1) JPH05292326A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6078689A (en) * 1997-06-02 2000-06-20 Fuji Xerox Co., Ltd. Image information encoding device
JP2003051748A (en) * 2001-08-08 2003-02-21 Sony Corp Information processing unit and information processing method, recording medium, and program
WO2008047646A1 (en) * 2006-10-12 2008-04-24 Sharp Kabushiki Kaisha Communication apparatus and communication method
JP2010004133A (en) * 2008-06-18 2010-01-07 Canon Inc Image forming apparatus and image processing method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6078689A (en) * 1997-06-02 2000-06-20 Fuji Xerox Co., Ltd. Image information encoding device
JP2003051748A (en) * 2001-08-08 2003-02-21 Sony Corp Information processing unit and information processing method, recording medium, and program
JP4569056B2 (en) * 2001-08-08 2010-10-27 ソニー株式会社 Information processing apparatus, information processing method, recording medium, and program
WO2008047646A1 (en) * 2006-10-12 2008-04-24 Sharp Kabushiki Kaisha Communication apparatus and communication method
US8385218B2 (en) 2006-10-12 2013-02-26 Sharp Kabushiki Kaisha Communication apparatus and communication method
JP2010004133A (en) * 2008-06-18 2010-01-07 Canon Inc Image forming apparatus and image processing method

Similar Documents

Publication Publication Date Title
US6198848B1 (en) Method and apparatus for compressing and storing data indicative of a full-color image
JP3109854B2 (en) Image coding method and apparatus
EP0470773A2 (en) Orthogonal transform coding apparatus
KR19990037305A (en) Image encoding apparatus, image encoding method, and recording medium recording image encoding program
JPH07107300A (en) Picture encoding device
US6915014B1 (en) Image processing apparatus and method
JPH05292326A (en) Picture data coder
US5724096A (en) Video signal encoding method and apparatus employing inter-block redundancies
JP2897563B2 (en) Image compression coding device
JP2793402B2 (en) Image coding device
JPH04220081A (en) Method and device for picture data decoding
JP2820807B2 (en) Image data encoding method
JPS62239693A (en) Method of data arrangement and reconstruction of digital image signal
JPH05316359A (en) Picture data coder
JP2887843B2 (en) Image data restoration method and apparatus
JP3014200B2 (en) Image data encoding apparatus and encoding method
JP2887842B2 (en) Image data restoration method and apparatus
JPH0310486A (en) Moving picture encoder
JP3216741B2 (en) Image coding method
JP3176421B2 (en) Image data restoration device
JP3397682B2 (en) Image coding device
JPH0487469A (en) Picture processing unit
JPH0595484A (en) Picture compressor and its method
KR0134358B1 (en) Coding and decoding system of variable scan method
JPH0449778A (en) Method of encoding picture

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20010327