JP2960446B2 - Image processing method - Google Patents

Image processing method

Info

Publication number
JP2960446B2
JP2960446B2 JP29617289A JP29617289A JP2960446B2 JP 2960446 B2 JP2960446 B2 JP 2960446B2 JP 29617289 A JP29617289 A JP 29617289A JP 29617289 A JP29617289 A JP 29617289A JP 2960446 B2 JP2960446 B2 JP 2960446B2
Authority
JP
Japan
Prior art keywords
pixel data
image
data
discrete cosine
cosine transform
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
JP29617289A
Other languages
Japanese (ja)
Other versions
JPH03159322A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP29617289A priority Critical patent/JP2960446B2/en
Publication of JPH03159322A publication Critical patent/JPH03159322A/en
Application granted granted Critical
Publication of JP2960446B2 publication Critical patent/JP2960446B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は静止画像をデータ圧縮して伝送または記録
したのち伸張する画像処理方式に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing system for compressing, transmitting or recording a still image, and then expanding the image.

〔従来の技術〕[Conventional technology]

自然画符号化方式の標準化を図るために“Baseline S
ystem"や“Extended System"等の各種国際化標準方式が
提案されている。
“Baseline S” to standardize the natural image coding system
Various international standardization schemes such as "ystem" and "Extended System" have been proposed.

第5図は国際化標準方式のうちの“Baseline System"
の処理手順を示す概略図である。このシステムは入力画
像を8×8画素からなるブロックに分割し、各ブロック
毎に離散コサイン変換(DCT:Discrete Cosine Transfor
mation)を行い(処理P1)、得られたDCT係数を8×8
個の閾値からなる量子化マトリクスの各閾値により除算
することで量子化を行う(処理P2)。量子化されたDCT
係数のDC成分は前のブロックで量子化されたDC成分との
差分を取りその差分のビット数がハフマン符号化され、
AC成分はブロック内でジグザグ・スキャンを行い一次元
の数列に変換したのち連続する零(無効係数)の個数と
有効係数のビット数とで2次元のハフマン符号化が行わ
れる(処理P3およびP4)。
Fig. 5 shows the “Baseline System” of the international standard system
It is a schematic diagram showing the processing procedure of. This system divides an input image into blocks of 8 × 8 pixels, and performs discrete cosine transform (DCT) for each block.
mation) (process P1), and the obtained DCT coefficient is 8 × 8
The quantization is performed by dividing by each threshold value of the quantization matrix including the threshold values (process P2). Quantized DCT
The DC component of the coefficient takes the difference from the DC component quantized in the previous block, the number of bits of the difference is Huffman coded,
The AC component is converted into a one-dimensional sequence by performing a zigzag scan in the block, and then two-dimensional Huffman coding is performed on the number of consecutive zeros (ineffective coefficients) and the number of bits of the effective coefficients (processing P3 and P4). ).

こうして圧縮されたデータは、処理P1〜P4とは逆の処
理によって伸張される。すなわち、処理P4′におけるハ
フマン復号化、処理P3′におけるDC成分およびAC成分の
復号化、処理P2′における逆量子化および処理P1′にお
ける逆DCT(IDCT)である。
The data thus compressed is decompressed by a process reverse to the processes P1 to P4. That is, Huffman decoding in process P4 ', decoding of DC and AC components in process P3', inverse quantization in process P2 ', and inverse DCT (IDCT) in process P1'.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

ところで、前述の処理手順では、逆DDCTが行われた時
点での量子化誤差、DCTおよび逆DCT演算時の演算語長が
有限であることから生じる演算誤差等により、出力画像
データの値が入力画像データのビット数で表現できる範
囲を超えてオーバーフローまたはアンダーフローが生
じ、正しい再生画像が得られないという不都合がある。
By the way, in the above-described processing procedure, the value of the output image data is input due to a quantization error at the time when the inverse DDCT is performed, an arithmetic error resulting from a finite arithmetic word length at the time of DCT and inverse DCT operation, and the like. Overflow or underflow occurs beyond the range that can be represented by the number of bits of image data, and there is a disadvantage that a correct reproduced image cannot be obtained.

この発明は量子化誤差や演算誤差等によって生じるオ
ーバーフローやアンダーフローを防止することの出来る
画像処理方式を提供することを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an image processing method capable of preventing an overflow or an underflow caused by a quantization error or an arithmetic error.

