JPH04326667A - Compression and expansion device for picture data - Google Patents

Compression and expansion device for picture data

Info

Publication number
JPH04326667A
JPH04326667A JP3097285A JP9728591A JPH04326667A JP H04326667 A JPH04326667 A JP H04326667A JP 3097285 A JP3097285 A JP 3097285A JP 9728591 A JP9728591 A JP 9728591A JP H04326667 A JPH04326667 A JP H04326667A
Authority
JP
Japan
Prior art keywords
bits
image data
data
compression
orthogonal
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
JP3097285A
Other languages
Japanese (ja)
Inventor
Hisashi Yonekawa
久 米川
Junichiro Akune
潤一郎 阿久根
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta Inc
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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP3097285A priority Critical patent/JPH04326667A/en
Publication of JPH04326667A publication Critical patent/JPH04326667A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To process a conversion coefficient under the same condition independently of a bit number change in a data of a digital picture. CONSTITUTION:A digitized picture data is subject to orthogonal transformation by an orthogonal transformation/orthogonal inverse transformation arithmetic section (DCT/IDCT) 10 and a conversion coefficient obtained by the orthogonal transformation is quantized, coded and compressed. In this system, bit shift in which a bit number (b) of a picture data is made coincident with a maximum bit number (p) able to be operated in the arithmetic section 10 at a position A or B before the arithmetic section 10 or a bit number (r) of the conversion coefficient is made coincident with a bit number (q) of the conversion coefficient obtained when a picture data of the bit number (p) is subject to orthogonal transformation at a position C after the arithmetic section 10 is implemented. Thus, the bit number of the conversion coefficient to be quantized and coded is unified.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は画像データの圧縮伸張装
置に関し、特に、画像データに直交変換を施して得られ
る変換係数を量子化し符号化して圧縮データを得るよう
構成された装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data compression/expansion apparatus, and more particularly to an apparatus configured to obtain compressed data by quantizing and encoding transform coefficients obtained by orthogonally transforming image data.

【0002】0002

【従来の技術】デジタル技術の進歩に伴い、X線画像な
どの階調画像をデジタル化して保存,電送したり、種々
のデジタル画像処理を施したりすることが、近年、一般
的に行われるようになっている。しかしながら、階調画
像は2値画像に比べ情報量が多いため、階調画像をデジ
タル化した場合のデータ量の多さが、電送時間の増大や
メモリ容量の増大を招くという問題がある。特に、医療
用のX線画像では、デジタル化するときの画素数及び各
画素に要するビット数が、例えば胸部X線写真では、4
00 万〜1600万画素,8〜12ビットと膨大であ
り、データの保存・電送を行う上で効率が悪い。
[Background Art] With the advancement of digital technology, it has become common practice in recent years to digitize gradation images such as X-ray images, store them, transmit them electronically, and perform various digital image processing. It has become. However, since a gradation image has a larger amount of information than a binary image, there is a problem in that the large amount of data when digitizing a gradation image causes an increase in transmission time and an increase in memory capacity. In particular, for medical X-ray images, the number of pixels and the number of bits required for each pixel when digitized is 4, for example, for a chest X-ray photograph.
It is huge, with 100,000 to 16 million pixels and 8 to 12 bits, and is inefficient in storing and transmitting data.

【0003】そこで、医療用画像を含む階調画像の膨大
なデータを圧縮する画像圧縮技術が注目されている。か
かる画像圧縮技術としては大きく分けて可逆圧縮と非可
逆圧縮とに分類されるが、可逆圧縮は、1/2〜1/3
程度の低い圧縮率しか望めないため、1/5以上の高い
圧縮率が得られる非可逆圧縮方式、特に、直交変換符号
化が注目されている。
[0003] Therefore, image compression technology that compresses a huge amount of data of gradation images including medical images is attracting attention. Such image compression techniques can be broadly classified into reversible compression and irreversible compression, but reversible compression is 1/2 to 1/3
Since only a relatively low compression rate can be expected, irreversible compression methods that can achieve a high compression rate of 1/5 or higher, particularly orthogonal transform coding, are attracting attention.

【0004】直交変換符号化とは、画像全体を小さなブ
ロックに分割し、これらのブロック単位にディスクリー
トコサイン変換(DCT)などの直交変換を施し、これ
により得られた変換係数を量子化し符号化する非可逆圧
縮方式の1つであり、階調画像を圧縮するのに最も適し
た圧縮方法として知られている。上記のように直交変換
を用いて圧縮された圧縮データを伸張して画像データを
復元するときには、圧縮データの復号化及び逆量子化を
行って変換係数を得た後、この変換係数に直交逆変換を
施すことにより復元画像データを得ることができる。
Orthogonal transform encoding involves dividing the entire image into small blocks, applying orthogonal transform such as discrete cosine transform (DCT) to each of these blocks, and quantizing and encoding the resulting transform coefficients. This is one of the irreversible compression methods and is known as the most suitable compression method for compressing gradation images. When decompressing compressed data compressed using orthogonal transform as described above to restore image data, the compressed data is decoded and dequantized to obtain transform coefficients, and then the orthogonal inverse By performing the conversion, restored image data can be obtained.

【0005】[0005]

