JPH03256453A - Compressed data amount control system - Google Patents

Compressed data amount control system

Info

Publication number
JPH03256453A
JPH03256453A JP2053554A JP5355490A JPH03256453A JP H03256453 A JPH03256453 A JP H03256453A JP 2053554 A JP2053554 A JP 2053554A JP 5355490 A JP5355490 A JP 5355490A JP H03256453 A JPH03256453 A JP H03256453A
Authority
JP
Japan
Prior art keywords
block
value
data amount
data
variable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2053554A
Other languages
Japanese (ja)
Inventor
Hirofumi Sakagami
弘文 阪上
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 JP2053554A priority Critical patent/JPH03256453A/en
Publication of JPH03256453A publication Critical patent/JPH03256453A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To control the amount of compressed data to a desired data amount by compressing the data while changing the value of a variable for each block, and following-up the accumulated data amount to a data amount function. CONSTITUTION:A calculated data amount function Gs is compared with an accumulated value Vs of the real compressed data amount for each block and in the case of Gs<Vs, a value subtracting a control value DELTAk from a variable (k) is defined as the variable (k) of the next block. In the case of Vs<Gs, a value adding the control value >=k to the variable (k) is defined as the variable (k) of the next block and in the case of Vs=Gs, the variable (k) is maintained for the next block as it is. In such a way, the value of the variable (k) is set for each block and the compressed data amount accumulated value Vs follows up the functions Gs while setting a coefficient satisfying a prescribed relation in the one-dimensional sequence of the transform coefficient to zero. Thus, the compressed data amount is controlled to the desired data amount.

Description

【発明の詳細な説明】 〔産業上の利用分野] この発明は静止画像データを可変長符号によって圧縮し
た後、伝送または記録する際に、圧縮後のデータ量が要
求されるデータ量となるように制御する圧縮データ量制
御方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] This invention compresses still image data using a variable length code and then transmits or records the data so that the amount of data after compression becomes the required amount of data. This invention relates to a method for controlling the amount of compressed data.

〔従来の技術〕[Conventional technology]

自然画符号化方式の標準化を図るために“Ba5eli
ne System”や’Extended Syst
em’等の各種国際標準化方式が提案されている。
In order to standardize the natural image encoding method, “Ba5eli
'ne System' or 'Extended System'
Various international standardization methods such as em' have been proposed.

第10図は国際標準化方式のうちの′″Ba5elin
eSys tea+ ”の処理手順を示す概略図である
。このシステムは一枚の入力画像を1ブロック8×8画
素の複数ブロックに分割し、各ブロック毎に2次元の離
散コサイン変換(D CT : Discrete C
o51neTransfor+g)を行い(処理PI)
、得られるDCT係数を、8×8個の閾値からなる量子
化マトリクスの各閾値で除算することで量子化を行う(
処理P2)。第11図および第12図は輝度信号用およ
び色差信号用の量子化マトリクスの例である。
Figure 10 shows ``Ba5elin'' of the international standardization system.
This system divides one input image into multiple blocks of 8×8 pixels, and performs two-dimensional discrete cosine transformation (DCT) on each block. C
o51neTransform+g) (processing PI)
, quantization is performed by dividing the obtained DCT coefficients by each threshold of a quantization matrix consisting of 8 × 8 thresholds (
Processing P2). FIGS. 11 and 12 are examples of quantization matrices for luminance signals and color difference signals.

量子化したDCT係数のうち直流(DC)成分は前のブ
ロックで量子化したDCC骨分差分を取り、その差分の
ビット数をハフマン符号化する。
For the direct current (DC) component of the quantized DCT coefficients, the DCC bone difference quantized in the previous block is taken, and the number of bits of the difference is Huffman encoded.

交流(AC)1分はブロック内でジグザグスキャンを行
って一次元の数列に変換し、有効係数のビット数と連続
する零(無効係数)の個数とで2次元のハフマン符号化
を行う(処理P3およびP4)。
For one minute of alternating current (AC), zigzag scan is performed within the block to convert it into a one-dimensional number sequence, and two-dimensional Huffman encoding is performed using the number of bits of effective coefficients and the number of consecutive zeros (invalid coefficients). P3 and P4).

第13図にジグザグスキャンのテーブルの例を示す。FIG. 13 shows an example of a zigzag scan table.

なお、処理P2における量子化のときに、量子化マトリ
クスの各閾値に対しである係数(スケールファクタ)を
乗算したのちDCT係数の除算を行う。圧縮画像の画質
および圧縮率はこのスケールファクタによって調整する
Note that during quantization in process P2, each threshold value of the quantization matrix is multiplied by a certain coefficient (scale factor), and then the DCT coefficient is divided. The image quality and compression rate of the compressed image are adjusted by this scale factor.

こうして圧縮したデータは、処理P1〜P4と逆の処理
によって伸張する。すなわち、処理P5におけるハフマ
ン復号化、処理P6におけるDCC骨分よびACC骨分
復号化、処理P7における逆量子化および処理P8にお
ける逆DCT (10CT)である。
The data compressed in this way is decompressed by the reverse process of processes P1 to P4. That is, Huffman decoding in process P5, DCC bone segment and ACC bone segment decoding in process P6, inverse quantization in process P7, and inverse DCT (10CT) in process P8.

