JPH08107502A - Quantizing table selecting method - Google Patents
Quantizing table selecting methodInfo
- Publication number
- JPH08107502A JPH08107502A JP24130694A JP24130694A JPH08107502A JP H08107502 A JPH08107502 A JP H08107502A JP 24130694 A JP24130694 A JP 24130694A JP 24130694 A JP24130694 A JP 24130694A JP H08107502 A JPH08107502 A JP H08107502A
- Authority
- JP
- Japan
- Prior art keywords
- image
- quantization
- coefficient
- quantization table
- pixel
- 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
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Image Processing (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像データを符号化す
る画像符号化方式、詳細には、DCT変換(離散コサイ
ン変換)を用いた画像符号化方式において、量子化を行
う際に用いる量子化テーブルを選定する量子化テーブル
選定方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image coding system for coding image data, and more specifically, to a quantum used for quantization in an image coding system using DCT transform (discrete cosine transform). The present invention relates to a quantization table selection method for selecting a quantization table.
【0002】[0002]
【従来の技術】従来より種々の画像符号化方式が提案さ
れているが、カラー静止画像を符号化するに適した、高
品質な画像を効率よく符号化できる方式の1つとして離
散コサイン変換(DCT)方式が提案されている。離散
コサイン変換、およびその離散コサイン変換を用いた符
号化方式については、既に広く知られているため(例え
ば、「ディジタル信号処理ハンドブック」電子情報通信
学会編 オーム社、「インターフェース」 ’91 1
2月号 参照)、ここでは、後述する本発明に関する部
分の概略説明にとどめる。2. Description of the Related Art Conventionally, various image coding systems have been proposed, but as one of the systems capable of efficiently coding a high quality image suitable for coding a color still image, a discrete cosine transform ( The DCT) method has been proposed. The discrete cosine transform and the coding method using the discrete cosine transform are already widely known (for example, "Digital Signal Processing Handbook" edited by Institute of Electronics, Information and Communication Engineers, Ohmsha, "Interface"'911.
(See the February issue), but here, only a brief description of a portion related to the present invention described later.
【0003】図3は、DCT方式による符号化の概要説
明図である。各画素に各画素値が対応する2次元画像中
の8×8画素の画素ブロックが入力され、離散コサイン
変換(DCT変換)が施され、8×8のDCT係数マト
リックスが生成される。このDCT係数マトリックスを
構成する左上の要素(係数)は、入力された8×8画素
ブロックの低空間周波数成分のレベルを表わし、右側な
いし下側に進むほど、入力された8×8画素ブロック
の、それぞれ横方向ないし縦方向の高空間周辺数成分の
レベルを表わしている。FIG. 3 is a schematic explanatory diagram of encoding by the DCT method. A pixel block of 8 × 8 pixels in a two-dimensional image in which each pixel value corresponds to each pixel is input, discrete cosine transform (DCT transform) is performed, and an 8 × 8 DCT coefficient matrix is generated. The upper left element (coefficient) forming this DCT coefficient matrix represents the level of the low spatial frequency component of the input 8 × 8 pixel block, and the level of the input 8 × 8 pixel block increases toward the right side or the lower side. , Respectively, representing the levels of several components around the high space in the horizontal or vertical direction.
【0004】次に、DCT係数マトリックスの各要素
が、あらかじめ用意された量子化テーブルの、対応する
要素で割り算されて、その割り算の結果の整数部分のみ
を配列した量子化DCT係数マトリックスが生成され
る。量子化テーブルは、規格により推奨された量子化テ
ーブルもあるが、基本的には、入力される画像の性質に
応じてユーザによりあらかじめ定義されるものである。Next, each element of the DCT coefficient matrix is divided by the corresponding element of the prepared quantization table to generate a quantized DCT coefficient matrix in which only the integer part of the result of the division is arranged. It Although there is a quantization table recommended by the standard, the quantization table is basically defined in advance by the user according to the property of the input image.
【0005】この量子化DCT係数マトリックスは、通
常の画像では、その画像の低い空間周波数成分に対応す
る左上側には0以外の値を持ち、高い空間周波数成分に
対応する右下側には0が現れる確率が高い。ただし、そ
の画像にもよるが、右下側であっても0以外の値が現れ
ることもある。この量子化DCT係数マトリックスを求
めた後、この量子化DCT係数マトリックスを構成する
各要素(各量子化DCT係数)を所定の順序でスキャニ
ングし、各量子化DCT係数を、所定の基準に従って順
次符号化する。In a normal image, this quantized DCT coefficient matrix has a value other than 0 on the upper left side corresponding to the low spatial frequency component of the image and 0 on the lower right side corresponding to the high spatial frequency component. Is likely to appear. However, depending on the image, a value other than 0 may appear even on the lower right side. After obtaining this quantized DCT coefficient matrix, each element (each quantized DCT coefficient) forming this quantized DCT coefficient matrix is scanned in a predetermined order, and each quantized DCT coefficient is sequentially encoded according to a predetermined standard. Turn into.
【0006】図4は、量子化DCT係数マトリックスの
スキャニングの順序を表わした図である。上述したよう
に量子化DCT係数マトリックスは高周波数側(右下
側)ほど0の値が現れる確率が高いため、低周波側から
高周波側に向かって、即ち、図4に矢印で示すように、
左上端から右下端に向かってジグザクにスキャニングさ
れる。FIG. 4 is a diagram showing the order of scanning the quantized DCT coefficient matrix. As described above, the quantized DCT coefficient matrix has a higher probability that a value of 0 appears on the higher frequency side (lower right side), so that from the low frequency side to the high frequency side, that is, as shown by the arrow in FIG.
Zigzag scanning is performed from the upper left corner to the lower right corner.
【0007】このようにして符号化された画像データを
復号化するにあたっては、上述した説明の逆の順序を辿
ることになる。In decoding the image data encoded in this way, the reverse order of the above description is followed.
【0008】[0008]
【発明が解決しようとする課題】上記のような画像符号
化にあたっては、量子化テーブルの各係数の設定の仕方
により圧縮率や復号化後の画像の品質が大きく左右され
る。この量子化テーブルの各係数を設定するにあたって
は、通常、ユーザが符号化しようとする原画像を目で観
察してその原画像の特徴をつかみ、その特徴に基づいて
各係数が設定される。In the image coding as described above, the compression rate and the quality of the image after decoding greatly depend on the setting method of each coefficient in the quantization table. In setting each coefficient of this quantization table, usually, the user observes the original image to be encoded by eye to grasp the characteristic of the original image, and each coefficient is set based on the characteristic.
【0009】しかし、原画像を目でみてその特徴をつか
むのでは、手間、時間がかかり、また観察者によるばら
つきも大きく信頼性に欠けるという問題がある。また、
人が目で観察して画像の特徴をつかむことに代え、DC
T演算後の値(DCT係数マトリックスの係数値)が低
周波成分から高周波成分までどのような割り合いで分布
しているかを調べることにより、画像の特徴をつかむと
いう技術が提案されている。しかしこの手法は、処理が
複雑であり、量子化テーブルを定めるのにやはり時間が
かかるという問題がある。However, if the original image is visually observed and its characteristics are grasped, it takes a lot of time and labor, and there is a problem that the variation is large depending on the observer and the reliability is low. Also,
Instead of observing with human eyes to grasp the features of the image, DC
A technique has been proposed in which the characteristics of an image are grasped by investigating how the values after the T calculation (coefficient values of the DCT coefficient matrix) are distributed from low frequency components to high frequency components. However, this method has a problem that the processing is complicated and it takes time to determine the quantization table.
【0010】本発明は、上記事情に鑑み、量子化テーブ
ルを簡単な処理で定めることのできる量子化テーブル選
定方法を提供することを目的とする。In view of the above circumstances, it is an object of the present invention to provide a quantization table selection method which can determine a quantization table by a simple process.
【0011】[0011]
【課題を解決するための手段】上記目的を達成する本発
明の量子化テーブル選定方法は、各画素に各画素値が対
応する2次元画像もしくは2次元部分画像の画素値マト
リックスに離散コサイン変換を施して係数マトリックス
を生成し、係数マトリックスの各係数を量子化するため
の各量子化係数からなる量子化テーブルを用いて係数マ
トリックスの各係数を量子化することにより量子化係数
マトリックスを生成し、量子化係数マトリックスの各係
数をスキャニングしながら、それら各係数を順次符号化
する画像符号化に用いる量子化テーブルを選定する量子
化テーブル選定方法において、複数種類の量子化テーブ
ルを用意しておき、上記2次元画像の各画素の各画素値
のばらつきに対応する特徴量を求め、その特徴量に基づ
いて、上記2次元画像用として、複数の量子化テーブル
の中の1つを選定することを特徴とする。According to a quantization table selection method of the present invention which achieves the above object, a discrete cosine transform is applied to a pixel value matrix of a two-dimensional image or a two-dimensional partial image in which each pixel value corresponds to each pixel. To generate a coefficient matrix, and generate a quantized coefficient matrix by quantizing each coefficient of the coefficient matrix using a quantization table consisting of each quantized coefficient for quantizing each coefficient of the coefficient matrix, While scanning each coefficient of the quantized coefficient matrix, in a quantization table selection method for selecting a quantization table used for image coding for sequentially coding each coefficient, a plurality of types of quantization tables are prepared, A feature amount corresponding to a variation in each pixel value of each pixel of the two-dimensional image is obtained, and the two-dimensional image is obtained based on the feature amount. As for an image, characterized by selecting one of a plurality of quantization tables.
【0012】上記本発明の量子化テーブル選定方法にお
いて、上記特徴量として、上記2次元画像、その2次元
画像の画素を間引いた間引き画像、その2次元画像の部
分画像、および間引き画像の部分画像のうちのいずれか
1つの画像の隣接する画素の画素値どうしの差分の絶対
値を求め、その絶対値を所定のしきい値と比較し、その
比較結果に応じた量子化テーブルを選定することが好ま
しい。In the quantization table selection method of the present invention, as the feature amount, the two-dimensional image, a thinned image obtained by thinning out pixels of the two-dimensional image, a partial image of the two-dimensional image, and a partial image of the thinned image. To obtain the absolute value of the difference between the pixel values of adjacent pixels in any one of the images, compare the absolute value with a predetermined threshold value, and select the quantization table according to the comparison result. Is preferred.
【0013】[0013]
【作用】上記本発明の量子化テーブル選定方法は、複数
の量子化テーブルを用意しておき、画素値のばらつきに
対応する特徴量、例えば隣接する画素の画素値の差の絶
対値を求め、その特徴量に基づいて量子化テーブルを選
定するものであり、簡単な処理で容易に特徴量が求めら
れ、しかもその特徴量に基づいて適切な量子化テーブル
が選定される。According to the quantization table selection method of the present invention, a plurality of quantization tables are prepared, and the feature amount corresponding to the variation of the pixel values, for example, the absolute value of the difference between the pixel values of the adjacent pixels is calculated, The quantization table is selected based on the characteristic amount, the characteristic amount is easily obtained by a simple process, and an appropriate quantization table is selected based on the characteristic amount.
【0014】[0014]
【実施例】以下、本発明の実施例について説明する。図
1は、本発明の量子化テーブル選定方法の一実施例を示
すフローチャートである。まず、初期設定として、ここ
では、3種類の量子化テーブルを用意する。その3種類
の量子化テーブルは、それぞれ、 (1)8×8個の要素全てが‘FF’のテーブル (2)規格で推奨されているテーブル (3)8×8個の要素全てが‘1’のテーブル である。図1初期設定のブロック中のかっこ内の数値に
ついては後述する。Embodiments of the present invention will be described below. FIG. 1 is a flowchart showing an embodiment of the quantization table selection method of the present invention. First, as initialization, three types of quantization tables are prepared here. The three types of quantization tables are (1) a table in which all 8 × 8 elements are “FF” (2) a table recommended by the standard (3) all 8 × 8 elements are “1” 'Table. Numerical values in parentheses in the initial setting block of FIG. 1 will be described later.
【0015】8×8個の要素全てが‘FF’ということ
は、図3に示す量子化DCT係数マトリックスの右下側
が0になりやすく、すなわち高周波成分を無視した符号
化が行われ、逆に、8×8個の要素全てが‘1’という
ことは、高周波成分まで忠実に符号化することを意味し
ている。またここでは初期設定として閾値を設定する。The fact that all 8 × 8 elements are'FF 'means that the lower right side of the quantized DCT coefficient matrix shown in FIG. 3 tends to be 0, that is, encoding is performed by ignoring high frequency components, and conversely. The fact that all 8 × 8 elements are “1” means that high frequency components are faithfully encoded. Further, here, a threshold value is set as an initial setting.
【0016】次に、前処理として、原画像の画素を間引
くサブサンプリングを行う。尚、このサブサンプリング
は省略し、原画像を構成するすべての画素を用いて以下
の演算を行ってもよい。図2は、原画素をサブサンプリ
ングして得た間引き画像の例を示す図である。尚、ここ
には、簡単のため、極端に少ない画素数の画像が表示さ
れている。Next, as preprocessing, subsampling for thinning out pixels of the original image is performed. It should be noted that the sub-sampling may be omitted and the following calculation may be performed using all the pixels forming the original image. FIG. 2 is a diagram showing an example of a thinned image obtained by sub-sampling original pixels. Here, for simplicity, an image with an extremely small number of pixels is displayed here.
【0017】このようなサンプリングを行った後、隣接
する画素値どうしの差分(絶対値)を計算する。図2に
示す例では表1に示すように計算される。After performing such sampling, the difference (absolute value) between adjacent pixel values is calculated. In the example shown in FIG. 2, it is calculated as shown in Table 1.
【0018】[0018]
【表1】 [Table 1]
【0019】次に、上記のようにして求めた各差分値と
閾値とを比較し、閾値を越えている差分値の数をカウン
トする。ここでは、閾値が26と設定されているとする
と、表1に〇印をした差分値が閾値を越えている。この
閾値を越えている差分値の数をカウントすると、7とい
う数値が求められる。次に、この求めた数値に基づいて
量子化テーブルが選定される。図1の初期設定の欄のか
っこ内の数値は、上記のようにして求めた数値がそのか
っこ内の数値である場合に、対応する量子化テーブルを
選定することを意味している。図2,表1の例では数値
7が求められ、したがって初期設定の欄の(2)の量子
化テーブルが選定される。Next, each difference value obtained as described above is compared with a threshold value, and the number of difference values exceeding the threshold value is counted. Here, if the threshold value is set to 26, the difference value marked with a circle in Table 1 exceeds the threshold value. When the number of difference values exceeding this threshold value is counted, a numerical value of 7 is obtained. Next, a quantization table is selected based on the obtained numerical value. Numerical values in parentheses in the initial setting column of FIG. 1 mean that when the numerical value obtained as described above is the numerical value in the parentheses, the corresponding quantization table is selected. In the example of FIG. 2 and Table 1, the numerical value 7 is obtained, and therefore the quantization table (2) in the column of initial setting is selected.
【0020】以上のようにして、その原画像に適合した
量子化テーブルが選定される。尚、原画像に複数のコン
ポーネントが存在する場合、例えば、R,G,Bにカラ
ー分解された原画像が存在するときは、各コンポーネン
ト毎に上記の処理が繰り返され、各コンポーネント毎に
量子化テーブルが選定される。As described above, the quantization table suitable for the original image is selected. When the original image has a plurality of components, for example, when the original image color-separated into R, G, and B exists, the above process is repeated for each component, and quantization is performed for each component. A table is selected.
【0021】[0021]
【発明の効果】以上説明したように、本発明によれば、
DCT変換を行う前の簡単な演算により画像の特性が把
握でき、その画像の特性に適合した適切な量子化テーブ
ルが選定される。As described above, according to the present invention,
The characteristics of the image can be grasped by a simple calculation before performing the DCT transformation, and an appropriate quantization table suitable for the characteristics of the image is selected.
【図1】本発明の量子化テーブル選定方法の一実施例を
示すフローチャートである。FIG. 1 is a flowchart showing an embodiment of a quantization table selecting method of the present invention.
【図2】原画素をサブサンプリングして求めた画像の例
を示す図である。FIG. 2 is a diagram showing an example of an image obtained by sub-sampling original pixels.
【図3】DCT方式による符号化の概要説明図である。FIG. 3 is a schematic explanatory diagram of encoding by the DCT method.
【図4】量子化DCT係数マトリックスのスキャニング
の順序を表わした図である。FIG. 4 is a diagram showing a scanning order of a quantized DCT coefficient matrix.
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04N 7/30 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Office reference number FI technical display location H04N 7/30
Claims (2)
もしくは2次元部分画像の画素値マトリックスに離散コ
サイン変換を施して係数マトリックスを生成し、該係数
マトリックスの各係数を量子化するための各量子化係数
からなる量子化テーブルを用いて該係数マトリックスの
各係数を量子化することにより量子化係数マトリックス
を生成し、該量子化係数マトリックスの各係数をスキャ
ニングしながら、該各係数を順次符号化する画像符号化
に用いる量子化テーブルを選定する量子化テーブル選定
方法において、 複数種類の量子化テーブルを用意しておき、 前記2次元画像の各画素の各画素値のばらつきに対応す
る特徴量を求め、 該特徴量に基づいて、前記2次元画像用として、前記複
数の量子化テーブルの中の1つを選定することを特徴と
する量子化テーブル選定方法。1. A coefficient matrix is generated by applying a discrete cosine transform to a pixel value matrix of a two-dimensional image or a two-dimensional partial image in which each pixel value corresponds to each pixel, and each coefficient of the coefficient matrix is quantized. The quantization coefficient matrix is generated by quantizing each coefficient of the coefficient matrix using a quantization table composed of each quantization coefficient of, and each coefficient is scanned while scanning each coefficient of the quantization coefficient matrix. In a quantization table selection method for selecting a quantization table used for image coding to be sequentially coded, a plurality of types of quantization tables are prepared to cope with variations in each pixel value of each pixel of the two-dimensional image. The feature amount is obtained, and one of the plurality of quantization tables is selected for the two-dimensional image based on the feature amount. Quantization table selection method to be used.
2次元画像の画素を間引いた間引き画像、前記2次元画
像の部分画像、および前記間引き画像の部分画像のうち
のいずれか1つの画像の隣接する画素の画素値どうしの
差分の絶対値を求め、該絶対値を所定のしきい値と比較
し、該比較結果に応じた量子化テーブルを選定すること
を特徴とする請求項1記載の量子化テーブル選定方法。2. The image as any one of the two-dimensional image, a thinned image obtained by thinning out pixels of the two-dimensional image, a partial image of the two-dimensional image, and a partial image of the thinned image as the feature amount. 2. The absolute value of the difference between the pixel values of adjacent pixels of the pixel is calculated, the absolute value is compared with a predetermined threshold value, and the quantization table corresponding to the comparison result is selected. Quantization table selection method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24130694A JPH08107502A (en) | 1994-10-05 | 1994-10-05 | Quantizing table selecting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP24130694A JPH08107502A (en) | 1994-10-05 | 1994-10-05 | Quantizing table selecting method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH08107502A true JPH08107502A (en) | 1996-04-23 |
Family
ID=17072326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP24130694A Pending JPH08107502A (en) | 1994-10-05 | 1994-10-05 | Quantizing table selecting method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH08107502A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002232882A (en) * | 2001-01-31 | 2002-08-16 | Nec Corp | Moving picture encoder using a priori analysis, moving picture encoding method, and its program |
JP2011135269A (en) * | 2009-12-24 | 2011-07-07 | Fujitsu Semiconductor Ltd | Quantization control circuit, quantization parameter changing method, and encoding circuit |
-
1994
- 1994-10-05 JP JP24130694A patent/JPH08107502A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002232882A (en) * | 2001-01-31 | 2002-08-16 | Nec Corp | Moving picture encoder using a priori analysis, moving picture encoding method, and its program |
JP2011135269A (en) * | 2009-12-24 | 2011-07-07 | Fujitsu Semiconductor Ltd | Quantization control circuit, quantization parameter changing method, and encoding circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4732660B2 (en) | Visual attention system | |
JP4870743B2 (en) | Selective chrominance decimation for digital images | |
US5327254A (en) | Method and apparatus for compressing and decompressing image data | |
JP3210862B2 (en) | Image encoding device and image decoding device | |
US6823089B1 (en) | Method of determining the extent of blocking and contouring artifacts in a digital image | |
WO1991007840A2 (en) | Digital compression method and system with improved coding efficiency | |
JP3095804B2 (en) | Image data transmission apparatus and image data transmission method | |
US20020131647A1 (en) | Predicting ringing artifacts in digital images | |
US6643410B1 (en) | Method of determining the extent of blocking artifacts in a digital image | |
US8630500B2 (en) | Method for the encoding by segmentation of a picture | |
JPS63182988A (en) | Method and apparatus for intensifying video picture | |
JP4293912B2 (en) | Data compression of color images using wavelet transform | |
JP2004528791A (en) | Inter-frame encoding method and apparatus | |
EP0833518B1 (en) | Compression of image data with associated cost data | |
US20020168111A1 (en) | Image compression method | |
US6577766B1 (en) | Method and apparatus for motion detection in the discrete cosine transform domain | |
JPH08107502A (en) | Quantizing table selecting method | |
JPH05176173A (en) | Picture data compression method | |
Pokorny | Lossy Compression in the Chroma Subsampling Process | |
JP3732900B2 (en) | Image compression apparatus and image expansion apparatus | |
JP3260284B2 (en) | Image compression device and image decompression device | |
JPH05176179A (en) | Method and device for estimating picture data subject to compression/expansion processing | |
JPH07221993A (en) | Method and device for thinning out color image data, and compressing method for color image data | |
US20010046318A1 (en) | Compressing image data | |
JP3979020B2 (en) | Image processing apparatus for sampling compressed image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20030121 |