【発明が解決しようとする課題】ところで、医療用階調
画像では、X線画像,CT画像,MRI画像等の撮影方
式によって画像データのダイナミックレンジ(画素それ
ぞれの階調を表すビット数)が異なり、また、同じX線
画像であっても、例えば撮影した装置によって8ビット
/画素,10ビット/画素,12ビット/画素の3通り
のダイナミックレンジを取り得る場合がある。
[Problem to be solved by the invention] By the way, in medical gradation images, the dynamic range of image data (the number of bits representing the gradation of each pixel) differs depending on the imaging method such as X-ray images, CT images, MRI images, etc. Furthermore, even the same X-ray image may have three dynamic ranges: 8 bits/pixel, 10 bits/pixel, and 12 bits/pixel, depending on the device that took the image, for example.

【0006】ここで、前述のように画像データの圧縮・
伸張を行う装置にあっては、上記のように異なるダイナ
ミックレンジの画像データであっても圧縮・伸張できる
ことが好ましい。しかしながら、ディスクリートコサイ
ン変換などの直交変換を用いて画像圧縮を行う場合には
、異なるダイナミックレンジの画像データをそのまま直
交変換すると、得られる変換係数のダイナミックレンジ
が前記画像データのダイナミックレンジに依存して変化
することになり、変換係数の選択パラメータや量子化パ
ラメータなどの変換係数を符号化するまでの間の処理条
件は、変換係数のダイナミックレンジ(ビット数)に応
じて設定される必要があるから、上記のようにして変換
係数のダイナミックレンジが変化すると、その都度前記
パラメータの調整が必要になって、画像データのダイナ
ミックレンジ変化に対して柔軟に対応できないという問
題があった。
[0006] Here, as mentioned above, image data compression and
It is preferable that the decompression device be capable of compressing and decompressing image data having different dynamic ranges as described above. However, when performing image compression using orthogonal transformation such as discrete cosine transformation, if image data with different dynamic ranges is directly orthogonally transformed, the dynamic range of the resulting transform coefficients depends on the dynamic range of the image data. This is because the processing conditions before encoding the transform coefficients, such as transform coefficient selection parameters and quantization parameters, must be set according to the dynamic range (number of bits) of the transform coefficients. When the dynamic range of the conversion coefficient changes as described above, it becomes necessary to adjust the parameters each time, and there is a problem in that it is not possible to respond flexibly to changes in the dynamic range of image data.

【0007】本発明は上記問題点に鑑みなされたもので
あり、直交変換を用いてデータ圧縮・伸張を行う圧縮伸
張装置において、画像データのダイナミックレンジが変
化しても、変換係数を符号化するまでの処理条件の調整
が不要であり、然も、直交変化における演算精度を高く
保つことができる画像データの圧縮伸張装置を提供する
ことを目的とする。
The present invention has been made in view of the above-mentioned problems, and is capable of encoding transform coefficients even if the dynamic range of image data changes in a compression/expansion device that compresses and expands data using orthogonal transform. It is an object of the present invention to provide an image data compression/expansion device that does not require adjustment of processing conditions up to the present time and can maintain high calculation accuracy in orthogonal changes.

【0008】[0008]

【課題を解決するための手段】そのため本発明では、デ
ジタル化された画像データに直交変換を施して得られる
変換係数を量子化し符号化して圧縮データを得ると共に
、前記圧縮データを復号化・逆量子化して直交逆変換を
施し画像データに伸張するよう構成された画像データの
圧縮伸張装置において、直交変換を施して得られた変換
係数のビット数が所定ビット数に一致するように、直交
変換前の画像データ又は直交変換して得た変換係数のビ
ットシフト操作を行ってから圧縮処理を行い、伸張時に
は元の画像データのビット数に戻す圧縮時と逆方向のビ
ットシフト操作を、復号化・逆量子化によって得られた
変換係数又は直交逆変換により復元された画像データに
おいて行うよう構成した。
[Means for Solving the Problems] Therefore, in the present invention, transform coefficients obtained by performing orthogonal transformation on digitized image data are quantized and encoded to obtain compressed data, and the compressed data is decoded and inverted. In an image data compression/decompression device configured to perform quantization, perform orthogonal inverse transform, and decompress image data, orthogonal transform is performed so that the number of bits of the transform coefficient obtained by performing orthogonal transform matches a predetermined number of bits. Performs a bit shift operation on the previous image data or the transform coefficient obtained by orthogonal transformation, then performs compression processing, and when decompressing, the bit shift operation in the opposite direction to the compression process returns to the number of bits of the original image data, and decoding - It is configured to perform on the transform coefficients obtained by inverse quantization or the image data restored by orthogonal inverse transform.

【0009】ここで、前記所定ビット数を、直交変換演
算においてオーバーフローを起こさずに演算可能な最大
ビット数の画像データに直交変換を施して得られる変換
係数のビット数とすることが好ましい。
[0009] Here, it is preferable that the predetermined number of bits is the number of bits of a transform coefficient obtained by performing orthogonal transform on image data having the maximum number of bits that can be computed without causing an overflow in orthogonal transform computation.

【0010】0010