〔発明が解決しようとする課題] ところで、前述のシステムでは可変長符号であるハフマ
ン符号を用いてデータ圧縮を行っているため、圧縮後の
全データ量は圧縮工程(処理P1〜P4)が終了するま
で知ることが出来ない。このため、予め設定したデータ
量の範囲内で符号化を行う必要がある場合は、何らかの
データ量の制御が必要となる。
[Problems to be Solved by the Invention] By the way, in the above-mentioned system, data compression is performed using a Huffman code, which is a variable length code, so the total amount of data after compression is the same as that at the end of the compression process (processes P1 to P4). You won't know until you do. Therefore, if it is necessary to perform encoding within a preset data amount range, some kind of data amount control is required.

この発明は圧縮後のデータ量が所望のデータ量となるよ
うに制御すると共に、視覚特性を考慮して画像の周辺部
をポカした状態で圧縮してデータ量の削減を図るように
した圧縮データ量制御方式を提供することを目的とする
This invention provides compressed data that controls the amount of data after compression to be a desired amount of data, and also compresses the image with the peripheral area of the image taken into consideration to reduce the amount of data. The purpose is to provide a quantity control method.

〔課題を解決するための手段] この発明は、一枚のディジタル画像を、1ブロツクn×
n1i素からなる複数のブロックに分割し、各ブロック
毎に離散コサイン変換を行い、変換して得られるn×n
個の変換係数のうち当該ブロックの画面内の位置に応じ
て変換係数のうちの所定の変換係数を零とし、このn×
n個の変換係数を、n×n個の閾値からなる量子化マト
リクスの各閾値で除算して量子化を行い、量子化後の変
換係数を、直流成分から高周波成分に向かって一定の順
序で一次元の数列に変換し、変換して得られる一次元の
数列a、 (p=o、I、・、n2−1)に対し特定の
値kを設定し、数列a、中の「k≦q≦n2−1」なる
条件を満たす係数a、を零とした後、数列ap中の連続
する零の個数を符号化するデータ圧縮を行うと共に、離
散コサイン変換係数のACC骨分2乗和の累積分布を各
ブロック毎に求め、この累積分布から所望の圧縮データ
量に比例換算した関数Gを決定し、この関数Gとデータ
圧縮して得た実際の圧縮データ量の累積値Vとをブロッ
ク毎に比較し、累積値Vが関数Gに追随するように変数
にの値をブロック毎に調整するようにする。
[Means for Solving the Problems] This invention allows one digital image to be divided into one block n×
Divide into multiple blocks consisting of n1i elements, perform discrete cosine transformation for each block, and obtain n×n
Among the transform coefficients, a predetermined one of the transform coefficients is set to zero according to the position of the block in the screen, and this n×
Quantization is performed by dividing n transform coefficients by each threshold of a quantization matrix consisting of n×n thresholds, and the quantized transform coefficients are divided in a fixed order from the DC component to the high frequency component. Set a specific value k for the one-dimensional sequence a, (p=o, I, ·, n2-1) obtained by converting it into a one-dimensional sequence, and After setting the coefficient a that satisfies the condition "q≦n2-1" to zero, data compression is performed to encode the number of consecutive zeros in the sequence ap, and the ACC bone sum of squares of the discrete cosine transform coefficients is A cumulative distribution is obtained for each block, and from this cumulative distribution, a function G that is proportionally converted to the desired compressed data amount is determined, and this function G and the cumulative value V of the actual compressed data amount obtained by data compression are combined into blocks. The values of the variables are adjusted for each block so that the cumulative value V follows the function G.

〔作 用〕[For production]

この発明において、変数にのブロック毎の調整は次のよ
うにして行う。まず、ブロック5(s−I2、・・・、
T)毎に離散コサイン変換係数Fu9OAC成分の2乗
和す、を求める。次いで、このACC骨分2乗和の全ブ
ロックについて累積分布B、を求め、さらに累積分布B
、の最大値BTが圧縮後の所望のデータ量に対応するよ
うに比例換算したデ−タ量関数G5を次式で求める。
In this invention, the adjustment of variables for each block is performed as follows. First, block 5 (s-I2, . . .
T), the sum of the squares of the discrete cosine transform coefficients Fu9OAC components is calculated. Next, calculate the cumulative distribution B for all blocks of this ACC bone sum of squares, and further calculate the cumulative distribution B
The data amount function G5, which is proportionally converted so that the maximum value BT of , corresponds to the desired data amount after compression, is determined by the following equation.

こうして求めたデータ量関数Gsと実際の圧縮データ量
の累積値V5とをブロック毎に比較し、C,<V、なら
ば変数kから調整値Δkを引いた値を次ブロックの変数
にとし、V、<C,ならば変数kに調整値Δkを加えた
値を次ブロックの変数にとし、V、=Gsならばそのま
まとする。
The data amount function Gs obtained in this way and the cumulative value V5 of the actual compressed data amount are compared for each block, and if C,<V, the value obtained by subtracting the adjustment value Δk from the variable k is set as the variable for the next block. If V<C, the value obtained by adding the adjustment value Δk to the variable k is set as the variable for the next block, and if V,=Gs, it is left unchanged.