〔課題を解決するための手段〕[Means for solving the problem]

この発明による画像処理方式は、入力画像を、N×N
個の画素からなる複数のブロックに分割して各ブロック
毎に離散コサイン変換を行い、変換して得られるN×N
個の変換係数を、N×N個の閾値からなる量子化マトリ
クスの各閾値によって除算することにより量子化を行う
データ圧縮工程と、量子化された変換係数に量子化マト
リクスの各閾値を乗算したのち逆離散コサイン変換を行
うデータ伸張工程とを含む画像処理方式において、逆離
散コサイン変換して得られる画像の画素データの中から
最大値画素データMAXと最小値画素データMINとを求め、
この各画素データを表わすビット数によって表現できる
最大値maxと最小値minとに対し、最大値画素データMAX
と最大値maxとが一致するように、かつ最小値画素デー
タMINと最小値minとが一致するように逆離散コサイン変
換して得られる画像の各画素データの正規化を行い、こ
の正規化したデータを、出力画像データとして出力する
ようにする。
According to the image processing method of the present invention, an input image is represented by N × N
N × N obtained by performing discrete cosine transform on each block by dividing into a plurality of blocks
Data transformation step of performing quantization by dividing the number of transform coefficients by each threshold value of a quantization matrix composed of N × N threshold values, and multiplying the quantized transform coefficient by each threshold value of the quantization matrix. In an image processing method that includes a data decompression step of performing an inverse discrete cosine transform, a maximum pixel data MAX and a minimum pixel data MIN are obtained from pixel data of an image obtained by performing an inverse discrete cosine transform,
For the maximum value max and the minimum value min that can be represented by the number of bits representing each pixel data, the maximum value pixel data MAX
And the maximum value max, and normalize each pixel data of an image obtained by performing an inverse discrete cosine transform so that the minimum value pixel data MIN matches the minimum value min. The data is output as output image data.

〔作用〕[Action]

この発明による画像処理方式は、離散コサイン変換な
どの処理によって圧縮した画像データを、逆離散コサイ
ン変換などの伸張処理によって再生する際に、出力画像
の各画素データの正規化を行うことによって量子化誤差
や演算誤差等によって生じるオーバーフローやアンダー
フローを防止するようにしている。
The image processing method according to the present invention performs quantization by normalizing each pixel data of an output image when image data compressed by processing such as discrete cosine transformation is reproduced by expansion processing such as inverse discrete cosine transformation. An overflow or an underflow caused by an error or a calculation error is prevented.

この正規化処理は、各出力画像を構成する画素データ
の中から最大値画素データMAXと最小値画素データMINと
を求め、画素データを表すビット数で表現される最大値
maxと最小値minとにより次式の演算を行うことによって
実行される。
In this normalization process, the maximum pixel data MAX and the minimum pixel data MIN are obtained from the pixel data constituting each output image, and the maximum value represented by the number of bits representing the pixel data is obtained.
The calculation is performed by performing the following equation based on max and the minimum value min.

この場合、G(i,j)は各出力画像を構成する画素デ
ータを表し、i=1,2,…,m、j=1,2,…,nで、mは出力
画像の水平画素数、nは出力画像の垂直画素数を各々表
している。
In this case, G (i, j) represents pixel data constituting each output image, i = 1,2, ..., m, j = 1,2, ..., n, and m is the number of horizontal pixels of the output image. , N respectively represent the number of vertical pixels of the output image.

従って、この発明によれば、画素データG(i,j)
を、そのビット数で表現される最大範囲内で変化する画
素データG′(i,j)に変換したのち出力するので、量
子化誤差や演算誤差等の影響によるオーバーフローやア
ンダーフローを防止することができる。
Therefore, according to the present invention, the pixel data G (i, j)
Is converted into pixel data G ′ (i, j) that changes within the maximum range represented by the number of bits, and is output. Therefore, it is possible to prevent overflow and underflow due to the effects of quantization errors and arithmetic errors. Can be.

〔実施例〕〔Example〕

第1図はこの発明による画像処理方式の処理手順を示
す概略図で、第5図と同一部分には同一符号を付して説
明する。
FIG. 1 is a schematic diagram showing a processing procedure of an image processing system according to the present invention. The same parts as those in FIG.