【作用】かかる画像データの圧縮伸張装置によると、画
像圧縮時に、直交変換前の画像データのビット数を所定
ビット数に一致させるか、又は、直交変換して得られた
変換係数のビット数を所定ビット数に一致させるように
、ビットシフト操作される。従って、画像データのビッ
ト数が変化しても、直交変換して得られる変換係数のビ
ット数は、所定ビット数に統一されることになる。この
ため、変換係数の係数選択パラメータや量子化パラメー
タなどの直交変換後の圧縮処理に関わるパラメータを、
変換係数のビット数変化に応じて調整する必要がなくな
る。
[Operation] According to such an image data compression/expansion device, when compressing an image, the number of bits of the image data before orthogonal transformation is made to match the predetermined number of bits, or the number of bits of the transformation coefficient obtained by orthogonal transformation is A bit shift operation is performed to match a predetermined number of bits. Therefore, even if the number of bits of image data changes, the number of bits of transform coefficients obtained by orthogonal transformation will be unified to a predetermined number of bits. For this reason, parameters related to compression processing after orthogonal transformation, such as coefficient selection parameters and quantization parameters of transform coefficients, are
There is no need to make adjustments in response to changes in the number of bits in the conversion coefficient.

【0011】また、伸張時には、圧縮時と逆方向のビッ
トシフト操作を行うことで、圧縮前の元の画像データの
ビット数を復元できる。ここで、所定ビット数を、直交
変換演算においてオーバーフローを起こさずに演算可能
な最大ビット数の画像データに直交変換を施して得られ
る変換係数のビット数とし、直交変換される前の画像デ
ータのビット数を前記最大ビット数に合わせるようにす
れば、直交変換演算における演算精度を高く保つことが
できるようになる。
Furthermore, during decompression, the number of bits of the original image data before compression can be restored by performing a bit shift operation in the opposite direction to that during compression. Here, the predetermined number of bits is the number of bits of a transform coefficient obtained by performing orthogonal transformation on image data with the maximum number of bits that can be calculated without causing overflow in orthogonal transform operation, and By adjusting the number of bits to match the maximum number of bits, it is possible to maintain high calculation accuracy in orthogonal transformation calculations.

【0012】0012

【実施例】以下に本発明の実施例を説明する。図1は本
発明にかかる画像データの圧縮伸張装置を備えたシステ
ムの全体構成図であり、本システムはホストコンピュー
タ1とデータ圧縮伸張装置2とから構成されており、ホ
ストコンピュータ1側から圧縮前のデジタル化された画
像データ又は圧縮された符号データ(圧縮データ)をデ
ータ圧縮伸張装置2に転送し、データ圧縮伸張装置2か
らは圧縮された符号データ又は復元された画像データが
ホストコンピュータ1側へ返送されるようになっている
[Examples] Examples of the present invention will be described below. FIG. 1 is an overall configuration diagram of a system equipped with an image data compression/expansion device according to the present invention. This system is composed of a host computer 1 and a data compression/expansion device 2. The digitized image data or compressed encoded data (compressed data) is transferred to the data compression/expansion device 2, and the compressed encoded data or restored image data is transferred from the data compression/expansion device 2 to the host computer 1 side. It will be sent back to.

【0013】ここで、ホストコンピュータ1とデータ圧
縮伸張装置2とは、バス3を介して接続されており、前
記バス3は、画像データ,コマンドデータ等のデータ転
送のための双方向データバスとデータ転送に伴う制御信
号の授受を行う制御用(コントロール)バスとを有して
いる。データ圧縮伸張装置2は、圧縮するデジタル画像
データ又は復元された画像データ(伸張画像データ)を
一時的に記憶する画像バッファ4と、圧縮された符号デ
ータ又は復元の元となる符号データを一時的に記憶する
符号バッファ5とを備えており、これらのバッファ4,
5はバスコントローラ6を介してバス3に接続されてお
り、バスコントローラ6を介してデータのバッファ4,
5への取込み又はバッファ4,5からホストコンピュー
タ1側へのデータ転送が行われるようになっている。
Here, the host computer 1 and the data compression/expansion device 2 are connected via a bus 3, and the bus 3 is a bidirectional data bus for transferring data such as image data and command data. It has a control bus for sending and receiving control signals associated with data transfer. The data compression/decompression device 2 includes an image buffer 4 that temporarily stores digital image data to be compressed or restored image data (expanded image data), and an image buffer 4 that temporarily stores compressed coded data or coded data that is the source of restoration. It is equipped with a code buffer 5 for storing data in the code buffer 4,
5 is connected to the bus 3 via a bus controller 6, and data buffers 4, 5 are connected to the bus 3 via a bus controller 6.
5 or data transfer from the buffers 4 and 5 to the host computer 1 side.

【0014】また、データ圧縮伸張エンジン7は、ディ
スクリートコサイン変換(DCT)などの直交変換を用
いて画像データの非可逆圧縮/伸張を行う部分であり、
以下のような手順によって画像圧縮を行う。まず、画像
データをn画素×n画素からなるブロック画像に分割し
、次に前記ブロック画像毎に2次元ディスクリートコサ
イン変換(DCT)を施し、同サイズの変換係数マトリ
クスF(u,v)(u,v=0,1,2,・・・n−1
)を求める。
The data compression/expansion engine 7 is a part that performs irreversible compression/expansion of image data using orthogonal transformation such as discrete cosine transformation (DCT).
Image compression is performed using the following steps. First, image data is divided into block images consisting of n pixels x n pixels, and then a two-dimensional discrete cosine transform (DCT) is applied to each block image, and a transform coefficient matrix F (u, v) (u ,v=0,1,2,...n-1
).