このようにしてブロックS毎に変数にの値を設定し、変
換係数F ayの一次元の数列ap中の「k≦q≦n”
−1」なる関係を満たす係数aqを零にして圧縮データ
量累積値V、を関数Gsに追随させる。
In this way, the value of the variable is set for each block S, and "k≦q≦n" in the one-dimensional sequence ap of the transformation coefficient F ay is set.
-1'' is set to zero, and the compressed data amount cumulative value V is made to follow the function Gs.

また、各ブロックの画面上の位置に応じてブロック毎に
高周波成分の変換係数を零とし、実質的に画像の周辺部
をポカした状態にしてデータ圧縮処理を行うので、視覚
上重要な画面の中央部に多くのデータを割り振ることが
でき、視覚特性を考慮した効率的な画像圧縮が行える。
In addition, the conversion coefficient of high frequency components is set to zero for each block according to its position on the screen, and data compression processing is performed with the periphery of the image essentially blanked out, so that the data compression processing is performed with the periphery of the image in a state where it is virtually blank. A large amount of data can be allocated to the central area, allowing efficient image compression that takes visual characteristics into consideration.

〔実施例〕〔Example〕

第1図はこの発明による圧縮データ量制御方式の処理手
順の一実施例を示す概略図で、第10図と同一部分には
同一符号を付して説明する。
FIG. 1 is a schematic diagram showing an embodiment of the processing procedure of the compressed data amount control method according to the present invention, and the same parts as in FIG. 10 are given the same reference numerals and will be explained.

まず、入力画像データを水平および垂直方向に1ブロッ
クn×n画素、例えば8×8画素からなる複数χ×y個
のブロックに分割し、各ブロック毎に2次元の離散コサ
イン変換(DCT)を施す(処理Pi)。
First, input image data is divided horizontally and vertically into a plurality of χ×y blocks each consisting of n×n pixels, for example, 8×8 pixels, and a two-dimensional discrete cosine transform (DCT) is applied to each block. (processing Pi).