まず、入力画像は水平方向にNドット,垂直方向にN
ラインのN×N画素、例えば8×8画素からなるブロッ
クに分割されて各ブロック毎に離散コサイン変換(DC
T)される(処理P1)。得られたDCT係数は8×8個の閾
値からなる量子化マトリクスの各閾値により除算されて
量子化が行われる(処理P2)。第2図に輝度信号用の量
子化マトリクスを示す。
First, the input image has N dots in the horizontal direction and N dots in the vertical direction.
The line is divided into N × N pixels, for example, a block composed of 8 × 8 pixels, and a discrete cosine transform (DC
T) is performed (process P1). The obtained DCT coefficient is divided by each threshold of a quantization matrix composed of 8 × 8 thresholds to perform quantization (process P2). FIG. 2 shows a quantization matrix for a luminance signal.

量子化されたDCT係数のDC成分は前のブロックで量子
化されたDC成分と差分が取られ、その差分のビット数が
ハフマン符号化される(処理P3およびP4)。また、AC成
分はブロック内でジグザグスキャンが行われ一次元の数
列に変換されたのち連続する零(無効係数)の個数と有
効係数のビット数とで2次元のハフマン符号化が行われ
る(処理P3およびP4)。第3図にジグザグスキャンの順
序を示すテーブルを示す。
A difference between the DC component of the quantized DCT coefficient and the DC component quantized in the previous block is obtained, and the number of bits of the difference is Huffman-coded (processing P3 and P4). Further, the AC component is subjected to zigzag scanning within the block and converted into a one-dimensional sequence, and then two-dimensional Huffman coding is performed on the number of consecutive zeros (ineffective coefficients) and the number of effective coefficient bits (processing P3 and P4). FIG. 3 shows a table indicating the order of the zigzag scan.

なお、処理P2における量子化処理のときには量子化マ
トリクスの各閾値に対してある係数(スケールファク
タ)が乗算され量子化が行われる。この係数により圧縮
画像の画質および圧縮率が調整される。
At the time of the quantization process P2, each threshold value of the quantization matrix is multiplied by a certain coefficient (scale factor) and quantization is performed. The coefficient adjusts the image quality and compression ratio of the compressed image.

また、ハフマン符号化はDC成分およびAC成分共に量子
化された係数値そのものを使用せず、その値を表現する
のに必要なビット数がハフマン符号化の入力になる。そ
してハフマン符号と別にそのビット数の値が付加情報と
して付け加えられる。例えば、量子化された係数が2
(10進数)とした場合、2進数で表現すると“000…01
0"となるが、これを表現するのに必要なビット数2がこ
の値を代表する値としてハフマン符号化される。そし
て、付加ビットとして2ビットのみのデータ“10"が付
加される。
Also, Huffman coding does not use the quantized coefficient value itself for both the DC and AC components, and the number of bits required to represent the value is input to Huffman coding. Then, separately from the Huffman code, the value of the number of bits is added as additional information. For example, if the quantized coefficient is 2
(Decimal number), if expressed in binary number, "000… 01
However, the number of bits 2 required to represent the value is Huffman-encoded as a value representative of this value. Then, only two bits of data "10" are added as additional bits.