【0015】前記変換係数は実数であるため、かかる変
換係数そのままではデータの圧縮にならないので、係数
値の丸め(量子化)を行うことによって係数の表すのに
要するレベル数を減少させる。また、振幅の小さな変換
係数を切り捨てることにより圧縮率を高める。次に、量
子化を終えた係数に対して符号長の異なる符号語(可変
符号長)を割り当てる符号化を行うが、ここで、生起確
率の高い係数ほど短い符号を割り当てるようにすれば、
量子化を終えた係数を少ないデータ量に圧縮することが
でき、前記符号化処理を終えることで画像データが圧縮
される。
[0015] Since the transform coefficients are real numbers, such transform coefficients cannot compress data as they are, so the number of levels required to represent the coefficients is reduced by rounding (quantizing) the coefficient values. Furthermore, the compression ratio is increased by truncating conversion coefficients with small amplitudes. Next, encoding is performed in which code words with different code lengths (variable code length) are assigned to the quantized coefficients.If a shorter code is assigned to a coefficient with a higher probability of occurrence, then
The quantized coefficients can be compressed into a small amount of data, and the image data is compressed by completing the encoding process.

【0016】圧縮されたデータから復元画像を再生する
には、符号データを解読(復号化)して量子化データに
置き換え(逆量子化)、これに直交逆変換を施す伸張処
理を行えば良い。尚、データ圧縮伸張装置2におけるバ
ッファ4,5,バスコントローラ6,データ圧縮伸張エ
ンジン7の動作は、データ圧縮伸張装置7に内蔵された
CPU8によって制御されるようになっている。
[0016] In order to reproduce a restored image from compressed data, it is sufficient to decipher (decode) the encoded data, replace it with quantized data (inverse quantization), and perform decompression processing that performs orthogonal inverse transformation on this data. . The operations of the buffers 4 and 5, the bus controller 6, and the data compression/expansion engine 7 in the data compression/expansion device 2 are controlled by a CPU 8 built into the data compression/expansion device 7.

【0017】ところで、本実施例においては、画像デー
タ圧縮時を例とすると、図2に示すA(画像バッファ回
路4の前),B(画像バッファ回路4の後で直交変換/
直交逆変換演算部10の前),C(直交変換/直交逆変
換演算部10の後で量子化部の前)のいずれかの個所に
ダイナミックレンジ変換回路9を挿入してある。前記ダ
イナミックレンジ変換回路9は、図3に示すように、実
際の画像データ又は変換係数のビット数、又は、シフト
数及びシフト方向の制御データを入力し、データバスを
介して入力されるデータのビットシフト操作を、前記制
御データに基づいて行って、ビットシフト操作後のデー
タを出力する回路である。
By the way, in this embodiment, taking the image data compression as an example, A (before the image buffer circuit 4) and B (after the image buffer circuit 4) shown in FIG.
A dynamic range conversion circuit 9 is inserted at either a location (before the orthogonal inverse transform calculation unit 10) or C (after the orthogonal transform/orthogonal inverse transform calculation unit 10 and before the quantization unit). As shown in FIG. 3, the dynamic range conversion circuit 9 inputs actual image data or the number of bits of conversion coefficients, or control data for the number and direction of shifts, and converts the data input via the data bus. This circuit performs a bit shift operation based on the control data and outputs data after the bit shift operation.

【0018】ここで、実際の画像データ又は変換係数の
ビット数が制御情報としてダイナミックレンジ変換回路
9に入力される場合には、予め設定されている画像デー
タ又は変換係数の統一ビット数と、実際のビット数とを
比較して、シフト方向とシフト数とが決定されるが、か
かるシフト方向とシフト数との決定をCPU8に行わせ
て、シフト方向とシフト数との情報をダイナミックレン
ジ変換回路9に入力させても良いものである。
Here, when the actual number of bits of image data or conversion coefficients is input to the dynamic range conversion circuit 9 as control information, the number of bits of image data or conversion coefficients set in advance and the actual number of bits of image data or conversion coefficients are The shift direction and number of shifts are determined by comparing the number of bits of 9 may be input.

【0019】図2において、A又はBの位置、即ち、デ
ータ圧縮伸張エンジン7における直交変換/直交逆変換
(DCT/IDCT)演算部10における変換前にダイ
ナミックレンジ変換回路9が挿置される場合には、直交
変換される画像データのビット数を、所定のビット数に
一致させるようにビットシフト操作が行われる。ここで
、オリジナルの画像データのビット数をb、直交変換/
直交逆変換演算部10でオーバーフローを起こさずに演
算可能な画像データの最大ビット数をp、かかる最大ビ
ット数pの画像データを直交変換/直交逆変換演算部1
0で直交変換させて得られる変換係数のビット数をqと
し、更に、前記ビット数bの画像データを直交変換/直
交逆変換演算部10で直交変換して得られる変換係数の
ビット数をrとすると、A又はBの位置にダイナミック
レンジ変換回路9が挿置した場合、変換回路9は以下の
ようなビットシフト操作を行う。
In FIG. 2, the dynamic range conversion circuit 9 is inserted at position A or B, that is, before the conversion in the orthogonal transform/inverse orthogonal transform (DCT/IDCT) calculation unit 10 in the data compression/expansion engine 7. In this step, a bit shift operation is performed so that the number of bits of the image data to be orthogonally transformed matches a predetermined number of bits. Here, the number of bits of the original image data is b, orthogonal transformation/
The maximum number of bits of image data that can be calculated without causing an overflow in the orthogonal inverse transform calculation section 10 is p, and the image data with the maximum number of bits p is orthogonally transformed/orthogonal inverse transform calculation section 1.
The number of bits of the transform coefficient obtained by performing orthogonal transformation with 0 is q, and the number of bits of the transform coefficient obtained by orthogonally transforming the image data with the number of bits b in the orthogonal transform/orthogonal inverse transform calculation unit 10 is r. Then, when the dynamic range conversion circuit 9 is inserted at position A or B, the conversion circuit 9 performs the following bit shift operation.