DCTは周波数領域における直交変換の一種で、変換係
数をF ay(u、v=0.1.−、n−1)、1ブロ
ック分の入力画像データをf =J(i+j=O+1+
・・・+n−1)とすると、 但し、C,−1/(2(w=0) =1    (W≠0〉 で定義される。変換係数F ayはlブロック分の人力
画像データを空間周波数に分解した成分を示し、係数F
0゜は入力画像データf jjのn×n画素の平均値に
比例した値(DCC骨分であり、u、vが大きくなるに
つれて空間周波数の高い成分(AC成分)を表す。
DCT is a type of orthogonal transformation in the frequency domain.
...+n-1), however, it is defined as C,-1/(2(w=0) = 1 (W≠0>).The transformation coefficient F ay transforms l blocks of human image data into spatial Indicates the component decomposed into frequency, and the coefficient F
0° is a value (DCC component) proportional to the average value of n×n pixels of the input image data f jj, and as u and v become larger, it represents a component with a higher spatial frequency (AC component).

次に、変換係数F uvのうち、「l≦(1+v」なる
関係を有する係数F uvを零とする処理を行う(処理
P10)。変数lは当該ブロックの画面上の位置に応し
た値である(処理P11)。第2図は一画面上の各ブロ
ックにおける変数lの値の変化を示す図で、この例では
、画面中央に位置するブロックを’ l =14」とし
、それ以外のブロックを「l−4」としている。第3図
はあるブロックの変換係数F。v(図(a))に対し、
F、、=O(但し、4≦u+v)なる処理(図(ロ))
を行った例を示す図である。この図から明らかなように
、処理PIOにおける処理は、指定された変数lによっ
て示される変換係数の対角線と平行する成分およびそれ
以上の高周波成分を強制的に零とする処理で、一種のロ
ーパスフィルタ処理に相当する。従って、変数lが小さ
いときはローパスフィルタの遮断周波数が低いときに対
応し、変数lが大きくなるにつれて遮断周波数が高くな
る。
Next, among the conversion coefficients F uv, a process is performed in which the coefficient F uv having the relationship “l≦(1+v”) is set to zero (process P10).The variable l is a value corresponding to the position of the block on the screen. (Process P11). Figure 2 is a diagram showing changes in the value of the variable l in each block on one screen. In this example, the block located in the center of the screen is set to 'l = 14', and the other blocks are is "l-4". Figure 3 shows the transformation coefficient F.v (Figure (a)) of a certain block.
F,,=O (however, 4≦u+v) (Figure (b))
It is a figure which shows the example which performed. As is clear from this figure, the processing in the processing PIO is a process in which components parallel to the diagonal of the transform coefficient indicated by the specified variable l and higher frequency components are forcibly set to zero, which is a kind of low-pass filter. Corresponds to processing. Therefore, when the variable 1 is small, the cutoff frequency of the low-pass filter is low, and as the variable 1 becomes large, the cutoff frequency becomes high.

第4図は一画面上の各ブロックにおける変数lの他の例
を示す図である。このように、視覚上あまり重要でない
画像の周辺部については変数lの値を小さくして高周波
成分を減少させ、圧縮後のデータ量が少なくなるように
している。
FIG. 4 is a diagram showing another example of the variable l in each block on one screen. In this way, the value of the variable l is reduced for the peripheral part of the image that is not visually important to reduce high frequency components, thereby reducing the amount of data after compression.

第1図に戻り、ローパスフィルタ処理(処理P10)さ
れたDCT係数は一画面毎にメモリに一次的に記憶され
る(処理P12)。記憶された係数はブロック毎に次式
で表されるAC成分の2乗和す。
Returning to FIG. 1, the DCT coefficients subjected to the low-pass filter processing (processing P10) are temporarily stored in the memory for each screen (processing P12). The stored coefficients are the sum of squares of AC components expressed by the following equation for each block.

(s=1.2.−、xXy)が取られる(処理P13)
(s=1.2.-, xXy) is taken (processing P13)
.

次いで、一画面の全ブロックについて各ブロック毎に次
式で表される2乗和す、の累積分布B。
Next, the cumulative distribution B of the sum of squares for all blocks on one screen is expressed by the following equation for each block.

を求め(処理P14)、 B、=Σ b。(process P14), B, = Σ b.

さらに、累積分布B、の最大値、すなわちACC身分2
乗和す、の全ブロックについての総和B、r(T= x
 X y )が圧縮後の所定のデータ量に対応するよう
に比例換算したデータ量関数G、を求める(処理P15
)。
Furthermore, the maximum value of the cumulative distribution B, that is, the ACC status 2
The total sum B, r (T= x
Calculate the data amount function G, which is proportionally converted so that X y ) corresponds to the predetermined data amount after compression (process P15
).

第5図に2乗和す8、累積分布B、およびデータ量関数
G、の一例を示す。
FIG. 5 shows an example of the sum of squares 8, the cumulative distribution B, and the data amount function G.

また、メモリに記憶された一画面分のDCT係数は、ブ
ロック毎に読み出してn×n個の閾値からなる量子化マ
トリクスの各閾値にスケールファクタを乗算した値で除
算して量子化する(処理P2)。スケールファクタによ
る乗算処理は量子化マトリクスの各閾値にビットシフト
を施すことによって行う。
In addition, the DCT coefficients for one screen stored in the memory are read out block by block and quantized by dividing each threshold value of a quantization matrix consisting of n×n threshold values by a scale factor (processing P2). Multiplication processing using a scale factor is performed by bit-shifting each threshold value of the quantization matrix.

次いで、DC成分については前のブロックで量子化した
成分と差分を取り(処理P30)、差分のビット数をハ
フマン符号化する(処理P4)。
Next, for the DC component, a difference is taken from the component quantized in the previous block (processing P30), and the number of bits of the difference is Huffman encoded (processing P4).

ACIfi分については、第13図に示した順序でジグ
ザグスキャンを行い一次元の数列al、(ρ−1゜2、
・・・、63)に変換する(処理P31)。第6図に量
子化後のDCT係数のマトリクスを示し、第7図(a)
にジグザグスキャン後の一次元数列apを示す。
For ACIfi, zigzag scan is performed in the order shown in Fig. 13 to obtain the one-dimensional sequence al, (ρ-1゜2,
..., 63) (process P31). Figure 6 shows the matrix of DCT coefficients after quantization, and Figure 7(a)
shows the one-dimensional sequence ap after zigzag scanning.

次に、この数列apに対し「k≦q≦63.なる関係を
満足する係数a9の値を零とする処理を行う(処理P3
2)、第7図(b)は数列a9に対し「k−8」として
処理P32を施した後の数列a′、を示す。第6図およ
び第7図から明らかように、処理P32は数列a、のに
番目以降の高周波成分を零にする処理で、一種のローパ
スフィルタ処理に相当する。従って、kの値を変化させ
ることによって連続する零の個数を変化させることがで
き、圧縮後のデータ量、すなわち圧縮率を調整すること
が出来る。
Next, a process is performed on this sequence ap in which the value of the coefficient a9 that satisfies the relationship ``k≦q≦63.'' is set to zero (process P3
2), FIG. 7(b) shows the sequence a' after the process P32 is applied to the sequence a9 as "k-8". As is clear from FIGS. 6 and 7, the process P32 is a process for zeroing out the high frequency components after the second in the sequence a, and corresponds to a type of low-pass filter process. Therefore, by changing the value of k, the number of consecutive zeros can be changed, and the amount of data after compression, that is, the compression ratio can be adjusted.

次いで、連続する零の個数をランレングス符号化しく処
理P33)、このランレングス符号化した連続する零の
個数データと有効係数のビット数とで2次元のハフマン
符号化を行う(処理P4)。
Next, the number of consecutive zeros is run-length encoded (process P33), and two-dimensional Huffman encoding is performed using the run-length encoded data on the number of consecutive zeros and the number of bits of the effective coefficient (process P4).

ハフマン符号化はDC成分およびACC骨分に量子化し
た係数値そのものを使用せず、その値を表現するのに必
要なビット数をハフマン符号化する。
Huffman encoding does not use the quantized coefficient values themselves for the DC component and ACC component, but performs Huffman encoding on the number of bits necessary to express the values.

そしてハフマン符号とは別にそのビット数の値を付加情
報として付は加える。例えば、量子化した係数が2(1
0進数)とした場合、2進数で表現すると“000・・
・010”となるが、これを表現するのに必要なビット
数2をこの値を代表する値としてハフマン符号化し、2
ビツトのデータ“°lO”を付加ビットとして付加する
In addition to the Huffman code, the value of the number of bits is added as additional information. For example, if the quantized coefficient is 2(1
0 base), if expressed in binary, it would be “000...
・010'', but the number of bits necessary to express this, 2, is Huffman encoded as a value representing this value, and 2
Bit data “°lO” is added as an additional bit.

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

続いて、圧縮した1ブロック分の画像データの圧縮後の
データ量を計数しく処理P16)、その累積データ量V
、と処理P15で求めたデータ量関数G、とを比較しく
処理P17)、ローパスフィルタ処理における変数にの
調整を行う(処理P18)。
Next, the amount of compressed image data for one block of compressed image data is counted and processed P16), and the cumulative amount of data V is calculated.
, and the data amount function G obtained in process P15 are compared (process P17), and the variables in the low-pass filter process are adjusted (process P18).

すなわち、C,<V、ならば変数kを「k−Δk」とし
て連続する零データの個数を増加させ、圧縮後のデータ
量を減少するようにし、逆にV、<G。
That is, if C,<V, the variable k is set to "k-Δk" to increase the number of consecutive zero data and reduce the amount of data after compression, and conversely, V,<G.

ならば変数kを「k+Δk」として連続する零データの
個数を減少させ、圧縮後のデータ量が増加するようにし
、V、=G、ならばそのままとして次ブロックのデータ
圧縮処理を行う。
If so, the variable k is set to "k+Δk" to reduce the number of consecutive zero data and increase the amount of data after compression, and if V,=G, the data compression process for the next block is performed without changing.

この一連の処理は全ブロックについて繰り返され、第8
図に示すように、圧縮後の累積データ量■、がデータ量
関数G、に追随しながら所望のデータ量となるようにブ
ロック毎に変数kを制御する。
This series of processing is repeated for all blocks, and the 8th
As shown in the figure, the variable k is controlled for each block so that the cumulative data amount after compression, ■, follows the data amount function G, and becomes the desired data amount.

圧縮データを伸張するには、従来どおりのデータ伸張処
理を行えばよい。すなわち、まずハフマン復号化を行い
(処理P5)、DC成分に関しては差分復号化、ACt
2分についてはランレングス復号化を行った後、ジグザ
グスキャンの順序にデータを並べ替えてlブロック分の
変換係数を得(処理P6)、この変換係数に量子化マト
リクスの各閾値にスケールファクタを乗算した値を乗算
して逆量子化を行い(処理P7)、さらに逆離散コサイ
ン変換(IDCT)を行って(処理P8)、伸張処理を
終了する。この場合、データ圧縮時に使用した変数には
データ伸張時には不要となるので、従来の方式による伸
張処理が行える。
To decompress compressed data, conventional data decompression processing may be performed. That is, Huffman decoding is first performed (processing P5), and for the DC component, differential decoding and ACt
After performing run-length decoding for 2 minutes, the data is rearranged in the order of zigzag scan to obtain transform coefficients for l blocks (processing P6), and a scale factor is assigned to each threshold value of the quantization matrix to these transform coefficients. The multiplied value is multiplied to perform inverse quantization (processing P7), and further, inverse discrete cosine transform (IDCT) is performed (processing P8), and the decompression process ends. In this case, the variables used during data compression are no longer needed during data decompression, so decompression processing can be performed using the conventional method.

次に、第9図のフローチャートを参照しながらデータ圧
縮処理の動作について詳説する。
Next, the operation of the data compression process will be explained in detail with reference to the flowchart shown in FIG.

まず、システムの初期設定を行う(ステップS1)。す
なわち、ACC骨分2乗和す5.2乗和bsの累積分布
B5.2乗和す、の全ブロックについての総和B、およ
びデータ量関数G、の多値をそれぞれリセットし、さら
にブロック番号Sの値を初期値「1」に設定する。
First, initial settings of the system are performed (step S1). That is, the cumulative distribution B5.2 of the ACC bone sum of squares and 5.2 of the sum of squares bs is reset for all blocks, and the multi-values of the data amount function G are reset, and the block number is Set the value of S to the initial value "1".

次いで、最初のブロックの画像データを入力しくステッ
プ32)、DCT処理を行う(ステップS3)。次いで
、当該ブロックの画面上の位置に応した変数lによって
「l≦u+v」なる関係を有する変換係数F uvを零
とするローパスフィルタ処理を行う(ステップS4)。
Next, the image data of the first block is input (step 32), and DCT processing is performed (step S3). Next, a low-pass filter process is performed in which the transform coefficient F uv having the relationship "l≦u+v" is set to zero using a variable l corresponding to the position of the block on the screen (step S4).

この処理によって視覚上あまり重要でない画面の周辺部
の画像については予めデータ量が少なくなるようにする
Through this processing, the amount of data is reduced in advance for images in the periphery of the screen that are not visually important.

DCT処理およびローパスフィルタ処理によって得た変
換係数F uVは一旦メモリにストアする(ステップS
5)。そして、ブロック毎にACC骨分2乗和b3を演
算しくステップS6)、その累積分布B、を求める(ス
テップS7)。この場合、最初のブロック(S=1)の
処理中であるので、B1 =b、となる。
The transformation coefficient F uV obtained by the DCT processing and the low-pass filter processing is temporarily stored in the memory (step S
5). Then, the sum of squares b3 of the ACC bones is calculated for each block (step S6), and its cumulative distribution B is determined (step S7). In this case, since the first block (S=1) is being processed, B1 =b.