また、量子化された係数が負の場合は付加ビットから
1を引いたデータが付加される。例えば、量子化された
係数が−2(10進数)とした場合、2進数(2の補数表
示)で表現すると“111…110"となり、下2ビットが付
加ビットとなるが、“10"から「1」を引いた“01"が付
加ビットとして付加される。こうすることにより、量子
化された係数が正のときは付加ビットは1で始まり、負
であれば0で始まることになり、正負の判別が容易に行
える。
If the quantized coefficient is negative, data obtained by subtracting 1 from the additional bit is added. For example, when the quantized coefficient is -2 (decimal number), when expressed in a binary number (two's complement notation), it becomes "111... 110", and the lower two bits become additional bits. “01” obtained by subtracting “1” is added as an additional bit. By doing so, the additional bit starts with 1 when the quantized coefficient is positive, and starts with 0 when the quantized coefficient is negative.

こうして圧縮されたデータは、処理P1〜P4とは逆の処
理によって伸張される。すなわち、処理P4′におけるハ
フマン復号化、処理P3′におけるDC成分およびAC成分の
復号化、処理P2′における逆量子化および処理P1′にお
ける逆DCT(IDCT)である。
The data thus compressed is decompressed by a process reverse to the processes P1 to P4. That is, Huffman decoding in process P4 ', decoding of DC and AC components in process P3', inverse quantization in process P2 ', and inverse DCT (IDCT) in process P1'.

次いで、逆DCTして得られた画像の各画素データは処
理P5で正規化される。この正規化は、第4図のフローチ
ャートに示すように、まず画素データG(i,j)(i=
1,2,…,m、j=1,2,…,n、m:水平方向の画素数、n:垂直
方向の画素数)の中から最大値を求めてMAXとし(ステ
ップS1)、次に最小値を求めてMINとする(ステップS
2)。こうして求めた最大値MAXと最小値MINとにより画
素データG(i,j)の補正を次式を用いて行う。
Next, each pixel data of the image obtained by the inverse DCT is normalized in process P5. As shown in the flowchart of FIG. 4, this normalization is performed first by pixel data G (i, j) (i =
, M, j = 1, 2,..., N, m: the number of pixels in the horizontal direction, n: the number of pixels in the vertical direction) and the maximum value is determined as MAX (step S1). Is calculated as the minimum value and set to MIN (step S
2). The pixel data G (i, j) is corrected by using the following formula based on the maximum value MAX and the minimum value MIN thus obtained.

この実施例では、入力および出力画像の各画素データ
を8ビットで表しているため、最大値maxは255、最小値
minは0となる。従って、「max−min=255」となり、実
際には次式の演算を行う(ステップS3)。
In this embodiment, since each pixel data of the input and output images is represented by 8 bits, the maximum value max is 255 and the minimum value is
min becomes 0. Accordingly, “max−min = 255”, and the following equation is actually calculated (step S3).

この演算処理は各画像毎に全画素データG(i,j)に
ついて行われ、全ての画素データに対する演算が終了す
ると(ステップS4)、正規化(処理P5)が終了する。
This calculation process is performed for all pixel data G (i, j) for each image. When the calculation for all pixel data is completed (step S4), normalization (process P5) is completed.

この正規化処理によって各画素データの値の変化範囲
は0〜255となり、オーバーフローまたはアンダーフロ
ーによるクリッピングの影響のない出力画像データが得
られる。
By this normalization processing, the change range of the value of each pixel data becomes 0 to 255, and output image data free from the influence of clipping due to overflow or underflow is obtained.

〔発明の効果〕〔The invention's effect〕

この発明によれば、データ伸張時の逆離散コサイン変
換の後に、出力画像の画素データの正規化を行うため、
量子化誤差や演算誤差等の影響によるオーバーフローや
アンダーフローによるクリッピングを発生させずに変換
後の画像データの全範囲をリニアにすることができ、正
しい値を出力することが出来る。
According to the present invention, to perform normalization of the pixel data of the output image after the inverse discrete cosine transform at the time of data expansion,
The entire range of the converted image data can be made linear without causing clipping due to an overflow or underflow due to the influence of a quantization error or a calculation error, and a correct value can be output.

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

第1図はこの発明による画像処理方式の処理手順を示す
図、 第2図は輝度信号の量子化マトリクスを示す図、 第3図はジグザグスキャンのテーブルを示す図、 第4図は第1図の正規化処理を示すフローチャート、 第5図は従来の画像処理方式の処理手順を示す図であ
る。
FIG. 1 is a diagram showing a processing procedure of an image processing method according to the present invention, FIG. 2 is a diagram showing a quantization matrix of a luminance signal, FIG. 3 is a diagram showing a zigzag scan table, and FIG. And FIG. 5 is a diagram showing a processing procedure of a conventional image processing method.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭64−60175(JP,A) 特開 昭63−13485(JP,A) 特開 平1−256817(JP,A) 特開 昭64−13817(JP,A) 特開 昭56−169978(JP,A) (58)調査した分野(Int.Cl.6,DB名) H04N 7/24 - 7/68 H04N 1/41 - 1/419 H04N 5/50 - 5/63 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-64-60175 (JP, A) JP-A-63-13485 (JP, A) JP-A-1-256817 (JP, A) JP-A 64-64 13817 (JP, A) JP-A-56-169778 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) H04N 7/24-7/68 H04N 1/41-1/419 H04N 5/50-5/63

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力画像を、N×N個の画素からなる複数
のブロックに分割して各ブロック毎に離散コサイン変換
を行い、変換して得られるN×N個の変換係数を、N×
N個の閾値からなる量子化マトリクスの各閾値によって
除算することにより量子化を行うデータ圧縮工程と、上
記量子化された変換係数に上記量子化マトリクスの各閾
値を乗算したのち逆離散コサイン変換を行うデータ伸張
工程とを含む画像処理方式において、 上記逆離散コサイン変換して得られる画像の画素データ
の中から最大値画素データMAXと最小値画素データMINと
を求め、この各画素データを表わすビット数によって表
現できる最大値maxと最小値minとに対し、上記最大値画
素データMAXと上記最大値maxとが一致するように、かつ
上記最小値画素データMINと上記最小値minとが一致する
ように上記逆離散コサイン変換して得られる画像の各画
素データの正規化を行い、この正規化したデータを、出
力画像データとして出力することを特徴とする画像処理
方式。
An input image is divided into a plurality of blocks each composed of N × N pixels, discrete cosine transform is performed for each block, and N × N transform coefficients obtained by the conversion are represented by N × N transform coefficients.
A data compression step of performing quantization by dividing by each threshold of a quantization matrix composed of N thresholds, and an inverse discrete cosine transform after multiplying the quantized transform coefficient by each threshold of the quantization matrix. In the image processing method including a data decompression process to be performed, maximum pixel data MAX and minimum pixel data MIN are obtained from pixel data of an image obtained by the inverse discrete cosine transform, and a bit representing each pixel data is obtained. For the maximum value max and the minimum value min that can be represented by numbers, the maximum value pixel data MAX and the maximum value max match, and the minimum value pixel data MIN and the minimum value min match. Normalizing each pixel data of an image obtained by performing the inverse discrete cosine transform, and outputting the normalized data as output image data. Image processing method.
【請求項2】上記正規化は上記逆離散コサイン変換して
得られる画像の各画素データG(i,j)に対し、 なる演算処理を行うことを特徴とする請求項1記載の画
像処理方式。
2. The normalization is performed on each pixel data G (i, j) of an image obtained by performing the inverse discrete cosine transform. The image processing method according to claim 1, wherein the following arithmetic processing is performed.
JP29617289A 1989-11-16 1989-11-16 Image processing method Expired - Fee Related JP2960446B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29617289A JP2960446B2 (en) 1989-11-16 1989-11-16 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29617289A JP2960446B2 (en) 1989-11-16 1989-11-16 Image processing method