【0020】・b<pであればbをMSB側に(p−b
)ビットシフトする(図4,図7参照)。 ・b=pであればbをビットシフトしない。 ・b>pであればbをLSB側に(b−p)ビットシフ
トする(図5,図6参照)。
・If b<p, move b to the MSB side (p-b
) bit shift (see Figures 4 and 7). - If b=p, do not bit shift b. - If b>p, shift b bits to the LSB side (b-p) (see FIGS. 5 and 6).

【0021】即ち、A又はBの位置にダイナミックレン
ジ変換回路9が挿置した場合には、直交変換/直交逆変
換演算部10に入力される画像データのビット数を、直
交変換/直交逆変換演算部10でオーバーフローを起こ
さずに演算可能な画像データの最大ビット数pに一致さ
せるようにビットシフトさせるものである。従って、圧
縮を行う画像データとして、前記最大ビット数pを越え
るビット数の画像が入力されても、直交変換/直交逆変
換演算部10でデータのオーバーフローが生じることが
なく、然も、変換係数のビット数を入力される画像デー
タのビット数に関係なくqに一定することになるから、
変換係数を符号化するまでの量子化等の処理条件を画像
データ(変換係数)のビット数に依存させて変化させる
必要がなく、常時一定の処理条件で量子化等の処理を行
わせることができる。
That is, when the dynamic range conversion circuit 9 is inserted at the position A or B, the number of bits of the image data input to the orthogonal transformation/orthogonal inverse transformation calculation section 10 is changed by orthogonal transformation/orthogonal inverse transformation. The bits are shifted so as to match the maximum number of bits p of image data that can be calculated without causing an overflow in the calculation unit 10. Therefore, even if an image with a bit number exceeding the maximum bit number p is input as image data to be compressed, data overflow will not occur in the orthogonal transform/orthogonal inverse transform calculation unit 10, and the transform coefficients Since the number of bits is constant at q regardless of the number of bits of the input image data,
There is no need to change the processing conditions such as quantization before encoding the transform coefficients depending on the number of bits of the image data (transform coefficients), and it is possible to always perform processing such as quantization under constant processing conditions. can.

【0022】直交変換/直交逆変換演算部10による直
交変換で得られる変換係数のビット数は、入力される画
像データのビット数に依存して変化し、変換係数のビッ
ト数が変化すると、符号化までの量子化等の処理条件を
前記変換係数のビット数変化に依存させて調整する必要
があるが、上記のようなビットシフト操作によって直交
変換/直交逆変換演算部10に入力される画像データの
ビット数を統一することで変換係数のビット数が統一さ
れるから、たとえ入力画像データのビット数が8ビット
/画素,10ビット/画素,12ビット/画素のように
種々変化しても、量子化等の処理条件を変える必要がな
くなり、異なるビット数の画像データをそのまま処理す
ることができる。
The number of bits of the transform coefficient obtained by the orthogonal transform performed by the orthogonal transform/orthogonal inverse transform calculation unit 10 changes depending on the number of bits of the input image data, and when the number of bits of the transform coefficient changes, the sign changes. Although it is necessary to adjust the processing conditions such as quantization up to quantization depending on the change in the number of bits of the transform coefficient, the image input to the orthogonal transform/orthogonal inverse transform calculation unit 10 by the bit shift operation as described above. By unifying the number of bits of data, the number of bits of conversion coefficients is unified, so even if the number of bits of input image data varies, such as 8 bits/pixel, 10 bits/pixel, or 12 bits/pixel. There is no need to change processing conditions such as quantization, and image data with different bit numbers can be processed as is.