続いて、全ブロックについて処理したか否か判定する(
ステップS8)。今の場合、まだ全ブロックの処理を終
了していないので、ブロック番号Sに「1」を加え(ス
テップS9)、次のブロックの画像データを人力しくス
テップS2)、前述のステップ33〜S9の処理を繰り
返す。
Next, determine whether all blocks have been processed (
Step S8). In this case, since the processing of all blocks has not yet been completed, "1" is added to the block number S (step S9), the image data of the next block is manually processed (step S2), and the steps 33 to S9 described above are performed. Repeat the process.

全ブロックの処理が終了すると、ブロック番号Sを変数
とするデータ量関数G、を求め(ステップ5IO)、次
いでローパスフィルタ処理の変数にとして初期値koを
設定しくステップ5ll)、メモリにストアした一画面
分のDCT係数から最初のブロックのDCT係数を読み
出して量子化を行う(ステップ512)。
When all blocks have been processed, a data amount function G is calculated using the block number S as a variable (step 5IO), and an initial value ko is set as a variable for low-pass filter processing (step 5ll). The DCT coefficients of the first block are read out from the DCT coefficients for the screen and quantized (step 512).

量子化後の係数がDC成分であれば(ステップ513)
、前のブロックで量子化したDC成分と差分を取り差分
値を符号化する(ステップ5I4)。
If the coefficient after quantization is a DC component (step 513)
, the difference is taken from the DC component quantized in the previous block, and the difference value is encoded (step 5I4).

量子化後の係数がAC戒成分あれば(ステップ513)
、ジグザグスキャンを行って一次元の数列a。
If the coefficient after quantization is an AC component (step 513)
, perform a zigzag scan to obtain a one-dimensional sequence a.

に変換しくステップ315)、この数列a、のに番目以
降の高周波成分を零にするローパスフィルタ処理を行い
(ステップ516)、連続する零の個数を圧縮するラン
レングス符号化を行う(ステップ517)。
(step 315), performs low-pass filter processing to zero the high frequency components after the second in this sequence a (step 516), and performs run-length encoding to compress the number of consecutive zeros (step 517). .

次いで、DC成分については符号化した差分値をハフマ
ン符号化し、ACC骨分ついてはランレングス符号化し
た連続する零の個数データと有効係数のビット数とで2
次元のハフマン符号化を行う(ステップ318)。
Next, for the DC component, the encoded difference value is Huffman encoded, and for the ACC component, the number of consecutive zeros data that has been run-length encoded and the number of bits of the effective coefficient are
Perform Huffman encoding of the dimensions (step 318).

そして、全ブロックについて処理したか否か判定しくス
テップ319)、全ブロックについての処理が終了して
いれば圧縮処理を終了する。今の場合、最初のブロック
を処理したのみであるから、圧縮後の累積データ量V、
を求める処理(ステップ520)に移行する。そして、
求めた累積データtvsとステップSIOで求めたデー
タ量関数G。
Then, it is determined whether all blocks have been processed (step 319), and if all blocks have been processed, the compression process is ended. In this case, since only the first block has been processed, the cumulative amount of data after compression V,
The process moves on to the process of determining (step 520). and,
The obtained cumulative data tvs and the data amount function G obtained in step SIO.

とを比較しくステップ521) 、cs <Vsならば
変数kを「k−Δk」として連続する零データの個数を
多くシ(ステップ522) 、VS <Gsならば変数
kを「k+Δk」として連続する零データの個数を少な
くシ(ステップ523) 、V、=G。
(step 521), if cs < Vs, set the variable k to "k-Δk" and increase the number of consecutive zero data (step 522); if VS < Gs, set the variable k to "k+Δk" and increase the number of consecutive zero data. Reduce the number of zero data (step 523), V, = G.

ならばそのままの値で次ブロックのデータ圧縮処理(ス
テップ312〜518)を行う。
If so, data compression processing for the next block (steps 312 to 518) is performed using the same values.

このようにして、ブロック毎に変数にの値を変化させな
がらデータ圧縮を行い、第5図に示すように、累積デー
タ量V3がデータ量関数G、に追随するようにし、圧縮
後のデータ量が所望のデータ量となるようにする。
In this way, data compression is performed while changing the value of the variable for each block, and as shown in FIG. 5, the cumulative data amount V3 follows the data amount function G, and the data amount after compression is is the desired amount of data.

なお、変数にの変化量Δkとして一定の値を用いるので
はなく、例えば、 Δk一α(vs  cs)   (α:定数)とすれば
、データ量関数G、と実際のデータ量Vsとの誤差をフ
ィードパンクすることになり、追随性能がより向上する
Note that instead of using a constant value as the amount of change Δk in a variable, for example, if we use Δk - α (vs cs) (α: constant), then the error between the data amount function G and the actual data amount Vs This results in a feed puncture, which further improves tracking performance.

また、この実施例では、データ圧縮処理中のローパスフ
ィルタ処理(処理P32)を、量子化処理(処理P2)
の後に行うようにしたが、量子化処理の前に行うように
しても同様の効果を得ることが出来る。
In addition, in this embodiment, the low-pass filter processing (processing P32) during the data compression processing is replaced by the quantization processing (processing P2).
Although it is performed after the quantization process, the same effect can be obtained even if the process is performed before the quantization process.