Publications (2)

Publication Number Publication Date
JPH03159322A JPH03159322A (en) 1991-07-09
JP2960446B2 true JP2960446B2 (en) 1999-10-06

Family

ID=17830094

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29617289A Expired - Fee Related JP2960446B2 (en) 1989-11-16 1989-11-16 Image processing method

Country Status (1)

Country Link
JP (1) JP2960446B2 (en)

Also Published As

Publication number Publication date
JPH03159322A (en) 1991-07-09

Similar Documents

Publication Publication Date Title
US5719961A (en) Adaptive technique for encoder and decoder signal transformation
JPH07154604A (en) Method for expanding document image compressed with standardadct
JP2001136526A (en) Method for image processing, device thereof and storage medium
JP4831547B2 (en) Method for image compression and decompression acceleration
JPH07184057A (en) Adct compression of minimum compression ratio
US7551788B2 (en) Digital image coding device and method for noise removal using wavelet transforms
JP2960446B2 (en) Image processing method
JP2768260B2 (en) Image coding control method
JPH04220081A (en) Method and device for picture data decoding
JPH06225213A (en) Method and device or processing picture
JP3034887B2 (en) Image processing method and apparatus
JP3230336B2 (en) Recompression device and recompression system
JP2887843B2 (en) Image data restoration method and apparatus
JP3260925B2 (en) Image processing device
JP2950559B2 (en) Image processing method and apparatus
JP3016805B2 (en) Image data compression method
JP3199786B2 (en) Image processing device
JP2887842B2 (en) Image data restoration method and apparatus
JPH09205552A (en) Image coding method and device therefor
JPH03181230A (en) Image processing system
JPH0746407A (en) Picture data compressing device and picture data restoring device
JPH03192878A (en) Picture data compressor
JP3016803B2 (en) Image data compression circuit
JPH03159321A (en) Image processing system
JPH07273661A (en) Compression coding and decoding device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees