Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3263100B2 - Image data encoding method and apparatus - Google Patents
[go: Go Back, main page]

JP3263100B2 - Image data encoding method and apparatus - Google Patents

Image data encoding method and apparatus

Info

Publication number
JP3263100B2
JP3263100B2 JP21776491A JP21776491A JP3263100B2 JP 3263100 B2 JP3263100 B2 JP 3263100B2 JP 21776491 A JP21776491 A JP 21776491A JP 21776491 A JP21776491 A JP 21776491A JP 3263100 B2 JP3263100 B2 JP 3263100B2
Authority
JP
Japan
Prior art keywords
quantization
encoding
coefficient
unit
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.)
Expired - Fee Related
Application number
JP21776491A
Other languages
Japanese (ja)
Other versions
JPH0563986A (en
Inventor
隆 森原
雅芳 清水
嗣男 野田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP21776491A priority Critical patent/JP3263100B2/en
Publication of JPH0563986A publication Critical patent/JPH0563986A/en
Application granted granted Critical
Publication of JP3263100B2 publication Critical patent/JP3263100B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、多値画像の符号化方法
及び装置に関し、特に、多値画像を複数の画素からなる
ブロックに分割して、ブロック内の画素を直交変換した
後、符号化する多値画像の直交変換符号化方式による画
像データ符号化方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for encoding a multi-valued image, and more particularly to a method for dividing a multi-valued image into blocks each having a plurality of pixels, and orthogonally transforming the pixels in the blocks. The present invention relates to a method and an apparatus for encoding image data by an orthogonal transform encoding method of a multivalued image to be converted.

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

【0003】[0003]

【従来の技術】画像データの高能率な圧縮方式として、
例えば適応離散コサイン変換符号化方式がある。適応離
散コサイン変換符号化方式(Adaptive Discrete Cosine
Transform 以下、略してADCTと称する)について
次に説明する。
2. Description of the Related Art As an efficient compression method for image data,
For example, there is an adaptive discrete cosine transform coding method. Adaptive Discrete Cosine Transform Coding
Transform will be described below.

【0004】ADCTは、画像を8×8画素からなるブ
ロックに分割し、各ブロックの画信号を2次元離散コサ
イン変換(以下、DCTと称する)により空間周波数分
布の係数に変換し、視覚に適応した閾値で量子化し、求
めた量子化係数を統計的に求めたハフマン・テーブルに
より符号化するものである。図10に示すADCTの基
本ブロック図に従って、符号化動作を詳細に説明する。
In the ADCT, an image is divided into blocks of 8 × 8 pixels, and an image signal of each block is converted into a spatial frequency distribution coefficient by a two-dimensional discrete cosine transform (hereinafter, referred to as DCT), and is adapted to visual sense. Quantization is performed with the threshold value obtained, and the obtained quantization coefficient is encoded using a Huffman table that is statistically obtained. The encoding operation will be described in detail according to the basic block diagram of ADCT shown in FIG.

【0005】まず、画像を図12に示す8×8画素から
なるブロックに分割し、端子11からDCT変換部12
に入力する。DCT変換部12では、入力された画信号
をDCTにより直交変換して、図13に示す空間周波数
分布のDCT係数に変換し、線形量子化部13に出力す
る。具体的には、図11に示すように、端子11より入
力された画信号は1次元DCT変換部20で1次元DC
T変換され、転置部21でブロック内の係数の行と列を
入れ換え(転置)、1次元DCT変換部22に出力され
る。1次元DCT変換部22では、1次元DCT変換部
20と同様に1次元DCT変換され、転置部23に出力
する。転置部23では、転置部21と同様の転置処理を
行い端子24に出力する。
First, an image is divided into blocks each having 8 × 8 pixels shown in FIG.
To enter. The DCT transform unit 12 orthogonally transforms the input image signal by DCT, transforms the image signal into DCT coefficients having a spatial frequency distribution shown in FIG. Specifically, as shown in FIG. 11, the image signal input from the terminal 11 is converted by the one-dimensional DCT
The T-transform is performed, and the transposition unit 21 transposes (transposes) the rows and columns of the coefficients in the block and outputs the result to the one-dimensional DCT transform unit 22. The one-dimensional DCT transform unit 22 performs one-dimensional DCT transform in the same manner as the one-dimensional DCT transform unit 20, and outputs the result to the transpose unit 23. The transposition unit 23 performs the same transposition processing as the transposition unit 21 and outputs the result to the terminal 24.

【0006】この処理を画像データの全ブロックについ
て行うことでDCT係数に変換される。線形量子化部1
3では、入力されたDCT係数を、視覚実験により決め
られた図14に示す量子化閾値で構成する量子化マトリ
クス14により線形量子化する。この結果を図15に示
す。
[0006] This process is performed on all blocks of image data to convert them into DCT coefficients. Linear quantization unit 1
In step 3, the input DCT coefficients are linearly quantized by a quantization matrix 14 composed of the quantization threshold values shown in FIG. The result is shown in FIG.

【0007】図15の量子化されたDCT係数は、閾値
より小さい値のDCT係数は0となり、DC成分とわず
かのAC成分のみが値を持つ量子化係数が生成される。
2次元的に配列された量子化係数は、図16に示すジグ
ザグスキャンにより1次元に変換され、可変長符号化部
15に入力される。可変長符号化部15は、各ブロック
先頭のDC成分と前ブロックのDC成分との差分を可変
長符号化する。AC成分については、値が0でない有効
係数の値(インデックス)と、有効係数までの値が0で
ある無効係数のランの長さを可変長符号化する。更にD
CおよびACの各成分は、画像ごとの統計量をもとに作
成するハフマン・テーブルで構成する符号表16を用い
て符号化され、得られたデータは端子17から出力され
る。
In the quantized DCT coefficient shown in FIG. 15, a DCT coefficient having a value smaller than the threshold value becomes 0, and a quantized coefficient having only the DC component and a small number of AC components is generated.
The quantized coefficients arranged two-dimensionally are converted into one-dimensional by zigzag scan shown in FIG. The variable length coding unit 15 performs variable length coding on the difference between the DC component at the head of each block and the DC component of the previous block. As for the AC component, the variable length encoding is performed on the value (index) of the effective coefficient whose value is not 0 and the length of the run of the invalid coefficient whose value up to the effective coefficient is 0. Further D
Each component of C and AC is encoded using a code table 16 composed of a Huffman table created based on statistics for each image, and the obtained data is output from a terminal 17.

【0008】ADCT方式において、量子化係数はDC
T係数と量子化閾値とにより決定される。図17に図1
0の線形量子化回路13の詳細な構成図を示す。図17
において、まず、量子化閾値格納部112には量子化マ
トリクス(VTH)が量子化閾値として格納されてい
る。入力端子110から入力されるDCT係数は、DC
T係数格納部111に格納される。DCT係数格納部1
11は、タイミング制御部115からのデータ読出信号
(RED)に従い、入力されたDCT係数を1個ずつ除
算器113に出力する。
In the ADCT method, the quantization coefficient is DC
It is determined by the T coefficient and the quantization threshold. FIG.
FIG. 3 shows a detailed configuration diagram of a 0 linear quantization circuit 13. FIG.
First, the quantization threshold value storage unit 112 stores a quantization matrix (VTH) as a quantization threshold value. The DCT coefficient input from the input terminal 110 is DC
It is stored in the T coefficient storage unit 111. DCT coefficient storage unit 1
11 outputs the input DCT coefficients to the divider 113 one by one according to the data read signal (RED) from the timing control unit 115.

【0009】また、量子化閾値格納部112はタイミン
グ制御部115からのデータ読出信号(RED)に従っ
て、格納している各DCT係数に対応した量子化閾値を
除算器113に出力する。1つのDCT係数の量子化終
了後、タイミング制御部115は、DCT係数格納部1
11と量子化閾値格納部112に次のDCT係数と量子
化閾値の読出を指示し、次の係数の量子化を行う。
The quantization threshold value storage unit 112 outputs a quantization threshold value corresponding to each DCT coefficient stored therein to the divider 113 in accordance with the data read signal (RED) from the timing control unit 115. After the quantization of one DCT coefficient is completed, the timing control unit 115
11, and instructs the quantization threshold storage unit 112 to read the next DCT coefficient and quantization threshold, and performs quantization of the next coefficient.

【0010】このように、DCT係数格納部111に格
納されているDCT係数を1つずつ読出し、量子化閾値
格納部112に格納されている量子化閾値で除して、結
果を対象画素の量子化係数として端子114に出力する
処理をブロック単位に1画面分繰り返すことにより、1
画面分のDCT係数が量子化される。
As described above, the DCT coefficients stored in the DCT coefficient storage unit 111 are read out one by one, divided by the quantization threshold stored in the quantization threshold storage unit 112, and the result is calculated by the quantization of the target pixel. By repeating the process of outputting to the terminal 114 as a conversion coefficient for one screen in block units, 1
The DCT coefficients for the screen are quantized.

【0011】[0011]

【発明が解決しようとする課題】ところで、ADCT方
式では、DCT係数を量子化する際、全てのDCT係数
を1種類の量子化閾値で量子化している。一般に、人間
の視覚は、階調変化が激しく変化する画像では、多少の
近似誤差があっても画質の劣化を比較的認識しにくい傾
向がある。図12の量子化閾値は、この視感度特性を利
用したものである。
In the ADCT method, when quantizing the DCT coefficients, all the DCT coefficients are quantized with one kind of quantization threshold. In general, human vision tends to relatively hardly recognize deterioration of image quality in an image in which a gradation change greatly changes even if there is some approximation error. The quantization threshold in FIG. 12 utilizes this visibility characteristic.

【0012】しかしながら、逆に階調変化が緩やかに変
化する画像では、人間の視覚は近似誤差を識別しやす
く、画質劣化を認識する傾向がある。したがって、図1
2に示した階調変化の激しい画像を対象とした1種類の
量子化閾値では、階調が緩やかに変化している画像での
劣化が目立つと共に、これを防止するために、量子化閾
値を低い値に設定した場合には、階調変化の激しい画像
を符号化する際の符号量が増加し、効率的な圧縮ができ
ないという問題があった。
[0012] However, in contrast, in an image in which the gradation change gradually changes, the human eye tends to recognize the approximation error and tends to recognize the image quality deterioration. Therefore, FIG.
In the case of one type of quantization threshold for an image having a sharp gradation change shown in FIG. 2, deterioration in an image in which the gradation changes gradually is conspicuous, and in order to prevent this, the quantization threshold is set to If the value is set to a low value, the amount of coding when coding an image having a sharp gradation change increases, and there is a problem that efficient compression cannot be performed.

【0013】本発明は、このような従来の問題点に鑑み
てなされたもので、画像ごとの階調変化に関わらず、高
い画質の画像符号化が可能な画像データ符号化方法及び
装置を提供することを目的とする。
The present invention has been made in view of such a conventional problem, and provides an image data encoding method and apparatus capable of encoding an image of high quality regardless of a gradation change for each image. The purpose is to do.

【0014】[0014]

【課題を解決するための手段】図1は本発明の原理説明
図であり、装置構成を例にとっている。まず本発明は、
原画像をそれぞれが複数の画素からなる複数のブロック
に分割して得られる各ブロック毎に、ブロック内の前記
複数の画素の階調値を2次元離散コサイン変換する2次
元DCT変換部12と、2次元DCT変換部12より得
られた変換係数を所定の量子化閾値を用いて量子化する
量子化処理部31と、量子化処理部31で得られた量子
化係数を符号化する符号化部32とを備えた画像データ
符号化装置を対象とする。
FIG. 1 is an explanatory view of the principle of the present invention, taking an apparatus configuration as an example. First, the present invention
For each block obtained by dividing the original image into a plurality of blocks each including a plurality of pixels, a two-dimensional DCT transform unit 12 for performing a two-dimensional discrete cosine transform of the tone values of the plurality of pixels in the block; A quantization unit 31 for quantizing the transform coefficients obtained from the two-dimensional DCT unit 12 using a predetermined quantization threshold, and an encoding unit for encoding the quantized coefficients obtained by the quantization unit 31 32.

【0015】[0015]

【課題を解決するための手段】このような画像データ符
号化装置につき本発明にあっては、処理対象となる原画
像につき2次元DCT変換部12,量子化処理部31お
よび符号化部32を使用して1回目の符号化を行う第1
制御部100と、第1制御部100による1回目の量子
化で得られた各ブロックの所定位置までの零以外の値を
もつ有効係数の総数 A と画像全体の有効係数の数 B
との比R A /R B を検出する特徴検出部34と、特
徴検出部34の検出結果を予め定めた閾値と比較し、該
比較結果に基づいて選択された量子化閾値を使用して前
記2次元DCT変換部12,量子化処理部31および符
号化部32により2回目の符号化を行う第2制御部20
0とを備えたことを特徴とする。
According to the present invention, such an image data encoding apparatus is provided with a two-dimensional DCT transform unit 12, a quantization processing unit 31, and an encoding unit 32 for an original image to be processed. Perform the first encoding using the first
The control unit 100 and the total number R A of effective coefficients having a non-zero value up to a predetermined position of each block obtained in the first quantization by the first control unit 100 And the number of effective coefficients R B of the entire image
Ratio R A / R B And a two-dimensional DCT transform unit 12 that compares the detection result of the feature detection unit 34 with a predetermined threshold value and uses a quantization threshold value selected based on the comparison result. Control unit 20 that performs the second encoding by the encoding processing unit 31 and the encoding unit 32
0 is provided.

【0016】ここで符号化部32は、有効係数が得られ
た時に非有効係数を示す一定固定長Lの第1固定長符号
L1を有効係数が得られるまでの非有効係数の数分出力
すると共に、有効係数を示す同じ一定長Lの第2固定長
符号L2を1つ出力する固定長符号化部32aと、DC
成分及びAC成分の有効係数が得られた時に各成分の有
効係数の値と有効係数までの零の数との組を可変長符号
化する可変長符号化部32bとを備え、第1制御部10
0による1回目の符号化は固定長符号化部32aを使用
し、第2制御部200による2回目の符号化は前記可変
長符号化部32bを使用する。
Here, the encoder 32 outputs the first fixed-length code L1 of a fixed fixed length L indicating the ineffective coefficient when the effective coefficient is obtained, for the number of ineffective coefficients until the effective coefficient is obtained. And a fixed-length encoding unit 32a that outputs one second fixed-length code L2 having the same constant length L indicating an effective coefficient;
A variable-length coding unit 32b that performs variable-length coding of a set of the value of the effective coefficient of each component and the number of zeros up to the effective coefficient when the effective coefficients of the component and the AC component are obtained; 10
The first encoding using 0 uses the fixed-length encoding unit 32a, and the second encoding by the second control unit 200 uses the variable-length encoding unit 32b.

【0017】また第2制御手段200は、特徴検出部3
4で検出した各ブロックの所定位置までの有効係数の総
数RA と画像全体の有効係数の数RB との比RA /RB
を求め、この比RA /RB を予め定めた閾値と比較して
量子化閾値を選択する。更に第2制御部200は、比R
A /RB が閾値未満の場合は、階調変化の激しい画像に
適用される第1量子化閾値を選択し、比RA /RB が閾
値以上の場合は、階調変化の緩やかな画像に適用される
第2量子化閾値を選択する。
The second control means 200 includes the feature detecting unit 3
The ratio R A / R B of the number R B of the total number R A and the entire image of the effective coefficients of the effective coefficient of up to a predetermined position of each block detected by 4
Is calculated, and the ratio R A / R B is compared with a predetermined threshold to select a quantization threshold. Further, the second control unit 200 controls the ratio R
A / if R B is less than the threshold value, selects the first quantization threshold applied to intense image gradation change, if the ratio R A / R B less than the threshold value, moderate image gradation change Is selected.

【0018】一方、本発明による画像データの符号化方
法は次の〜処理過程から構成される。処理対象と
なる原画像につき1回目の2次元離散コサイン変換、量
子化および符号化を行う第1過程;第1過程で量子化
された各ブロックの所定位置までの零以外の値をもつ有
効係数の総数と画像全体の有効係数の数を検出する第2
過程;第2過程の検出結果と予め定めた閾値と比較
し、この比較結果に基づいて量子化閾値を選択する第3
過程;第3過程で選択された量子化閾値を使用して2
回目の原画像の2次元離散コサイン変換、量子化および
符号化を行う第4過程;ここで第1過程における1回の
量子化係数の符号化は、量子化係数が有効係数か否かに
分けて異なる値の固定長符号を出力する固定長符号化を
行い、第2過程にあっては、第1過程で得られた固定長
符号を用いて各ブロックの所定位置までの有効係数の総
数と画像全体の有効係数の数を検出する。
On the other hand, the image data encoding method according to the present invention comprises the following processing steps. A first step of performing a first two-dimensional discrete cosine transform, quantization, and encoding on an original image to be processed; an effective coefficient having a non-zero value up to a predetermined position of each block quantized in the first step; Second to detect the total number of effective coefficients and the number of effective coefficients of the whole image
Step: comparing the detection result of the second step with a predetermined threshold, and selecting a quantization threshold based on the comparison result.
Step; 2 using the quantization threshold selected in the third step
A fourth step of performing the two-dimensional discrete cosine transform, quantization, and encoding of the original image for the first time; where the encoding of the quantized coefficient in the first step is divided into whether the quantized coefficient is an effective coefficient or not. In the second step, using the fixed-length code obtained in the first step, the total number of effective coefficients up to a predetermined position in each block is calculated. Detect the number of effective coefficients of the whole image.

【0019】[0019]

【作用】このような構成を備えた本発明の画像データ符
号化方法及び装置によれば次の作用が得られる。DCT
を用いた画像データの符号化では、DCT変換後の係数
を、画像の種類によらず一定の量子化閾値で量子化した
場合、有効係数(係数値が0以外の係数)として残る係
数の数は、画像の変化の大きさやその数に依存して変化
する。
According to the image data encoding method and apparatus of the present invention having such a configuration, the following operations can be obtained. DCT
In the encoding of image data using, when the coefficients after DCT are quantized with a fixed quantization threshold regardless of the type of image, the number of coefficients remaining as effective coefficients (coefficients other than 0) Varies depending on the magnitude and number of changes in the image.

【0020】一般的には、風景画のように階調値が激し
く変化する部分の多い画像では、全有効係数に占める低
次以外の有効係数の数が多く、人物画のように階調変化
の緩やかな画像の場合には、全有効係数に占める低次の
有効係数の割合が大きくなる傾向がある。また、人間が
感じる画質の評価は、変化の激しい風景画のような画像
では甘く、要求される近似精度は低く、量子化は粗くと
も許容できる。
Generally, in an image such as a landscape image having many portions where the gradation value changes drastically, the number of effective coefficients other than the low order in all the effective coefficients is large, and the gradation change is not significant like a portrait. In the case of an image having a moderate, the ratio of low-order effective coefficients to all effective coefficients tends to increase. Also, the evaluation of the image quality perceived by humans is weak for an image such as a landscape image that changes rapidly, the required approximation accuracy is low, and the coarse quantization is acceptable.

【0021】一方、変化の緩やかな人物画のような画像
では、評価が厳しい傾向があり、要求される近似精度は
高い。これを整理すると次のようになる。 [階調変化] [視覚の近似誤差] [適応量子化] 激しい(風景画) 識別しにくい 粗くてよい 緩やか(人物画) 識別しやすい 細くする 本発明では、このような画像の傾向を検出する処理とそ
れに基づく、最適な量子化条件の選択により、画像の特
徴にあった量子化を行うことで、符号量の増加を抑えつ
つ、高い画質の復元画像を安定して確保することを可能
とする。
On the other hand, in an image such as a portrait which changes slowly, evaluation tends to be severe, and the required approximation accuracy is high. This can be summarized as follows. [Gradation change] [visual approximation error] [adaptive quantization] Intense (landscape image) Difficult to identify Coarsely good Slow (portrait image) Easier to identify Thinner In the present invention, such image tendency is detected. By performing processing and selecting the optimal quantization conditions based on it, quantization suitable for the characteristics of the image can be performed, and it is possible to stably secure a high-quality restored image while suppressing an increase in the code amount. I do.

【0022】即ち、第1回目の符号化において量子化後
の各ブロックの所定位置までの係数が有効係数(零以外
の値をもつ係数)となる総数と画像全体の有効係数の数
を検出し、この検出結果と予め設定してある閾値との比
較により量子化閾値を選択し、可変長符号化する。図2
のフローチャートを用いて本発明の原理図の作用を説明
する。
That is, in the first encoding, the total number of effective coefficients (coefficients having values other than zero) up to a predetermined position of each block after quantization and the number of effective coefficients of the entire image are detected. A quantization threshold value is selected by comparing the detection result with a preset threshold value, and variable-length coding is performed. FIG.
The operation of the principle diagram of the present invention will be described with reference to the flowchart of FIG.

【0023】まず、ステップS1で初期量子化閾値、例
えば粗い量子化を行う第1量子化閾値の第1量子化マト
リクスVTH1を選択する。また、ステップS2で固定
長符号化部32aを選択する。このステップS1,S2
の順序は、逆でも良い。次に、ステップS3で8×8画
素のブロック毎にDCT変換を行ってDCT係数を求
め、符号化する。
First, in step S1, an initial quantization threshold, for example, a first quantization matrix VTH1 of a first quantization threshold for performing coarse quantization is selected. Further, in step S2, the fixed length coding unit 32a is selected. These steps S1, S2
May be reversed. Next, in step S3, DCT conversion is performed for each block of 8 × 8 pixels to obtain a DCT coefficient, which is encoded.

【0024】このとき符号化処理部32では、ジグザグ
スキャンにより1次元に変換された量子化係数のうちか
ら値が0でない有効係数を検出した際に、有効係数の値
(インデックス)と、有効係数までの値が0である無効
係数(非有効係数)のランの長さを検出する。このとき
固定長符号化部32aが選択されているため、固定長符
号化部32aは無効係数を係数を意味する一定の符号長
(固定長)Lビットの第1固定長符号L1をランの数だ
け繰り返し出力した後、有効係数を意味する一定の符号
長Lビットの第2固定長符号L2を1つ出力する。ステ
ップS3の処理はステップS4で全てのブロックの終了
が判別されるまで、ブロック毎に繰り返される。
At this time, when the encoding processing unit 32 detects an effective coefficient having a value other than 0 from among the one-dimensionally converted quantized coefficients by zigzag scan, the effective coefficient value (index) and the effective coefficient The length of the run of the invalid coefficient (non-effective coefficient) whose value up to 0 is detected. At this time, since the fixed-length coding unit 32a is selected, the fixed-length coding unit 32a converts the invalid coefficient into a first fixed-length code L1 having a fixed code length (fixed length) L bits meaning a coefficient by the number of runs. After that, one second fixed-length code L2 having a constant code length of L bits meaning an effective coefficient is output. The process of step S3 is repeated for each block until the end of all blocks is determined in step S4.

【0025】1回目の符号化処理が1画面分について済
むとステップS5に進み、特徴検出部34でバッファ内
に格納された有効係数を示す固定長符号L2に基づい
て、各ブロックの所定位置までの0以外の値をもつ有効
係数の総数と、画像全体の有効係数の数を検出する特徴
検出を行う。ここでバッファに格納された出力された符
号データ量Mは、 M=L×{(無効係数の数)+(有効係数の数)} =L×(画素数) の大きさである。
When the first encoding process is completed for one screen, the process proceeds to step S5, where the feature detecting unit 34 reaches a predetermined position of each block based on the fixed length code L2 indicating the effective coefficient stored in the buffer. The feature detection for detecting the total number of effective coefficients having a value other than 0 and the number of effective coefficients of the entire image is performed. Here, the output code data amount M stored in the buffer has a size of M = L × {(number of invalid coefficients) + (number of valid coefficients)} = L × (number of pixels).

【0026】このようにして得られたバッファ内の符号
データは、符号長L×64ビット、即ち、符号長L×8
バイトごとに、各ブロック内をジグザグスキャンした順
に有効係数の識別符号L2と無効係数の識別符号L1が
並んでいる。特徴検出としては、ジグザクスキャンの走
査順序で先頭からN番目までの低次領域に含まれる有効
係数の総数RA と画像全体の有効係数の数RB を検出
し、その比RA /RB を求める。
The code data thus obtained in the buffer has a code length of L × 64 bits, that is, a code length of L × 8.
For each byte, the identification code L2 of the effective coefficient and the identification code L1 of the invalid coefficient are arranged in the order in which each block is zigzag scanned. The feature detection, and detects the number R B of the total number R A and the entire image of the effective coefficient of effective coefficients included in the low-order area from the top scan order of the zigzag scan to N-th, the ratio R A / R B Ask for.

【0027】具体的には、各ブロック毎にN番目までの
有効係数の数raとブロック全体の有効係数の数rbを検
出し、これを全ブロックにつき求めて各々総和を得る。
即ち、次式に従って比RA /RB を求める。
[0027] More specifically, to detect the number r b having r a and the block overall effective coefficient of effective coefficients up to N-th for each block, which obtain each sum asking per all blocks.
That is, determining the ratio R A / R B according to the following equation.

【0028】[0028]

【数1】 (Equation 1)

【0029】このような画像の特徴検出結果により、ス
テップS6で2つ以上用意してある量子化閾値の何れか
を選択し、量子化処理部31に量子化閾値設定を指示す
るこの量子化閾値の選択は、特徴検出による比RA /R
B が閾値未満の場合は、階調変化の激しい画像に適用さ
れる第1量子化閾値を選択し、比RA /RB が閾値以上
の場合は、階調変化の緩やかな画像に適用される第2量
子化閾値を選択する。
Based on such a feature detection result of the image, in step S6, one of two or more quantization thresholds prepared is selected, and the quantization threshold value for instructing the quantization processing unit 31 to set the quantization threshold is selected. Is determined by the ratio RA / R based on feature detection.
If B is less than the threshold value, selects the first quantization threshold applied to intense image gradation change, if the ratio R A / R B less than the threshold value, is applied to loose image gradation change A second quantization threshold value is selected.

【0030】量子化閾値の選択後、ステップS7で符号
化処理部32に対し可変長符号化部32aの選択を指示
し、ステップS8,S9で2回目のDCT変換、量子化
及び符号化を行う。このとき2次元的に配列された量子
化係数は、ジグザグスキャンにより1次元に変換され、
可変長符号部32bによりDC成分とAC成分が各々可
変長符号化され、バッファを経て正式な符号データとし
て出力される。
After the selection of the quantization threshold value, in step S7, the coding processing unit 32 is instructed to select the variable length coding unit 32a, and in steps S8 and S9, the second DCT transformation, quantization and coding are performed. . At this time, the quantized coefficients arranged two-dimensionally are converted into one-dimensional by zigzag scan,
The DC component and the AC component are each subjected to variable-length encoding by the variable-length encoding unit 32b, and output as formal code data via a buffer.

【0031】[0031]

【実施例】図3は本発明の一実施例を示した実施例構成
図である。図3において、12は2次元DCT変換部、
31は量子化処理部、32は符号化処理部、33は符号
バッファ、34は特徴抽出部、35は1回目の符号化処
理を行う第1制御部100と2回目の符号化処理を行う
第2制御部200としての機能を備えた制御部である。
FIG. 3 is a block diagram showing an embodiment of the present invention. In FIG. 3, reference numeral 12 denotes a two-dimensional DCT transform unit,
31 is a quantization processing unit, 32 is an encoding processing unit, 33 is a code buffer, 34 is a feature extraction unit, 35 is a first control unit 100 that performs the first encoding process, and 35 is a second control unit that performs the second encoding process. 2 is a control unit having a function as the control unit 200.

【0032】ここで量子化処理部31は、DCT係数を
粗く量子化する第1量子化マトリクスVTH1を格納し
た第1量子化閾値格納部42、DCT係数を細かく量子
化する第二量子化マトリクスVTH2を格納した第2量
子化閾値格納部43、2種類の量子化閾値を選択する選
択部41、及び選択した量子化閾値を用いてDCT係数
を線形量子化する線形量子化部40で構成される。
Here, the quantization processing section 31 includes a first quantization threshold value storage section 42 storing a first quantization matrix VTH1 for roughly quantizing DCT coefficients, and a second quantization matrix VTH2 for finely quantizing DCT coefficients. Is stored in a second quantization threshold value storage unit 43 storing the data, a selection unit 41 for selecting two types of quantization threshold values, and a linear quantization unit 40 for linearly quantizing the DCT coefficients using the selected quantization threshold value. .

【0033】また、符号化処理部32は、可変長符号を
格納した可変長符号表53、画像の特徴検出に使用され
る固定長符号を格納した特徴検出用符号表52、及び制
御部35からの指示で2組の符号表52,53を選択す
る選択部51で構成される。更に、画像の特徴検出部3
4は、0以外の値をもつ有効係数を示す固定長符号L2
を検出する数非零ビット検出部61、画像全体の有効係
数の数RB を計数する全体用レジスタ62、予め定めた
位置までの低次の有効係数の数RA を計数する低次用レ
ジスタ63、及び両レジスタ63,64に格納された数
値を用いた比RA /RB の演算と予め定めた閾値との比
較を行う比較演算部64で構成する。
The encoding unit 32 includes a variable-length code table 53 storing variable-length codes, a characteristic detection code table 52 storing fixed-length codes used for image characteristic detection, and a control unit 35. The selection unit 51 selects two sets of code tables 52 and 53 according to the instruction. Further, the image feature detection unit 3
4 is a fixed-length code L2 indicating an effective coefficient having a value other than 0
Number nonzero bit detector 61 which detects the entire register 62 for counting the number R B of the effective coefficients of the entire image, the low-order register for counting the number R A low-order effective coefficients up to a predetermined position 63, and constitutes at the comparison operation unit 64 for comparing the calculation with a predetermined threshold value of the ratio R a / R B using the value stored in both registers 63 and 64.

【0034】次に図3の動作を図4のフローチャートを
用いて説明する。制御部35は、画像の性質を判断する
ために、第1回目の符号化処理を開始する。まず符号化
条件として、ステップS1において初期量子化閾値VT
Hの設定を行う。例えば、選択部41で第1量子化閾値
格納部42の粗い量子化に使用される第1量子化マトリ
クスVTH1を選択して線形量子化部40に設定する。
Next, the operation of FIG. 3 will be described with reference to the flowchart of FIG. The control unit 35 starts the first encoding process in order to determine the properties of the image. First, as an encoding condition, in step S1, an initial quantization threshold VT is set.
H is set. For example, the selection unit 41 selects the first quantization matrix VTH1 used for coarse quantization in the first quantization threshold value storage unit 42 and sets it in the linear quantization unit 40.

【0035】またステップS2で固定長符号化を行うた
めに選択部51により特徴検出用符号表(固定長符号化
表)52を選択する。さらにステップS3で符号バッフ
ァ33を初期化し、値を全て0とする。これらステップ
S1〜S3の動作は、順不同で良い。次にステップS4
に進み、第1回目の符号化を行う。即ち、画像を8×8
画素のブロックに分割して各ブロック毎に2次元DCT
変換部12でDCT変換を行い、次に線形量子化部40
で初期設定されている第1量子化マトリクスを使用して
DCT係数を量子化し、更に可変長符号化部50で特徴
検出用符号表52を用いて固定長符号化する。
In step S2, the selection unit 51 selects a feature detection code table (fixed length coding table) 52 in order to perform fixed length coding. Further, in step S3, the code buffer 33 is initialized and all the values are set to 0. The operations in steps S1 to S3 may be performed in any order. Next, step S4
To perform the first encoding. That is, the image is 8 × 8
Divided into pixel blocks and two-dimensional DCT for each block
The DCT is performed by the transform unit 12, and then the linear quantization unit 40
Then, the DCT coefficient is quantized using the first quantization matrix initially set as described above, and the variable-length coding unit 50 performs fixed-length coding using the feature detection code table 52.

【0036】このとき、図15に示したように2次元的
に配列された量子化係数は、図16に示すジグザグスキ
ャンにより、1次元に変換される。可変長符号化部50
は、1次元に変換された量子化係数のうち、値が0でな
い有効係数の値(インデックス)と、有効係数までの値
が0である無効係数(非常有効係数)のランの長さをも
とに特徴検出用符号表52を参照して固定長符号を作成
する。特徴検出用符号表52は例えば図5に示す内容を
もつ。
At this time, the quantized coefficients arranged two-dimensionally as shown in FIG. 15 are converted to one-dimensional by zigzag scan shown in FIG. Variable length coding unit 50
Indicates the length of a run of an effective coefficient (index) whose value is not 0 and a run length of an invalid coefficient (emergency coefficient) whose value up to the effective coefficient is 0 among the one-dimensionally converted quantized coefficients. Then, a fixed-length code is created with reference to the feature detection code table 52. The feature detection code table 52 has, for example, the contents shown in FIG.

【0037】1回目の符号化で固定長符号化部として機
能する可変長符号化部50は、値が0でない有効係数が
得られると、値が0である無効係数の数を示すランの値
分だけ、一定の符号長L、例えばL=1ビットの値が0
となる第1固定長符号L1を出力した後、有効係数を表
す一定の符号長L、同じくL=1ビットの値が1となる
第2固定長符号L2を1つ出力し、符号バッファ33に
格納する。
In the first encoding, the variable-length encoding unit 50 functioning as a fixed-length encoding unit, when an effective coefficient whose value is not 0 is obtained, executes a run value indicating the number of invalid coefficients whose value is 0. A constant code length L, for example, L = 1 bit value is 0
After the first fixed-length code L1 is output, one fixed-length code L representing the effective coefficient, and one second fixed-length code L2 in which the value of L = 1 bit is 1, are output to the code buffer 33. Store.

【0038】ここで先頭ブロックの量子化係数として図
15のものが得られたとすると、符号バッファ33に
は、ジグザクスキャンにより1次元に配列された後に固
定長符号化された図6に示す 「1111010・・・・000」 となる64ビット長のデータが格納される。
Assuming that the quantization coefficient of the first block shown in FIG. 15 is obtained, the code buffer 33 is arranged in a one-dimensional manner by zigzag scanning and then fixed-length coded as shown in FIG. .. 000 "is stored.

【0039】図7は図6の先頭ブロックを取り出して示
したもので、8ビットを1バイトとすると、1ブロック
は8×8=64画素で構成されることから、1ブロック
につき8バイトの符号長L=1の有効係数を示す第1固
定長符号L1(=0)又は無効係数を示す第2固定長符
号L2(=1)が並んでいる。ステップS3の符号化処
理を全ブロックの全係数について行ったことをステップ
S4で判別するとステップS5に進む。
FIG. 7 shows the head block of FIG. 6 taken out. If 8 bits are 1 byte, one block is composed of 8 × 8 = 64 pixels. A first fixed length code L1 (= 0) indicating an effective coefficient having a length L = 1 or a second fixed length code L2 (= 1) indicating an invalid coefficient is arranged. If it is determined in step S4 that the encoding process in step S3 has been performed for all coefficients in all blocks, the process proceeds to step S5.

【0040】ステップS5では特徴検出部34で符号バ
ッファ33内に格納された符号データの先頭の1ビット
目から内容を読み出し、ステップS6〜S10の処理に
より、符号化バッファに格納された各ブロックの所定位
置までの有効係数の数の総数RA と画像全体の有効係数
の数RB の検出を行う。この実施例にあっては、図8の
ジグザグ走査順序に示すように、先頭から2番目(2
次)の係数から10番目(10次)を低次の係数として
して有効係数の数RA を検出する場合を例にとる。
In step S5, the contents are read from the first bit of the code data stored in the code buffer 33 by the feature detection unit 34, and the processing of steps S6 to S10 is executed to read the contents of each block stored in the coding buffer. performs several detection of R B number of the total number R a and the entire image of the effective coefficients of the effective coefficient of up to a predetermined position. In this embodiment, as shown in the zigzag scanning order of FIG.
An example will be described in which the tenth (10th) coefficient is determined as a low-order coefficient from the next coefficient and the number R A of effective coefficients is detected.

【0041】まずステップS5で参照した符号バッファ
33の先頭1ビットが有効係数か否かステップS6で判
定する。先頭の1ビットはDC成分であり、通常、0以
外の値をもつ有効係数となるのでステップS7に進み、
全体用レジスタ62を1つインクリメントする。続いて
ステップS8で図8に示した2〜10番目の提示の係数
か否か判別する。ここで先頭のDC成分は低次に含めて
いないため、ステップS10に進んで符号バッファ33
の参照終了を判別した後、ステップS11で次の1ビッ
ト下位を参照する。
First, it is determined in step S6 whether the first bit of the code buffer 33 referred to in step S5 is a valid coefficient. The first one bit is a DC component, which is usually an effective coefficient having a value other than 0.
The general register 62 is incremented by one. Subsequently, in step S8, it is determined whether or not the coefficient is the second to tenth presentation coefficients shown in FIG. Since the first DC component is not included in the low order, the process proceeds to step S10, where the code buffer 33
Is determined, the next lower bit is referenced in step S11.

【0042】図6、図7の先頭ブロックの場合、2番目
もビット1の有効係数であることから、ステップS6、
S7を介してステップS8に進み、低次係数であること
からステップS9に進んで低次用レジスタ63を1つイ
ンクリメントする。以上の処理を符号バッファ33の全
ブロックについて行う。この結果、低次用レジスタ63
はブロックのデータの2ビット目から10ビット目まで
のデータの中で有効係数を示す符号1の出現する回数r
a を係数し、同時に全体用レジスタ62はブロックの全
データ内での有効係数を示す符号1の出現する回数rb
を計測し、これを全てのブロックについて行うことで画
像全体について累積した値RA ,RB を検出する。
In the case of the first block shown in FIGS. 6 and 7, since the second is also the effective coefficient of bit 1, step S6,
The process proceeds to step S8 via S7, and since it is a low-order coefficient, proceeds to step S9 to increment the low-order register 63 by one. The above processing is performed for all blocks in the code buffer 33. As a result, the low-order register 63
Is the number of occurrences r of the code 1 indicating the effective coefficient in the data from the second bit to the tenth bit of the block data.
a, and at the same time, the overall register 62 stores the number of occurrences r b of the code 1 indicating the effective coefficient in all data of the block.
The measured value R A obtained by accumulating for the entire image by performing this for all blocks to detect the R B.

【0043】ステップS10で符号バッファ33内の全
てのデータに対する処理の終了を判別するとステップS
12に進み、比較演算部64においてRA とRB の比、 H=RA /RB を算出し、予め設定してある閾値Tと比較して画像の特
徴を判断する。
When it is determined in step S10 that the processing for all data in the code buffer 33 has been completed, step S10 is performed.
Proceeding to 12, the comparison operation section 64 calculates the ratio of R A to R B , H = R A / R B, and compares it with a preset threshold value T to determine the image characteristics.

【0044】ステップS12による画像の特徴検出結果
により、ステップS13又はS14に進んで2つ以上用
意してある量子化閾値の何れかを選択し、量子化処理部
31に選択した量子化閾値に対応する量子化マトリクス
の設定を指示する。具体的に説明すると、符号バッファ
33の容量は、対象とする画像サイズ640画素×40
0画素の場合、即ち、4000ブロックの場合、320
00バイトである。
Based on the image feature detection result in step S12, the process proceeds to step S13 or S14, where one of two or more prepared quantization thresholds is selected, and the quantization processing unit 31 corresponds to the selected quantization threshold. To set the quantization matrix to be performed. More specifically, the capacity of the code buffer 33 is 640 pixels × 40 pixels of the target image size.
In the case of 0 pixels, that is, in the case of 4000 blocks, 320
00 bytes.

【0045】比較演算部64は、全体用レジスタ62の
値RBと低次用レジスタ63の値RAを読みだし、両者の
比H=RA /RB を算出し、例えば全有効係数の半分が
低次にあるか否か判定する閾値T=1/2と比較する。
この比Hと閾値Tの比較判断の内容は図9に示すように
なる。即ち、比RA /RB が閾値Tより小さい場合に
は、有効係数はブロック全体に分散しており、階調変化
の激しい風景画等であり、この場合には、視覚の近似誤
差は識別しにくいので、量子化は粗くてもよい。
The comparison operation unit 64 reads the value R A values R B and the lower order register 63 for the entire register 62, calculates both of the ratio H = R A / R B, for example, of all effective coefficients A comparison is made with a threshold value T = 1/2 for determining whether or not half is in the low order.
The contents of the comparison judgment between the ratio H and the threshold T are as shown in FIG. That is, when the ratio R A / R B is smaller than the threshold T, the effective coefficients are dispersed throughout the block, and are a landscape image or the like in which the gradation changes sharply. Since it is difficult to perform quantization, the quantization may be coarse.

【0046】これに対し比RA /RB が閾値Tより大き
い場合は、有効係数はブロックの低次に集中しており、
階調変化の緩やかな人物画等であり、視覚の近似誤差は
識別しやすいので量子化を細く行う必要がある。従っ
て、H<Tの場合には、階調変化の激しい画像であるこ
とからステップS13に進んで粗い量子化のため第1量
子化閾値格納部42の第1量子化マトリクスVTH1を
選択する。
On the other hand, when the ratio R A / R B is larger than the threshold T, the effective coefficients are concentrated in the lower order of the block, and
It is a portrait with a gradual change in gradation, and a visual approximation error is easy to identify. Therefore, when H <T, the image has a sharp gradation change, and the process proceeds to step S13 to select the first quantization matrix VTH1 of the first quantization threshold value storage unit 42 for coarse quantization.

【0047】またH≧Tの場合には、変化の緩やかな画
像であることからステップS14に進んで細い量子化の
ため第2量子化閾値格納部43の第2量子化マトリクス
VTH2を選択する。このようにして量子化マトリクス
の選択が済むと、制御部35はステップS15に進んで
符号化処理部32に対し可変長符号表53の選択を指示
し、ステップS16で2回数目のDCT変換、ステップ
S13又はS14で選択された量子化マトリスクを使用
した量子化、及び符号化をステップS17で全ブロック
の処理の終了が判別されるまで行う。
If H.gtoreq.T, since the image is a slowly changing image, the flow advances to step S14 to select the second quantization matrix VTH2 in the second quantization threshold value storage unit 43 for fine quantization. When the selection of the quantization matrix is completed in this way, the control unit 35 proceeds to step S15, instructs the encoding processing unit 32 to select the variable length code table 53, and in step S16, performs the second DCT transform. The quantization and encoding using the quantization matrix selected in step S13 or S14 are performed until it is determined in step S17 that the processing of all blocks has been completed.

【0048】この2回目の量子化におけるDCT変換及
び量子化はステップS3の1回目と同じであるが、量子
化された量子化係数の符号化は可変長符号化を行う。即
ち、2次元的に配列された量子化係数は、図16に示し
たジグザグスキャンにより1次元に変換され、可変長符
号化部50はまず先頭のDC成分と前ブロックのDC成
分との差分を可変長符号表53の参照により可変長符号
化する。
The DCT transformation and quantization in the second quantization are the same as those in the first quantization in step S3, but the quantization of the quantized quantized coefficients is performed by variable length coding. That is, the two-dimensionally arranged quantized coefficients are converted to one-dimensional by the zigzag scan shown in FIG. 16, and the variable length coding unit 50 first calculates the difference between the leading DC component and the DC component of the previous block. Variable length coding is performed by referring to the variable length code table 53.

【0049】続いてAC成分の値が0でない有効係数が
得られた時に、有効係数の値(インデックス)と、有効
係数までの値が0である無効係数のランの長さに応じ
て、選択部51で選択されている可変長符号表53内の
対応する位置を参照し、参照位置に記録されている異な
る符号長のデータを符号バッファ33に出力する。この
DC成分及びAC成分の符号化に使用する可変長符号表
53は、画像ごとの統計量をもとに作成するハフマン・
テーブルで構成されている。符号バッファ33に出力さ
れた可変長符号データは、最終的に端子17から出力さ
れる。
Subsequently, when an effective coefficient whose AC component value is not 0 is obtained, selection is made in accordance with the value (index) of the effective coefficient and the length of the run of the invalid coefficient whose value up to the effective coefficient is 0. The unit 51 refers to a corresponding position in the variable length code table 53 selected by the unit 51, and outputs data having a different code length recorded at the reference position to the code buffer 33. The variable-length code table 53 used for coding the DC component and the AC component is a Huffman code table created based on statistics for each image.
Consists of a table. The variable-length code data output to the code buffer 33 is finally output from the terminal 17.

【0050】尚、上記の実施例では、特徴検出用符号表
52を用いて量子化係数が有効係数か無効係数かを示す
識別符号の固定長符号化を行っていたが、特徴検出用符
号表52を使用せずに有効係数および無効係数に対応す
る固定長のデータを出力する専用の固定長符号化回路を
回路を付加するようにしてもよい。また、上記実施例で
は、有効係数を示す固定長符号として、1ビット長の値
1の符号を用いる例を示したが、一定長であれば任意の
符号長を用いることができることは明らかである。
In the above embodiment, the fixed-length encoding of the identification code indicating whether the quantization coefficient is an effective coefficient or an invalid coefficient is performed using the feature detection code table 52. A dedicated fixed-length encoding circuit for outputting fixed-length data corresponding to the valid coefficient and the invalid coefficient without using the circuit 52 may be added to the circuit. Further, in the above-described embodiment, an example in which a code having a 1-bit value of 1 is used as the fixed-length code indicating the effective coefficient, but it is apparent that any code length can be used as long as the code has a fixed length. .

【0051】更に上記の実施例では、初期量子化閾値と
して、可変長符号化時に選択するために予め設定してあ
る量子化閾値の一つを選択する例を示したが、本発明は
この例に限定されず、特徴検出専用の量子化閾値を使用
する方法やそれぞれの量子化閾値の何れかに所定の演
算、例えば定数の加算、減算、除算或いは乗算を行った
結果を用いることでも実現できる。
Further, in the above-described embodiment, an example has been described in which one of the preset quantization thresholds is selected as the initial quantization threshold for selection at the time of variable-length encoding. The present invention is not limited to this, and can also be realized by using a method using a quantization threshold dedicated to feature detection, or using a result of performing a predetermined operation, for example, addition, subtraction, division or multiplication of a constant, on any of the quantization thresholds. .

【0052】[0052]

【発明の効果】以上説明したように本発明によれば、第
1回目の符号化において量子化後の各ブロックの所定位
置までの係数が非零の有効係数となる総数と画像全体の
有効係数の数を検出し、この検出結果と予め設定してあ
る閾値との比較により画像の性質を判断して適合する量
子化閾値を選択して可変長符号化することで、異なる特
徴を持つ画像に対しても、少ない符号量で、常に高画質
の画像復元が可能な符号化が実現できる。
As described above, according to the present invention, in the first encoding, the total number of coefficients up to a predetermined position of each block after quantization is a non-zero effective coefficient and the effective coefficient of the entire image. By detecting the number of, and comparing the detection result with a preset threshold to judge the nature of the image and selecting an appropriate quantization threshold and performing variable-length encoding, an image having different characteristics can be obtained. On the other hand, it is possible to realize encoding that can always restore a high-quality image with a small code amount.

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

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

【図2】本発明の作用を示したフローチャートFIG. 2 is a flowchart showing the operation of the present invention.

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

【図4】図3の実施例の動作を示したフローチャートFIG. 4 is a flowchart showing the operation of the embodiment of FIG. 3;

【図5】図3で用いる特徴検出用符号表の説明図FIG. 5 is an explanatory diagram of a feature detection code table used in FIG. 3;

【図6】符号バッファ内の特徴検出用符号列の説明図FIG. 6 is an explanatory diagram of a feature detection code string in a code buffer.

【図7】図6の先頭ブロックの符号列を取出して示した
説明図
FIG. 7 is an explanatory diagram extracting and showing a code string of a first block in FIG. 6;

【図8】本発明の低次領域を示したジクザグスキャンの
走査順序説明図
FIG. 8 is an explanatory diagram of a scanning order of zigzag scanning showing a low-order area according to the present invention.

【図9】本発明の特徴検出で得られた比RA /RB の大
小に対する判断内容の説明図
FIG. 9 is an explanatory diagram of the judgment contents for the magnitude of the ratio R A / R B obtained by the feature detection of the present invention.

【図10】従来のADCT方式の符号化回路のブロック
FIG. 10 is a block diagram of a conventional ADCT coding circuit;

【図11】図10の2次元DCT変換のブロック図FIG. 11 is a block diagram of the two-dimensional DCT transform of FIG. 10;

【図12】8×8画素にブロック分割された原画像信号
の説明図
FIG. 12 is an explanatory diagram of an original image signal divided into blocks of 8 × 8 pixels.

【図13】図12の原画像から変換したDCT係数を示
した説明図
13 is an explanatory diagram showing DCT coefficients converted from the original image of FIG.

【図14】DCT係数の量子化に使用する閾値の説明図FIG. 14 is an explanatory diagram of a threshold used for quantization of a DCT coefficient;

【図15】図13のDCT係数を図14の閾値で量子化
して得た量子化係数の説明図
15 is an explanatory diagram of a quantized coefficient obtained by quantizing the DCT coefficient of FIG. 13 with the threshold of FIG. 14;

【図16】量子化係数の1次元に変換する走査順序の説
明図
FIG. 16 is an explanatory diagram of a scanning order for converting a quantization coefficient into one dimension.

【図17】従来の線形量子化回路のブロック図FIG. 17 is a block diagram of a conventional linear quantization circuit.

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

11.17:端子 12:2次元DCT変換部 31:量子化処理部 32:符号化処理部 32a:固定長符号化部 32b:可変長符号化部 33:符号バッファ 34:特徴検出部 35:制御部 40:線形量子化部 41,51:選択部 42:第1量子化閾値格納部 43:第2量子化閾値格納部 50:可変長符号化部 52:特徴検出用符号表(固定長符号表) 53:可変長符号表 61:非零ビット検出部 62:全体用レジスタ 63:低次用レジスタ 64:比較演算部 100:第1制御部 200:第2制御部 11.17: Terminal 12: Two-dimensional DCT transformer 31: Quantization processor 32: Encoding processor 32a: Fixed-length encoder 32b: Variable-length encoder 33: Code buffer 34: Feature detector 35: Control Unit 40: linear quantization unit 41, 51: selection unit 42: first quantization threshold storage unit 43: second quantization threshold storage unit 50: variable length coding unit 52: code table for feature detection (fixed length code table) 53: Variable length code table 61: Non-zero bit detection unit 62: Register for the whole 63: Register for low order 64: Comparison operation unit 100: First control unit 200: Second control unit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−181229(JP,A) 特開 平3−16489(JP,A) 特開 平4−286466(JP,A) 特開 平4−247770(JP,A) 特開 平5−63985(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04N 7/24 - 7/68 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-3-181229 (JP, A) JP-A-3-16489 (JP, A) JP-A-4-286466 (JP, A) JP-A-4-184 247770 (JP, A) JP-A-5-63985 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) H04N 7/ 24-7/68

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】原画像をそれぞれが複数の画素からなる複
数のブロックに分割して得られる各ブロック毎に、該ブ
ロック内の前記複数の画素の階調値を2次元離散コサイ
ン変換し、該2次元離散コサイン変換により得られた変
換係数を所定の量子化閾値を用いて量子化し、更に該量
子化で得られた量子化係数を符号化する画像データ符号
化方法に於いて、 処理対象となる原画像につき1回目の2次元離散コサイ
ン変換、量子化および符号化を行う第1過程と、 該第1過程で量子化された各ブロックの所定位置までの
零以外の値をもつ有効係数の総数 A と画像全体の有
効係数の数 B との比R A /R B を検出する第2過
程と、 前記第2過程の検出結果と予め定めた閾値と比較し、該
比較結果に基づいて量子化閾値を選択する第3過程と、 該第3過程で選択された量子化閾値を使用して2回目の
原画像の2次元離散コサイン変換、量子化および符号化
を行う第4過程と、 を備えたことを特徴とする画像データ符号化方法。
1. For each block obtained by dividing an original image into a plurality of blocks each consisting of a plurality of pixels, tone values of the plurality of pixels in the block are subjected to two-dimensional discrete cosine transform. In an image data encoding method for quantizing a transform coefficient obtained by the two-dimensional discrete cosine transform using a predetermined quantization threshold, and further coding the quantized coefficient obtained by the quantization, A first step of performing a first two-dimensional discrete cosine transform, quantization, and encoding on the original image, and an effective coefficient having a nonzero value up to a predetermined position of each block quantized in the first step. The total number R A The ratio R A / R B of the number R B of the entire image of the effective coefficient A third step of comparing the detection result of the second step with a predetermined threshold, and selecting a quantization threshold based on the comparison result; and a quantum step selected in the third step. A fourth step of performing a second two-dimensional discrete cosine transform, quantization, and encoding of the original image using the quantization threshold value.
【請求項2】請求項1記載の画像データ符号化方法に於
いて、 前記第1過程における1回の量子化係数の符号化は、量
子化係数が有効係数か否かに分けて異なる値の固定長符
号を出力する固定長符号化を行い、前記第2過程にあっ
ては、第1過程で得られた固定長符号を用いて各ブロッ
クの所定位置までの有効係数の総数と画像全体の有効係
数の数を検出することを特徴とする画像データ符号化方
法。
2. The image data encoding method according to claim 1, wherein the one-time encoding of the quantized coefficient in the first step is performed with different values depending on whether the quantized coefficient is an effective coefficient or not. The fixed-length coding for outputting the fixed-length code is performed. In the second step, the total number of effective coefficients up to a predetermined position of each block and the entire image are calculated using the fixed-length code obtained in the first step. An image data encoding method characterized by detecting the number of effective coefficients.
【請求項3】請求項2記載の画像データ符号化方法に於
いて、 前記第1過程における1回目の量子化係数の符号化は、
非有効係数を示す一定長Lの第1固定長符号L1を、該
有効係数が得られるまでの非有効係数の数分出力すると
共に、有効係数を示す同じ一定長Lの第2固定長符号L
2を1つ出力し、 前記第2過程にあっては、第1過程で得られた第2固定
長符号L2から各ブロックの所定位置までの有効係数の
総数と画像全体の有効係数の数を検出することを特徴と
する画像データ符号化方法。
3. The image data encoding method according to claim 2, wherein the first encoding of the quantized coefficient in the first step includes:
The first fixed length code L1 having a constant length L indicating the ineffective coefficient is output for the number of ineffective coefficients until the effective coefficient is obtained, and the second fixed length code L having the same constant length L indicating the effective coefficient is output.
2 in the second step. In the second step, the total number of effective coefficients from the second fixed-length code L2 obtained in the first step to a predetermined position of each block and the number of effective coefficients of the entire image are calculated. An image data encoding method characterized by detecting.
【請求項4】請求項記載の画像データ符号化方法に於
いて、 前記第3過程における量子化閾値の選択は、前記第2過
程で得られた比RA/RB が閾値未満の場合は、階調変
化の激しい画像に適用される第1量子化閾値を選択し、
前記比RA /RB が閾値以上の場合は、階調変化の緩
やかな画像に適用される第2量子化閾値を選択すること
を特徴とする画像データ符号化方法。
4. In the image data coding method according to claim 1, wherein the selected quantization threshold in the third process, before SL is obtained a ratio R A / R B in the second step is less than the threshold value In this case, select a first quantization threshold applied to an image having a sharp gradation change,
The ratio is when R A / R B is not less than the threshold value, the image data encoding method characterized by selecting a second quantization threshold applied to loose image gradation change.
【請求項5】原画像をそれぞれが複数の画像からなる複
数のブロックに分割して得られる各ブロック毎に、該ブ
ロック内の前記複数の画素の階調値を2次元離散コサイ
ン変換する2次元DCT変換部12と、該2次元DCT
変換部12より得られた変換係数を所定の量子化閾値を
用いて量子化する量子化処理部31と、該量子化処理部
31で得られた量子化係数を符号化する符号化部32と
を備えた画像データ符号化装置に於いて、 処理対象となる原画像につき前記2次元DCT変換部1
2,量子化処理部31および符号化部32を使用して1
回目の符号化を行う第1制御部100と、 該第1制御部100による1回目の量子化で得られた各
ブロックの所定位置までの零以外の値をもつ有効係数の
総数 A と画像全体の有効係数の数 B との比R A
/R B を検出する特徴検出部34と、 前記特徴検出部34の検出結果を予め定めた閾値と比較
し、該比較結果に基づいて選択された量子化閾値を使用
して前記2次元DCT変換部12,量子化処理部31お
よび符号化部32により2回目の符号化を行う第2制御
部200と、 を備えたことを特徴とする画像データ符号化装置。
5. A two-dimensional discrete cosine transform for each block obtained by dividing an original image into a plurality of blocks each consisting of a plurality of images, the tone values of the plurality of pixels in the block being two-dimensional discrete cosine transformed. A DCT transformer 12 and the two-dimensional DCT
A quantization unit 31 for quantizing the transform coefficient obtained from the transform unit 12 using a predetermined quantization threshold, and an encoding unit 32 for encoding the quantized coefficient obtained by the quantization unit 31. In the image data encoding apparatus provided with the above, the two-dimensional DCT transform unit 1
2, 1 using the quantization unit 31 and the encoding unit 32
A first controller 100 for performing the first encoding, and a total number R A of effective coefficients having a non-zero value up to a predetermined position of each block obtained in the first quantization by the first controller 100 The ratio R A between the number R B of the entire image of the effective coefficient
/ R B And a feature detection unit 34 that detects the detection result of the two-dimensional DCT transform unit 12 using a quantization threshold value selected based on the comparison result. An image data encoding device, comprising: a second control unit 200 that performs second encoding by a quantization processing unit 31 and an encoding unit 32.
【請求項6】請求項記載の画像データ符号化装置に於
いて、 前記符号化部32は、有効係数が得られた時に非有効係
数を示す一定長Lの第1固定長符号L1を、該有効係数
が得られるまでの非有効係数の数分出力すると共に、該
有効係数を示す同じ一定長Lの第2固定長符号L2を1
つ出力する固定長符号化部32aと、DC成分及びAC
成分の有効係数が得られた時に各成分の有効係数の値と
有効係数までの非有効係数の数との組を可変長符号化す
る可変長符号化部32bとを備え、 前記第1制御部100による1回目の符号化は前記固定
長符号化部32aを使用し、前記第2制御部200によ
る2回目の符号化は前記可変長符号化部32bを使用す
ることを特徴とする画像データ符号化装置
6. An image data encoding apparatus according to claim 5 , wherein said encoding section 32 generates a first fixed length code L1 having a constant length L indicating an ineffective coefficient when an effective coefficient is obtained. The number of non-effective coefficients until the effective coefficient is obtained is output and the second fixed-length code L2 of the same constant length L indicating the effective coefficient is set to 1
And a fixed-length encoding unit 32a that outputs
A variable-length encoding unit 32b that performs variable-length encoding of a set of the value of the effective coefficient of each component and the number of ineffective coefficients up to the effective coefficient when the effective coefficient of the component is obtained; The first encoding by 100 uses the fixed-length encoding unit 32a, and the second encoding by the second control unit 200 uses the variable-length encoding unit 32b. Device
【請求項7】請求項記載の画像データ符号化装置に於
いて、 前記第2制御部200における量子化閾値の選択は、前
記特徴検出部34で検出された比RA /RB が閾値未
満の場合は、階調変換の激しい画像に適用される第1量
子化閾値を選択し、前記比RA /RB が閾値以上の場
合は、階調変化の緩やかな画像に適用される第2量子化
閾値を選択することを特徴とする画像データ符号化装
置。
7. The image data encoding device according to claim 5 , wherein the selection of the quantization threshold value in said second control section 200 is performed by setting the ratio R A / R B detected by said feature detection section 34 to a threshold value. when it is less than, and selects the first quantization threshold applied to intense image of gradation conversion in the case of more than the ratio R a / R B is the threshold value, the applied gentle image gradation change 2. An image data encoding device, wherein a quantization threshold is selected.
JP21776491A 1991-08-29 1991-08-29 Image data encoding method and apparatus Expired - Fee Related JP3263100B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21776491A JP3263100B2 (en) 1991-08-29 1991-08-29 Image data encoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21776491A JP3263100B2 (en) 1991-08-29 1991-08-29 Image data encoding method and apparatus

Publications (2)

Publication Number Publication Date
JPH0563986A JPH0563986A (en) 1993-03-12
JP3263100B2 true JP3263100B2 (en) 2002-03-04

Family

ID=16709371

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21776491A Expired - Fee Related JP3263100B2 (en) 1991-08-29 1991-08-29 Image data encoding method and apparatus

Country Status (1)

Country Link
JP (1) JP3263100B2 (en)

Also Published As

Publication number Publication date
JPH0563986A (en) 1993-03-12

Similar Documents

Publication Publication Date Title
US4922273A (en) Compression method of halftone image data
US6650784B2 (en) Lossless intraframe encoding using Golomb-Rice
US7782960B2 (en) DCT compression using Golomb-Rice coding
US7483581B2 (en) Apparatus and method for encoding digital image data in a lossless manner
US6449395B1 (en) Image encoding apparatus, image encoding method, and recording medium in which image encoding program is recorded
US6714685B2 (en) Image processing system for compressing image data including binary image data and continuous tone image data by a sub-band transform method with a high-compression rate
AU2002316546A1 (en) Lossless intraframe encoding using golomb-rice
JPH07123269A (en) Corder for picture signal
US20020191695A1 (en) Interframe encoding method and apparatus
EP0833518B1 (en) Compression of image data with associated cost data
US20090304073A1 (en) Systems and Methods for the Bandwidth Efficient Processing of Data
JP3263100B2 (en) Image data encoding method and apparatus
JPH0487460A (en) Picture processor
JP3017334B2 (en) Image data encoding method and apparatus
JP2841197B2 (en) Method of compressing gradation image data
JPH05252400A (en) Method and device for compressing and decompressing data
JPH03192878A (en) Image data compression device
JP2950559B2 (en) Image processing method and apparatus
JP3001758B2 (en) Huffman encoding device and Huffman encoding method
JP2856268B2 (en) Image data restoration device
JPH06152971A (en) Image data encoding method and apparatus
JPH03238564A (en) Method and device for encoding and restoring picture data
JPH06141186A (en) Image data encoding method and apparatus
JPH03238563A (en) Method and device for encoding and restoring picture data
JPH04344772A (en) Picture data compression method, compressor and picture data decoding method and decoder

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011120

LAPS Cancellation because of no payment of annual fees