(発明の効果) この発明によれば、2次元DCT係数のマトリクスを、
直流成分から高周波成分に向かって一定の順序で一次元
の数列に変換し、任意のに番目以降の高周波成分のDC
T係数を零にすることでデータ量を調整する方法を用い
、かつ画像の各ブロック毎に圧縮後のデータ量を前もっ
て定めてデータ量関数を決定しておき、この決定したデ
ータ量関数と実際に圧縮して得られるブロック毎の累積
データ量とを比較し、実際の圧縮データ量がデータ量関
数に追随するように変数にの値をブロック毎に変化させ
ながらデータ圧縮を行っていくので圧縮後のデータ量を
所望のデータ量に制御することが可能となる。この場合
、各ブロックの画面上の位置に応して当該ブロックの所
定の変換係数を零とすることにより実質的に画像の周辺
部をポカした状態にし、その後に前述のデータ圧縮処理
を行うので、視覚上重要な画面の中央部に多くのデータ
を割り振ることができ、視覚特性を考慮した効率的な画
像圧縮が可能となる。
(Effect of the invention) According to the invention, a matrix of two-dimensional DCT coefficients is
Convert the DC component to a one-dimensional sequence in a fixed order from the DC component to the high frequency component, and calculate the DC of the high frequency component after the arbitrary number.
A method is used to adjust the amount of data by setting the T coefficient to zero, and the amount of data after compression is determined in advance for each block of the image to determine a data amount function, and the determined data amount function and the actual The data is compressed by comparing the cumulative amount of data for each block obtained by compressing the data, and performing data compression while changing the value of the variable for each block so that the actual compressed data amount follows the data amount function. It becomes possible to control the subsequent data amount to a desired data amount. In this case, by setting a predetermined conversion coefficient of each block to zero according to the position of the block on the screen, the periphery of the image is essentially left blank, and then the data compression process described above is performed. , it is possible to allocate a large amount of data to the central part of the screen, which is visually important, and to perform efficient image compression that takes visual characteristics into consideration.

また、データ量関数を定めるときに、各ブロックのDC
T係数のAC成分の2乗和を基本にしているので、画像
信号の変化の激しい部分には多くのデータ量を割り当て
、変化の緩やかな部分には少ないデータ量を割り当てる
ことができ、画像内容に応した自然な圧縮が行える。
Also, when determining the data amount function, the DC of each block
Since it is based on the sum of the squares of the AC components of the T coefficient, it is possible to allocate a large amount of data to areas where the image signal changes rapidly, and a small amount of data to areas where the changes are gradual, thereby reducing the image content. Natural compression can be performed according to the situation.

さらに、データ圧縮時に使用する変数にはデータ伸張時
には不要であるので、データ伸張は従来方式との互換性
が維持できる。
Furthermore, since variables used during data compression are not required during data expansion, data expansion can maintain compatibility with conventional methods.

また、変数kを変化させるときに一定の変化幅ではなく
、実際の圧縮データ量とデータ量関数との誤差に応じた
値で変化させれば、実際の圧縮データ量のデータ量関数
への追随性能がさらに向上する。
In addition, if the variable k is changed not by a fixed range of change but by a value corresponding to the error between the actual compressed data amount and the data amount function, the actual compressed data amount can follow the data amount function. Performance is further improved.

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

第1図はこの発明による圧縮データ量制御方式の処理手
順の一実施例を示す図、 第2図および第4図は一画像中の変数lの値を示す図、 第3図(a)および(ロ)は変数lによるローパスフィ
ルタ処理前および処理後のDCT係数を示す表、 第5図(a) 、 (b) 、 (C)はAC成分の2
乗和す5.累積分布B8.データ量関数Gsの一例を示
す図、 第6図は量子化後のDCT係数を示すマトリクス表、 第7図はDCT係数を一次元の数列に変換した表、 第8図はデータ量関数と実際のデータ量との関係を示す
図、 第9図は第1図のデータ圧縮動作を説明するためのフロ
ーチャート、 第10図は従来の圧縮・伸張処理の処理手順を示す図、 第11図は輝度信号の量子化マトリクスを示す表、第1
2図は色差信号の量子化マトリクスを示す表、第13図
はジグザグスキャンのテーブルを示す表である。
FIG. 1 is a diagram showing an embodiment of the processing procedure of the compressed data amount control method according to the present invention, FIGS. 2 and 4 are diagrams showing the value of the variable l in one image, and FIGS. (b) is a table showing the DCT coefficients before and after low-pass filter processing using the variable l;
Multiply and sum5. Cumulative distribution B8. A diagram showing an example of the data amount function Gs, FIG. 6 is a matrix table showing the DCT coefficients after quantization, FIG. 7 is a table converting the DCT coefficients into a one-dimensional sequence, and FIG. 8 is the data amount function and the actual Figure 9 is a flowchart to explain the data compression operation in Figure 1, Figure 10 is a diagram showing the processing procedure of conventional compression/expansion processing, Figure 11 is luminance. Table showing the quantization matrix of the signal, 1st
FIG. 2 is a table showing a quantization matrix of color difference signals, and FIG. 13 is a table showing a zigzag scan table.