【0023】また、画像データのビット数を、直交変換
/直交逆変換演算部10における処理可能な最大ビット
数に保つことになり、直交変換/直交逆変換演算部10
では最も大きなビット数で直交変換の演算が行われるか
ら、直交変換における演算精度を高く維持できるという
効果もある。尚、図4〜図7には、画像データのビット
シフト操作を、入力画像データのビット数bが直交変換
/直交逆変換演算部10における処理可能な最大ビット
数pよりも大きい場合(b>p)及び小さい場合(b<
p)とに分け、更に、画像データがSIGNEDデータ
として表されるか又はUNSIGNEDデータとして表
されるかによって、実際のビットシフトの様子を示して
ある。
In addition, the number of bits of the image data is maintained at the maximum number of bits that can be processed by the orthogonal transform/orthogonal inverse transform calculating section 10.
Since the orthogonal transform operation is performed using the largest number of bits, it also has the effect of maintaining high calculation accuracy in the orthogonal transform. 4 to 7, the bit shift operation of image data is performed when the number of bits b of the input image data is larger than the maximum number of bits p that can be processed in the orthogonal transform/orthogonal inverse transform calculation unit 10 (b> p) and if small (b<
Furthermore, the actual state of bit shifting is shown depending on whether the image data is represented as SIGNED data or UNSIGNED data.

【0024】例えば図4は、画像データがMSBを符号
ビットとするSIGNEDデータ(本実施例の場合、符
号ビット(MSB)+データ絶対値の表現の場合につい
て説明する。)として表される場合であって、かつ、p
>bであるときのビットシフトの様子を示してあり、こ
こで、p−b=3であるとすれば、圧縮時に画像データ
をMSB側に3ビットシフトさせて、オリジナルの画像
データのLSB側に0である3ビットを加えれば、見掛
け上は直交変換/直交逆変換演算部10で処理される画
像データのビット数はpとなり、変換後に得られる変換
係数のビット数はqとなる。このようにして圧縮時に画
像データのビット数を増大してから圧縮処理を行わせた
場合には、伸張時に直交逆変換によって復元された画像
データのLSB側3ビットを削除するように、LSB側
に3ビットシフトさせることで、オリジナルの画像デー
タのビット数に戻すことができる。
For example, FIG. 4 shows a case where the image data is expressed as SIGNED data with the MSB as the sign bit (in the case of this embodiment, the case of expression of sign bit (MSB) + data absolute value will be explained). Yes, and p
>b. Here, if p-b=3, the image data is shifted 3 bits to the MSB side during compression, and the LSB side of the original image data is shifted by 3 bits to the MSB side. If 3 bits that are 0 are added to , the number of bits of the image data processed by the orthogonal transform/orthogonal inverse transform calculation unit 10 will apparently be p, and the number of bits of the transform coefficient obtained after the transform will be q. If the number of bits of image data is increased during compression in this way and then compression processing is performed, the LSB side should be deleted so that the 3 bits on the LSB side of the image data restored by orthogonal inverse transformation are deleted during decompression. By shifting the image data by 3 bits, the number of bits of the original image data can be restored.

【0025】一方、図2におけるCの位置に、即ち、デ
ータ圧縮伸張エンジン7における直交変換/直交逆変換
演算部10における変換後の位置にダイナミックレンジ
変換回路9が挿置される場合には、直交変換によって得
られた変換係数のビット数rを、量子化が行われる前に
所定のビット数qに一致させるように以下のようなビッ
トシフト操作が行われる。
On the other hand, when the dynamic range conversion circuit 9 is inserted at the position C in FIG. The following bit shift operation is performed so that the number r of bits of the transform coefficient obtained by orthogonal transformation matches the predetermined number q of bits before quantization.

【0026】・b<pであればrをMSB側に(q−r
)ビットシフトする(図8参照)。 ・b=pであればrをビットシフトしない。 A又はBの位置にダイナミックレンジ変換回路9を挿置
した場合には、変換前の画像データのビット数を統一す
ることで、変換後の変換係数のビット数がqに統一され
るようにしたが、Cの位置にダイナミックレンジ変換回
路9を挿置する場合には、実際に得られた変換係数のビ
ット数r(画像データのビット数変化に応じて変化する
)を、所定のビット数qと同じにするようにビットシフ
ト操作を行わせるものであり、ここでも、変換係数のビ
ット数が統一されることにより、変換係数を符号化する
までの間の量子化等の処理条件を画像データのビット数
変化に対応させて変化させる必要がなくなるという効果
がある。
・If b<p, move r to the MSB side (q−r
) bit shift (see Figure 8). - If b=p, do not bit shift r. When the dynamic range conversion circuit 9 is inserted at the position A or B, the number of bits of the image data before conversion is unified, so that the number of bits of the conversion coefficient after conversion is unified to q. However, when inserting the dynamic range conversion circuit 9 at position C, the number of bits r of the actually obtained conversion coefficient (which changes according to the change in the number of bits of image data) is changed to a predetermined number of bits q. By unifying the number of bits of the transform coefficients, the processing conditions such as quantization until the transform coefficients are encoded can be adjusted to match the image data. This has the effect that it is no longer necessary to change the bit number in response to a change in the number of bits.

【0027】但し、直交変換/直交逆変換演算部10に
入力される画像データのビット数bが最大ビット数pを
越える場合には(b>p)、直交変換/直交逆変換演算
部10における直交変換中にデータのオーバーフローを
起こすことになってしまうので、図2におけるCの位置
よりもA又はBの位置にダイナミックレンジ変換回路9
を挿置することが望ましい。
However, if the number of bits b of the image data input to the orthogonal transform/orthogonal inverse transform calculation unit 10 exceeds the maximum bit number p (b>p), the orthogonal transform/orthogonal inverse transform calculation unit 10 Since data overflow will occur during orthogonal transformation, the dynamic range conversion circuit 9 is placed at position A or B rather than position C in FIG.
It is desirable to insert

【0028】上記のようにして、圧縮時にダイナミック
レンジ変換回路9により画像データ又は変換係数のビッ
ト数を統一させるビットシフト操作を行った場合には、
伸張時にビット数を元の画像データのビット数に戻す必
要があり、符号データ(圧縮データ)を復号化し逆量子
化して得た変換係数、又は、該変換係数を直交逆変換し
て得られた画像データのいずれか一方を、圧縮時のシフ
ト方向と逆方向に同じビット数だけビットシフトさせれ
ば良い(図4〜図8参照)。
As described above, when the dynamic range conversion circuit 9 performs a bit shift operation to unify the number of bits of image data or conversion coefficients during compression,
When decompressing, it is necessary to return the number of bits to the number of bits of the original image data, and it is necessary to use transform coefficients obtained by decoding encoded data (compressed data) and inverse quantization, or by orthogonal inverse transformation of the transform coefficients. Either one of the image data may be bit-shifted by the same number of bits in the opposite direction to the shift direction during compression (see FIGS. 4 to 8).

【0029】また、SIGNEDデータの説明を、符号
ビット+データの絶対値表現で行ったが、その他、1の
補数表現、2の補数表現を使用しても良く、その場合も
それぞれ上記実施例と同様の処置を行うことで同様な効
果が得られる。
Furthermore, although the SIGNED data has been explained using the absolute value representation of the sign bit + data, it is also possible to use one's complement representation or two's complement representation, and in that case, the same applies to the above embodiments. Similar effects can be obtained by performing similar treatments.

【0030】[0030]

【発明の効果】以上説明したように、本発明にかかる画
像データの圧縮伸張装置によると、入力画像データのビ
ット数変化に影響されずに、直交変換後の変換係数のビ
ット数を統一させることができるから、変換係数が符号
化されるまでの量子化等の処理条件を画像データのビッ
ト数変化に依存させて変化させる必要がなくなり、異な
るビット数の画像データをそのまま処理できるという効
果がある。
[Effects of the Invention] As explained above, according to the image data compression/expansion apparatus according to the present invention, it is possible to unify the number of bits of transform coefficients after orthogonal transformation without being affected by changes in the number of bits of input image data. This eliminates the need to change processing conditions such as quantization until the transform coefficients are encoded depending on changes in the number of bits in the image data, and has the effect of allowing image data with different numbers of bits to be processed as is. .

【0031】また、直交変換演算でオーバーフローを起
こさずに演算可能な最大ビット数に実際の画像データの
ビット数を合わせるビットシフトを行わせれば、直交変
換演算される画像データのビット数が最大に維持される
ことになり、直交変換の演算精度を高く保つことができ
るという効果もある。
[0031] Furthermore, if a bit shift is performed to match the number of bits of the actual image data to the maximum number of bits that can be calculated without overflowing in the orthogonal transform operation, the number of bits of the image data subjected to the orthogonal transform operation can be maximized. This has the effect that the calculation accuracy of orthogonal transformation can be maintained at a high level.

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

【図1】本発明にかかる画像データの圧縮伸張装置を含
むシステムの全体構成を示すブロック図。
FIG. 1 is a block diagram showing the overall configuration of a system including an image data compression/decompression device according to the present invention.

【図2】画像データの圧縮処理過程でビットシフト操作
を行う箇所を示すブロック図。
FIG. 2 is a block diagram illustrating locations where bit shift operations are performed in the process of compressing image data.

【図3】ビットシフト操作を行うダイナミックレンジ変
換回路の入力データの様子を示すブロック図。
FIG. 3 is a block diagram showing input data of a dynamic range conversion circuit that performs a bit shift operation.

【図4】画像データ(SIGNEDデータ;符号ビット
+データ絶対値)のビットシフト操作の様子を示すデジ
タルデータ状態図。
FIG. 4 is a digital data state diagram showing a bit shift operation of image data (SIGNED data; sign bit + data absolute value).

【図5】画像データ(SIGNEDデータ;符号ビット
+データ絶対値)のビットシフト操作の様子を示すデジ
タルデータ状態図。
FIG. 5 is a digital data state diagram showing a bit shift operation of image data (SIGNED data; sign bit + data absolute value).

【図6】画像データ(UNSIGNEDデータ)のビッ
トシフト操作の様子を示すデジタルデータ状態図。
FIG. 6 is a digital data state diagram showing a bit shift operation of image data (UNSIGNED data).

【図7】画像データ(UNSIGNEDデータ)のビッ
トシフト操作の様子を示すデジタルデータ状態図。
FIG. 7 is a digital data state diagram showing a bit shift operation of image data (UNSIGNED data).

【図8】変換係数データ(SIGNEDデータ;符号ビ
ット+データ絶対値)のビットシフト操作の様子を示す
デジタルデータ状態図。
FIG. 8 is a digital data state diagram showing a bit shift operation of conversion coefficient data (SIGNED data; sign bit + data absolute value).

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

1    ホストコンピュータ 2    データ圧縮伸張装置 3    バス 4    画像バッファ回路 5    符号バッファ回路 6    バスコントローラ 7    データ圧縮伸張エンジン 8    CPU 1 Host computer 2 Data compression/expansion device 3 Bus 4 Image buffer circuit 5 Code buffer circuit 6 Bus controller 7 Data compression/decompression engine 8 CPU

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】デジタル化された画像データに直交変換を
施して得られる変換係数を量子化し符号化して圧縮デー
タを得ると共に、前記圧縮データを復号化・逆量子化し
て直交逆変換を施し画像データに伸張するよう構成され
た画像データの圧縮伸張装置において、直交変換を施し
て得られた変換係数のビット数が所定ビット数に一致す
るように、直交変換前の画像データ又は直交変換して得
た変換係数のビットシフト操作を行ってから圧縮処理を
行い、伸張時には元の画像データのビット数に戻す圧縮
時と逆方向のビットシフト操作を、復号化・逆量子化に
よって得られた変換係数又は直交逆変換により復元され
た画像データにおいて行うよう構成されたことを特徴と
する画像データの圧縮伸張装置。
Claim 1: A transform coefficient obtained by performing orthogonal transformation on digitized image data is quantized and encoded to obtain compressed data, and the compressed data is decoded and inversely quantized and orthogonally inversely transformed to obtain an image. In an image data compression/decompression device configured to decompress data, image data before orthogonal transformation or after orthogonal transformation is applied so that the number of bits of a transform coefficient obtained by performing orthogonal transformation matches a predetermined number of bits. After performing a bit shift operation on the obtained transform coefficient, compression processing is performed, and during decompression, the bit shift operation in the opposite direction to that during compression returns to the number of bits of the original image data, and the conversion obtained by decoding and dequantization. 1. An image data compression/expansion apparatus, characterized in that the image data compression/expansion apparatus is configured to perform compression/expansion on image data restored by coefficients or orthogonal inverse transformation.
【請求項2】前記所定ビット数が、直交変換演算におい
てオーバーフローを起こさずに演算可能な最大ビット数
の画像データに直交変換を施して得られる変換係数のビ
ット数であることを特徴とする請求項1記載の画像デー
タの圧縮伸張装置。
2. A claim characterized in that the predetermined number of bits is the number of bits of a transform coefficient obtained by orthogonally transforming image data with the maximum number of bits that can be calculated without causing an overflow in an orthogonal transform operation. Item 1. The image data compression/expansion device according to item 1.
JP3097285A 1991-04-26 1991-04-26 Compression and expansion device for picture data Pending JPH04326667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3097285A JPH04326667A (en) 1991-04-26 1991-04-26 Compression and expansion device for picture data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3097285A JPH04326667A (en) 1991-04-26 1991-04-26 Compression and expansion device for picture data

Publications (1)

Publication Number Publication Date
JPH04326667A true JPH04326667A (en) 1992-11-16

Family

ID=14188245

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3097285A Pending JPH04326667A (en) 1991-04-26 1991-04-26 Compression and expansion device for picture data

Country Status (1)

Country Link
JP (1) JPH04326667A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007114368A1 (en) * 2006-03-30 2007-10-11 Kabushiki Kaisha Toshiba Image coding apparatus and method, and image decoding apparatus and method
WO2007116551A1 (en) * 2006-03-30 2007-10-18 Kabushiki Kaisha Toshiba Image coding apparatus and image coding method, and image decoding apparatus and image decoding method
WO2012014426A1 (en) * 2010-07-26 2012-02-02 パナソニック株式会社 Decoding method and encoding method
WO2012102023A1 (en) * 2011-01-26 2012-08-02 パナソニック株式会社 Decoding method and encoding method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007114368A1 (en) * 2006-03-30 2007-10-11 Kabushiki Kaisha Toshiba Image coding apparatus and method, and image decoding apparatus and method
WO2007116551A1 (en) * 2006-03-30 2007-10-18 Kabushiki Kaisha Toshiba Image coding apparatus and image coding method, and image decoding apparatus and image decoding method
AU2007232828B2 (en) * 2006-03-30 2011-03-10 Kabushiki Kaisha Toshiba Image coding apparatus and method, and image decoding apparatus and method
US8606028B2 (en) 2006-03-30 2013-12-10 Kabushiki Kaisha Toshiba Pixel bit depth conversion in image encoding and decoding
WO2012014426A1 (en) * 2010-07-26 2012-02-02 パナソニック株式会社 Decoding method and encoding method
WO2012102023A1 (en) * 2011-01-26 2012-08-02 パナソニック株式会社 Decoding method and encoding method

Similar Documents

Publication Publication Date Title
US5497153A (en) System for variable-length-coding and variable-length-decoding digital data for compressing transmission data
US7194128B1 (en) Data compression using principal components transformation
JPH01503588A (en) Digital image compression and transmission system using visually weighted transform coefficients
US6118900A (en) Image coding device and image decoding device for use with image disassembly
US5719961A (en) Adaptive technique for encoder and decoder signal transformation
US5729484A (en) Processes, apparatuses, and systems of encoding and decoding signals using transforms
US7406203B2 (en) Image processing method, system, and apparatus for facilitating data transmission
US6445829B1 (en) Joint cosine transforming and quantizing device and joint inverse quantizing and inverse cosine transforming device
JPH04326667A (en) Compression and expansion device for picture data
WO2001057804A2 (en) Method and apparatus for compression and decompression of digital images
JP2768260B2 (en) Image coding control method
JP3230336B2 (en) Recompression device and recompression system
US20090074059A1 (en) Encoding method and device for image data
JPH03266564A (en) Method and device for encoding picture
JPH02131671A (en) Picture data compression method
CN111225205B (en) Method and apparatus for performing intra-block prediction
JP2960446B2 (en) Image processing method
US7190847B2 (en) Method, system, and program for fractionally shifting data subject to a previous transformation
JP3781012B2 (en) Image data compression method, image data expansion method, and image data expansion circuit
JPH03192878A (en) Picture data compressor
JPH0746407A (en) Picture data compressing device and picture data restoring device
JPS63198420A (en) Picture compressing device
JPH0437367A (en) Data compression control method
KR100322705B1 (en) System and method for compressing and decompressing image
JPH07240920A (en) Compression and extension for digital image data