Claims (2)

【特許請求の範囲】[Claims] (1)一枚のディジタル画像を、1ブロックn×n画素
からなる複数のブロックに分割し、各ブロック毎に離散
コサイン変換を行い、変換して得られるn×n個の変換
係数のうち当該ブロックの画面内の位置に応じて上記変
換係数のうちの所定の変換係数を零とし、このn×n個
の変換係数を、n×n個の閾値からなる量子化マトリク
スの各閾値で除算して量子化を行い、上記量子化後の変
換係数を、直流成分から高周波成分に向かって一定の順
序で一次元の数列に変換し、この変換して得られる一次
元の数列a_p(p=0、1、・・・、n^2−1)に
対し特定の値kを設定し、上記数列a_p中の「k≦q
≦n^2−1」なる条件を満たす係数a_qを零とした
後、上記数列a_p中の連続する零の個数を符号化する
データ圧縮を行うと共に、上記離散コサイン変換係数の
AC成分の2乗和の累積分布を各ブロック毎に求め、こ
の累積分布から所望の圧縮データ量に比例換算した関数
Gを決定し、この関数Gと上記データ圧縮して得た実際
の圧縮データ量の累積値Vとを上記ブロック毎に比較し
、上記累積値Vが上記関数Gに追随するように上記変数
kの値を上記ブロック毎に調整することを特徴とする圧
縮データ量制御方式。
(1) Divide one digital image into multiple blocks each consisting of n×n pixels, perform discrete cosine transform for each block, and select the relevant one among the n×n transform coefficients obtained by the transform. A predetermined transform coefficient among the above transform coefficients is set to zero according to the position of the block in the screen, and these n×n transform coefficients are divided by each threshold value of a quantization matrix consisting of n×n threshold values. The quantized transform coefficients are converted into a one-dimensional sequence a_p (p=0 , 1, ..., n^2-1), and set a specific value k for "k≦q in the above sequence a_p.
After setting the coefficient a_q that satisfies the condition "≦n^2-1" to zero, data compression is performed to encode the number of consecutive zeros in the sequence a_p, and the AC component of the discrete cosine transform coefficient is squared. The cumulative distribution of the sum is determined for each block, and from this cumulative distribution, a function G that is proportionally converted to the desired compressed data amount is determined, and this function G is combined with the cumulative value V of the actual compressed data amount obtained by compressing the data above. The compressed data amount control method is characterized in that the value of the variable k is adjusted for each block so that the cumulative value V follows the function G.
(2)上記変数kの上記ブロック毎の調整値Δkを、Δ
k=α(V−G)(α:定数)で定義することを特徴と
する請求項1記載の圧縮データ量制御方式。
(2) Let the adjustment value Δk of the variable k for each block be Δ
2. The compressed data amount control method according to claim 1, wherein k=α(V-G) (α: constant).
JP2053554A 1990-03-07 1990-03-07 Compressed data amount control system Pending JPH03256453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2053554A JPH03256453A (en) 1990-03-07 1990-03-07 Compressed data amount control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2053554A JPH03256453A (en) 1990-03-07 1990-03-07 Compressed data amount control system

Publications (1)

Publication Number Publication Date
JPH03256453A true JPH03256453A (en) 1991-11-15

Family

ID=12946022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2053554A Pending JPH03256453A (en) 1990-03-07 1990-03-07 Compressed data amount control system

Country Status (1)

Country Link
JP (1) JPH03256453A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017123649A (en) * 2011-01-28 2017-07-13 アイ アイオー, リミテッド・ライアビリティ・カンパニーEye Io, Llc Encoding of video stream based on scene type

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017123649A (en) * 2011-01-28 2017-07-13 アイ アイオー, リミテッド・ライアビリティ・カンパニーEye Io, Llc Encoding of video stream based on scene type

Similar Documents

Publication Publication Date Title
KR930009872B1 (en) Changing coding apparatus
JP2549013B2 (en) Data compression device
US5719961A (en) Adaptive technique for encoder and decoder signal transformation
US6968088B2 (en) Modification of detected quantization step size from the encoded bitstream based on a region of interest (ROI) bitmask
JP2003032677A (en) Compressive coder for moving image
JPH0418857A (en) Picture data compression system
JPH03256453A (en) Compressed data amount control system
JPH07121120B2 (en) Data compression device
JP3017510B2 (en) Compressed data amount control method
JP2843397B2 (en) Compressed data amount control method
JPH03250865A (en) Compression data quantity control system
JP2843396B2 (en) Compressed data amount control method
JPH03213059A (en) Picture data compressing method
JP3016805B2 (en) Image data compression method
JPH03256452A (en) Picture data processing system
JPH03224363A (en) Compressed data quantity control system
Kobayashi et al. Lossless compression for RGB color still images
EP0525981A1 (en) Improvements relating to data compression
CN117354545B (en) Video image wavelet transformation high-frequency coefficient block coding method according to limited size
JPH03252284A (en) Data compressor
JPH03256454A (en) Picture data processing system
KR100236526B1 (en) Adaptive discrete cosine converter
JP2836636B2 (en) Encoding device and encoding method
JPH03192878A (en) Picture data compressor
JPH06350991A (en) Data compression circuit