JPS61147692A - Data compression/expansion method - Google Patents

Data compression/expansion method

Info

Publication number
JPS61147692A
JPS61147692A JP59269920A JP26992084A JPS61147692A JP S61147692 A JPS61147692 A JP S61147692A JP 59269920 A JP59269920 A JP 59269920A JP 26992084 A JP26992084 A JP 26992084A JP S61147692 A JPS61147692 A JP S61147692A
Authority
JP
Japan
Prior art keywords
coefficient
step width
conversion
data
encoded data
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
JP59269920A
Other languages
Japanese (ja)
Inventor
Takao Omachi
大町 隆夫
Hironori Takashima
洋典 高島
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP59269920A priority Critical patent/JPS61147692A/en
Publication of JPS61147692A publication Critical patent/JPS61147692A/en
Pending legal-status Critical Current

Links

Landscapes

  • Magnetic Resonance Imaging Apparatus (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

PURPOSE:To enable to select the picture of high quality according to the demands of users, by discarding the fraction and making quantization of the conversion co-efficient obtained by vertical cross conversion against the division block using the threshold value of discarding and coefficient quantization step width which are set in advance, forming the encoded data, transmitting or storing the encoded data, and decoding it at the expansion side. CONSTITUTION:8-bit picture data of one picture element is divided horizontally into 16 picture elements and vertically 16 picture elements, and multiplication of the 2-dimension discrete cosine conversion matrix with its transposed matrix is executed at converter 1-16, the conversion coefficient matrix is obtained. The output of coefficient discarding device 1-17 is uniformly quantized at step width 1-12 by coefficient quantizing device 1-18, and allotted with variable code specified in advance by encoder 1-19. The encoded data 1-21 generated by the encoder is transferred or stored as compressed data 1-13. The expanding device takes reverse procedure; the reproduced conversion coefficient reversely converted by 2-dimension discrete reverse conversion device 2-17, and the decode picture signal 2-18 is outputted.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明はデータ圧縮伸張方式、特に画品質を選択する
事のできる画像データ圧縮伸張方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a data compression/expansion method, and particularly to an image data compression/expansion method that allows selection of image quality.

(従来技術とその問題点) 医療分野で用いられる画像にはX線や07画像等多くの
種類があるが、それらは従来フィルムの形で蓄積されて
いた。ところが、病院等においては1日当たりの発生枚
数が多(、しかもそれを数年間にわたって保管する必要
があるので膨大な量となり、収納のためのスペース、検
索に要する人手、時間が大きな問題となっている。
(Prior art and its problems) There are many types of images used in the medical field, such as X-rays and 07 images, but these have conventionally been stored in the form of film. However, in hospitals, etc., the number of sheets generated per day is large (and it is necessary to store them for several years, resulting in a huge amount, making storage space, manpower, and time required for searching) a big problem. There is.

近年になってディジタル画像処理技術、デバイス技術の
進展とともに医用画像をディジタル化して蓄積、検索を
行うことが可能となってきた。医用X線画像においては
、解像度、階調数ともに要求される精度が高く、最低で
も1024X1024X8 bitであり、いくら記憶
素子が発達したとはいえデータ量の多さが問題となって
いる。このため蓄積データ量を削減するべくデータ圧縮
技術が用いられることが多い。データ圧縮技術には大別
して予測符号化と変換符号化があるが、圧縮率として5
程度以上の高圧縮を行う場合には変換符号化が有利とさ
れている。
In recent years, with advances in digital image processing technology and device technology, it has become possible to digitize, store, and search medical images. Medical X-ray images require high accuracy in both resolution and number of gradations, at least 1024 x 1024 x 8 bits, and no matter how advanced storage elements are, the large amount of data is a problem. For this reason, data compression techniques are often used to reduce the amount of stored data. Data compression technology can be roughly divided into predictive coding and transform coding, but the compression rate is 5.
Transform coding is said to be advantageous when high compression is required.

(発明の目的) 本発明の目的は、利用者の要求に従って画品質を選択す
る事のできるデータ圧縮伸張方式を提供することにある
(Object of the Invention) An object of the present invention is to provide a data compression/expansion method that allows image quality to be selected according to user requirements.

医用画像においては、画質劣化、に対する要求基準が厳
しく、信号対雑音比(以後S/N比と呼ぶ)があまり低
くなると所見部等がぼけて実用上問題が発生する。従来
の画像データ圧縮伸張方式では、圧縮方式が固定であっ
たため、すべての画像に対し事実上問題が発生しない程
度のS/N比が得られる圧縮パラメータを設定しなけれ
ばならず、その結果として十分な圧縮率が得られなかっ
た。しかし医用画像にはその内容によって高いS/N比
を要求するものと、ある程度のS/N比で満足しうるち
のがある。例えばX線画像を例にとれば、患部がどこな
のかまだ判定がでておらず詳細な検訂を要する画像は細
部まで十分に再現するため非常に高いS/N比が要求さ
れるが、すでに患部ははっきりしており将来参考用とし
て保存しておきたい画像や、健康な人のX線画像であり
将来参照する事はまずないが、−心数年間は保存しなけ
ればならない画像等はそれほど高いS/N比は要求され
ないかわりにデータ蓄積量を低減するため高い圧縮率が
求められる。
In medical images, there are strict requirements for image quality deterioration, and if the signal-to-noise ratio (hereinafter referred to as S/N ratio) becomes too low, findings and the like become blurred, causing practical problems. In conventional image data compression/expansion methods, the compression method was fixed, so compression parameters had to be set to obtain an S/N ratio that virtually caused no problems for all images. Sufficient compression ratio could not be obtained. However, some medical images require a high S/N ratio depending on their content, while others can be satisfied with a certain S/N ratio. For example, if we take an X-ray image, images that require detailed examination because the affected area has not yet been determined require a very high S/N ratio in order to fully reproduce the details. Images where the affected area is already clearly visible and you want to save for future reference, or X-ray images of a healthy person that are unlikely to be referenced in the future, but must be saved for several years. A very high S/N ratio is not required, but a high compression ratio is required in order to reduce the amount of data stored.

(発明の構成) 本発明の画品質可変データ圧縮伸張方式は、圧縮側にお
いては画品質を利用者が設定する事により、その画品質
に対応する圧縮パラメータ(係数切り捨て閾値、係数量
子化ステップ巾)を設定し、原画像を記憶装置からブロ
ックに分割して読み出し、このブロックに対して直交変
換を施して変換係数を得、この変換係数を先に設定され
た係数切り捨て閾値と係数量子化ステップ巾を用いて切
り捨てと量子化を行い、この切り捨ておよび量子化出力
にあらかじめ設定された符号を割当てて符号化データを
作成し、符号化データを先に設定された係数切り捨て閾
値、係数量子化ステップ巾と共に伝送または蓄積し、伸
張側においては伝送または蓄積された符号化データを復
号、この復号手段の出力から伝送あるいは蓄積された係
数量子化ステップ巾と係数切り捨て閾値とを用いて変換
係数を再現し、この再現された変換係数に直交変換の逆
変換を行って画像を復元することを特徴とする。
(Structure of the Invention) The image quality variable data compression/expansion method of the present invention allows the user to set the image quality on the compression side, and sets the compression parameters (coefficient truncation threshold, coefficient quantization step width, etc.) corresponding to the image quality. ), divide the original image into blocks and read them from the storage device, perform orthogonal transformation on these blocks to obtain transformation coefficients, and apply these transformation coefficients to the previously set coefficient truncation threshold and coefficient quantization step. Perform truncation and quantization using the width, assign a preset code to the truncation and quantization output to create encoded data, and apply the encoded data to the previously set coefficient truncation threshold and coefficient quantization step. On the decompression side, the transmitted or stored encoded data is decoded, and the transform coefficients are reproduced from the output of this decoding means using the transmitted or stored coefficient quantization step width and coefficient truncation threshold. The method is characterized in that the reproduced transform coefficients are subjected to inverse orthogonal transform to restore the image.

(実施例) 以下に図面を参照して、本発明の詳細な説明する。ここ
では主な対象としてX線画像をとりあげ、直交変換とし
て2次元ディスクリート・コサイン変換をとりあげて説
明するがCT両画像を対象としてもよいし、アダマール
変換等の直交変換を用いてもよいことは明白である。
(Example) The present invention will be described in detail below with reference to the drawings. Here, we will focus on X-ray images as the main target and two-dimensional discrete cosine transform as the orthogonal transformation, but it is also possible to target both CT images and use orthogonal transformations such as Hadamard transform. It's obvious.

第1図(a)は本発明のデータ圧縮伸張方式を実現する
画像データ圧縮装置の一例を示すブロック図であり、第
1図(b)は伸張装置の一例を示すブロック図である。
FIG. 1(a) is a block diagram showing an example of an image data compression device that implements the data compression/decompression method of the present invention, and FIG. 1(b) is a block diagram showing an example of the decompression device.

第1図(a)において画像メモリ1−14に格納されて
いる画像データは、ブロックデータ読み出し1s1−1
5によって2次元ディスクリート・コサイン変換を行う
ブロック単位に読み出される。本実施例では1画素当た
り8 bitの画像データを縦16画素、横16画素の
ブロックに分割して読み出す。次に読み出されたブロッ
クデータは2次元ディスクリート・コサイン変換器1−
16において、2次元ディスクリート・コサイン変換行
列とその転置行列の乗算が行われ、変換係数行列が得ら
れる。以上の演算は有限語長でおこなわれるため演算結
果はすでに丸めによる量子化が行われている。画質選択
器1−22では、要求される画品質に対応して利用者が
選択した画品質切り替え信号に従って、変換係数のダイ
ナミックレンジの1/8160〜8/8160の値に設
定された係数切り捨て閾値(以後閾値と呼ぶ)と、変換
係数のダイナミックレンジの1/8160〜4/816
0に設定される係数量子化ステップ巾(以後ステップ巾
と呼ぶ)との組み合わせを閾値1−11、ステップ巾1
−12として出力する。2次元ディスクリート・コサイ
ン変換器1.16で得られた変換係数行列は、係数切り
捨て器1−17において閾値1.11と比較される。比
較の結果に従い閾値よりも絶対値の小さな変換係数は零
に丸められ、そうでない変換係数はその絶対値から閾値
を差し引く。ただし、直流成分に対しては上記処理は行
わず、2次元ディスクリート・コサイン変換器1−16
の出力がそのままの値で出力される。次に係“数切り捨
て器1−17の出力は、係数量子化器1−18において
ステップ巾1−12で均一量子化される。均一量子化さ
れた変換係数は、符号器1−19において変換係数発生
頻度分布に応じてあらかじめ設定された可変長符号が割
当てられる。符号器で作られた符号データ1゜21は、
パラメータ付加器1−13で閾値1−11とステップ巾
1−12が付加され圧縮データ1.13として伝送また
は蓄積される。
In FIG. 1(a), the image data stored in the image memory 1-14 is block data readout 1s1-1.
5, the data is read out in block units for two-dimensional discrete cosine transformation. In this embodiment, image data of 8 bits per pixel is divided into blocks of 16 pixels vertically and 16 pixels horizontally and read out. Next, the read block data is processed by two-dimensional discrete cosine transformer 1-
At 16, a two-dimensional discrete cosine transform matrix is multiplied by its transposed matrix to obtain a transform coefficient matrix. Since the above calculations are performed with a finite word length, the calculation results have already been quantized by rounding. In the image quality selector 1-22, a coefficient truncation threshold is set to a value between 1/8160 and 8/8160 of the dynamic range of the conversion coefficient, according to the image quality switching signal selected by the user corresponding to the required image quality. (hereinafter referred to as threshold value) and 1/8160 to 4/816 of the dynamic range of the conversion coefficient.
The combination with the coefficient quantization step width (hereinafter referred to as step width) set to 0 is the threshold 1-11 and step width 1.
Output as -12. The transform coefficient matrix obtained by the two-dimensional discrete cosine transformer 1.16 is compared with a threshold value 1.11 in a coefficient truncation unit 1-17. According to the comparison result, conversion coefficients whose absolute value is smaller than the threshold value are rounded to zero, and the threshold value is subtracted from the absolute value of other conversion coefficients. However, the above processing is not performed on the DC component, and the two-dimensional discrete cosine transformer 1-16
The output of is output as is. Next, the output of the coefficient truncation unit 1-17 is uniformly quantized in a coefficient quantizer 1-18 with a step width of 1-12. The uniformly quantized transform coefficients are transformed in an encoder 1-19. A preset variable length code is assigned according to the coefficient occurrence frequency distribution.The code data 1°21 created by the encoder is
A threshold value 1-11 and a step width 1-12 are added by a parameter adder 1-13, and the data is transmitted or stored as compressed data 1.13.

第1図(b)の伸張装置において、伝送または蓄積され
た圧縮データ2−13はパラメータ分離器2−19で、
符号化データ2−20とパラメータ(閾値2−12、ス
テップ巾2−11)とに分離される。符号化データ2−
13は復号器2−14において復号され変換係数が出力
される。係数逆量子化器2−15ではステップ巾2−1
1を復号器で得られた変換係数に乗算する。ただし直流
成分にはこの処理は行わずにそのままの値を出力する。
In the decompression device shown in FIG. 1(b), the transmitted or stored compressed data 2-13 is passed through a parameter separator 2-19.
It is separated into encoded data 2-20 and parameters (threshold value 2-12, step width 2-11). Encoded data 2-
13 is decoded by a decoder 2-14 and a transform coefficient is output. The coefficient inverse quantizer 2-15 has a step width of 2-1.
Multiply the transform coefficient obtained by the decoder by 1. However, this processing is not performed on the DC component and the value is output as is.

次に係数逆切り捨て!2−16においては、閾値2−1
2を係数逆量子化器の出力の絶対値に加えて変換係数を
再現する。ここでも直流成分および値が零である変換係
数には、上記処理を行わずにそのままの値を出力する。
Next, cut off the coefficients! In 2-16, threshold 2-1
2 is added to the absolute value of the output of the coefficient inverse quantizer to reproduce the transform coefficients. Here again, the DC component and the conversion coefficient whose value is zero are output as they are without performing the above processing.

以上の手順で再現された変換係数は、2次元ディスクリ
ート逆変換器2−17で逆変換され、復号された画像信
号2.18が出力される。
The transform coefficients reproduced through the above procedure are inversely transformed by a two-dimensional discrete inverse transformer 2-17, and a decoded image signal 2.18 is output.

第2図にブロックデータ読み出し器のブロック図を示す
。端子21に図には示していないクロック発生器からク
ロックが印加され、行アドレスカウンタ26と列アドレ
スカウンタ27を駆動する。それぞれのアドレスカウン
タの出力は端子22と23へ出力され、画像メモリー1
4から対応するアドレスの画像データを読み出し、端子
24からブロックデータメモリー28に画像データが書
き込まれる。書き込まれた画像データは端子25を介し
て2次元ディスクリート・コサイン変換器へと出力され
る。
FIG. 2 shows a block diagram of the block data reader. A clock is applied to the terminal 21 from a clock generator (not shown) to drive the row address counter 26 and column address counter 27. The output of each address counter is output to terminals 22 and 23, and the image memory 1
The image data of the corresponding address is read from 4, and the image data is written to the block data memory 28 from the terminal 24. The written image data is outputted to the two-dimensional discrete cosine transformer via the terminal 25.

第3図に2次元ディスクリート・コサイン変換器のブロ
ック図を示す。画像信号を小領域に分割したものを行列
Pで表すと、変換行列をAとしその転置行列をATとし
て、2次元ディスクリート・コサイン変換係数Fは F : APAT で与えられる。1ブロック分メモリー28からPのθ。
FIG. 3 shows a block diagram of a two-dimensional discrete cosine transformer. When an image signal divided into small regions is represented by a matrix P, a two-dimensional discrete cosine transformation coefficient F is given by F:APAT, where A is a transformation matrix and AT is its transposed matrix. θ of P from the memory 28 for one block.

k)成分を読み出し端子32から入力し、読み出し専用
メモリー34に格納されている変換行列Aの(i、j)
成分を図示していないアドレス発生器からのアドレスを
端子31から入力して読み出し、両者の積を乗算器35
Aで求める。この結果を加算器36Aでレジスタ37A
の出力を加算し再びレジスタ37Aに記憶する。以上の
操作をiとkを固定にしてjを1からnまで繰り返すと
AとPの積である行列の(i、 k)成分が求められる
ので、その値をブロックデータメモリー38の(i、 
k)に対応するアドレスに格納する。ただし、nはブロ
ックの大きさであり、jが1からはじまる時にレジスタ
37Aの内容はクリアされる。以上の操作をi、にとも
に1からnまで繰り返すことにより、AとPの積の行列
がブロックデータメモリー38に格納される。次に上記
をまったく同様にしてA−PとA−1の積を求める。す
なわち、ブロックデータメモリー38に格納されている
A−Pの(i、 j)成分と読み出し専用メモリー34
から変換行列Aの(k、 j)成分を図示していないア
ドレス発生器からのアドレスを端子31から入力して読
み出して積を求めることを1からnまでのjについて行
い、APATの(i、 k)成分を求め、それを繰り返
して変換係数行列を端子33に出力する。ここでAとA
Tは全く同じ読み出し専用メモ+7−34の読み出しを
変えることによって作り出している。また演算は有限語
長で行われるため出力はすでに量子化されている。
k) Input the components from the read terminal 32 and convert (i, j) of the transformation matrix A stored in the read-only memory 34
An address from an address generator whose components are not shown is input from a terminal 31 and read out, and the product of both is sent to a multiplier 35.
Find it with A. This result is sent to register 37A by adder 36A.
The outputs of are added and stored in the register 37A again. By repeating the above operation from 1 to n with i and k fixed, the (i, k) component of the matrix, which is the product of A and P, is obtained, and its value is stored in the block data memory 38 (i,
k). However, n is the size of the block, and when j starts from 1, the contents of the register 37A are cleared. By repeating the above operations for i and from 1 to n, a matrix of the product of A and P is stored in the block data memory 38. Next, the product of AP and A-1 is obtained in exactly the same manner as above. That is, the (i, j) components of A-P stored in the block data memory 38 and the read-only memory 34
The (k, j) component of the conversion matrix A is input from the terminal 31 and read out from the address generator (not shown) to calculate the product for j from 1 to n, and the (i, j) component of APAT is k) Calculate the components, repeat the process, and output the transformation coefficient matrix to the terminal 33. Here A and A
T is created by changing the reading of exactly the same read-only memo +7-34. Furthermore, since the calculation is performed with a finite word length, the output has already been quantized.

第4図に係数切り捨て器のブロック図を示す。端子41
から入力された変換係数は端子42を介して画品質選択
器4−22から供給される閾値とともに絶対値回路44
A、 44Bで絶対値をとり比較器45でその大きさが
比較される。また同時に減算器46で変換係数の絶対値
から閾値を差し引き、変換係数の符号を極性判定器48
で判定し、乗算器47で両者の積をとり変換係数の符号
を再現する。そして比較器49の結果により変換係数の
絶対値が閾値より小さければANDゲート49を閉じ、
零を端子43に出力し、そうでなければ先の乗算器47
の出力を端子43に出力する。また変換係数が直流成分
に相当する時は、閾値の絶対値出力を零にして2次元デ
ィスクリート・コサイン変換器の出力がそのまま端子4
3に出力される。以上の操作を式で示すと以下のように
なる。
FIG. 4 shows a block diagram of the coefficient truncator. terminal 41
The conversion coefficients input from the absolute value circuit 44 together with the threshold values supplied from the image quality selector 4-22 via the terminal 42
Absolute values are taken at A and 44B, and their magnitudes are compared by a comparator 45. At the same time, a subtracter 46 subtracts the threshold value from the absolute value of the conversion coefficient, and the sign of the conversion coefficient is determined by a polarity determiner 48.
The multiplier 47 multiplies the two to reproduce the sign of the transform coefficient. Then, if the absolute value of the conversion coefficient is smaller than the threshold according to the result of the comparator 49, the AND gate 49 is closed;
Outputs zero to the terminal 43, otherwise the previous multiplier 47
The output is outputted to the terminal 43. Also, when the conversion coefficient corresponds to a DC component, the absolute value output of the threshold value is set to zero, and the output of the two-dimensional discrete cosine converter is sent directly to the terminal 4.
3 is output. The above operation can be expressed as follows.

但し、Xは変換係数、tは閾値、sgn(・)は符号を
とり出す関数、i、jは変換係数行列の行と列番号であ
る。
However, X is a transformation coefficient, t is a threshold value, sgn(·) is a function for extracting the sign, and i and j are row and column numbers of the transformation coefficient matrix.

第6図に量子化器のブロック図を示す。端子61から入
力される切り捨てを行った後の変換係数は、端子62を
介して画品質選択器1−22から入力される量子化ステ
ップ巾により割算器64において切−量子化が行われ端
子63に出力される。ただしここでも直流成分の場合は
、量子化ステップ巾を1にし、実質的には何の処理も加
えないものが出力される。量子化ステップ巾を1.2,
4.・・9.と2のべき乗の形にすると割算器64はシ
フトするだけの処理でよい。
FIG. 6 shows a block diagram of the quantizer. The truncated transform coefficient input from the terminal 61 is truncated and quantized by the divider 64 according to the quantization step width input from the image quality selector 1-22 via the terminal 62. 63. However, here too, in the case of a DC component, the quantization step width is set to 1, and the result is output without substantially any processing. Quantization step width is 1.2,
4. ...9. If it is in the form of a power of 2, the divider 64 only needs to shift.

第5図に典型的なX線画像を例としてエントロピーを横
軸としS/Nを縦軸にとって、各種の閾値について両者
の関係をプロットした図を示す。(ステップ巾固定)ス
テップ巾も各種の値について検討した結果、閾値が変換
係数のダイナミックレンジの1/8160〜8/816
0の範囲ではS/Nとエントロピーは直線的な関係を保
っているが、それ以上の値となるとS/Nの低下のわり
にはエントロピーが低くならない事、および医用X線画
像として40dB程度以上のS/Nを確保しなければ微
妙な患部等がぼけてしまい実用上問題となることが確認
されている。したがって係数切り捨ての閾値は変換係数
のダイナミックレンジの1/8160〜8/8160に
設定するのが妥当である。
FIG. 5 shows a diagram in which the relationship between the two is plotted for various threshold values using a typical X-ray image as an example, with entropy on the horizontal axis and S/N on the vertical axis. (Fixed step width) As a result of considering various values for the step width, the threshold value was 1/8160 to 8/816 of the dynamic range of the conversion coefficient.
In the range of 0, the S/N and entropy maintain a linear relationship, but when the value exceeds this value, the entropy does not decrease even though the S/N decreases, and medical X-ray images with a value of about 40 dB or more It has been confirmed that if the S/N is not maintained, delicate affected areas will become blurred, which will pose a practical problem. Therefore, it is appropriate to set the threshold value for coefficient truncation to 1/8160 to 8/8160 of the dynamic range of the conversion coefficient.

第7図にエントロピーとS/Hの関係をステップ巾パラ
メータとして示す。ここでは閾値を固定としているが、
先にも述べた様にS/Nを40dB以上に確保l−だ上
でS/Nとエントロピーの関係が直線的である範囲を保
つように各種の閾値についても検討した結果、ステップ
巾は変換係数のダイナミックレンジの1/8160〜4
/8160に選ぶのが妥当であると確認されている。
FIG. 7 shows the relationship between entropy and S/H as a step width parameter. Here, the threshold is fixed, but
As mentioned earlier, while ensuring the S/N at 40 dB or more, we also considered various threshold values to maintain a linear relationship between S/N and entropy, and the step width was converted. 1/8160 to 4 of the dynamic range of the coefficient
It has been confirmed that selecting /8160 is appropriate.

第12図に閾値とステップ巾の3つの組み合わせに対し
て、複数のX線画像に対するS/N比と圧縮率の平均値
の一例を示す。この表から画品質選択器の一例として画
品質切り替え信号によって、(閾値、ステップ巾)の組
み合わせを(2/8160.1/8160) (4/8
160゜2/8160) (8/8160.4/816
0)の3段階に切り替える事もできる。この場合には4
8dB程度画品質が要求される場合には、閾値1−11
  ステップ巾1−12の組み合わせとして(2/81
60. 1/8160)を出力し、44dB程度の画品
質が要求される場合には(4/8160. 12/81
60)を出力し、もし41dB程度の画品質でもかまわ
ない場合には(8/8160. 4/8160)を出力
させる。このように画品質選択器おいて要求に応じて閾
値、ステップ巾を切り替える事によって、特に高い画品
質を要求されない画像に対しては圧縮率を上げる事がで
きる。
FIG. 12 shows an example of average values of the S/N ratio and compression rate for a plurality of X-ray images for three combinations of threshold value and step width. From this table, as an example of an image quality selector, the combination of (threshold value, step width) is set to (2/8160.1/8160) (4/8
160°2/8160) (8/8160.4/816
It is also possible to switch to three stages (0). In this case 4
If image quality of about 8 dB is required, threshold value 1-11
As a combination of step width 1-12 (2/81
60. 1/8160) and an image quality of about 44 dB is required, (4/8160. 12/81
60), and if an image quality of about 41 dB is acceptable, output (8/8160. 4/8160). By switching the threshold value and step width in the image quality selector in accordance with requests in this way, it is possible to increase the compression rate for images that do not require particularly high image quality.

次に、以上に述べた切り捨ておよび量子化を行った変換
係数をその発生頻度に応じたエントロピー符号化を符号
化器1−19で行う。その時各成分の係数毎に可変長の
ハフマン符号を単に割当てるだけでなく、ブロック内の
高域周波数成分は零になることが多いということを利用
して、第8図に示す様に各成分の符号化の順序をジグザ
グにして後半に零が連続するようにして、零の部分はラ
ンレングス符号化を行ったり、また1ブロツク内で途中
から最後までが全て零であれば符号化をそこで打ち切り
、ブロックの終了マークを送り符号化能率を向上させる
ことも可能である。この符号化器1−19で作られた符
号データにはパラメータ付加器で閾値、ステップ巾が付
加され圧縮データ1−13が作られる。
Next, the encoder 1-19 performs entropy encoding on the transform coefficients that have been truncated and quantized as described above in accordance with their frequency of occurrence. At that time, we not only simply allocate a variable-length Huffman code to each coefficient of each component, but also take advantage of the fact that high frequency components within a block are often zero. The encoding order is zigzag so that zeros continue in the latter half, and the zero part is run-length encoded, or if there are all zeros from the middle to the end within one block, the encoding is stopped there. , it is also possible to improve the encoding efficiency by sending an end mark of the block. A threshold value and a step width are added to the encoded data created by the encoder 1-19 by a parameter adder to create compressed data 1-13.

第9図(a)、 (b)、 (c)に圧縮データ構成の
一例を示す。1枚の画像全体は第9図(a)に示した様
にヘッダーと各ブロックの符号からなる。ヘッダーは第
9図(b)に示す構成で、画品質選択器で選ばれた閾値
とステップ巾が格納されている。各ブロック内は第9図
(c)に示す構成で、零でない係数にハフマン符号をわ
りあてたものが続き、零が続く場合はそのラン長が格納
される。途中からブロックの最後まで零が続く場合には
、零のラン長を送らずに係数列の直後にブロックの終了
マークが付加される。
An example of the compressed data structure is shown in FIGS. 9(a), (b), and (c). One entire image consists of a header and codes for each block, as shown in FIG. 9(a). The header has the structure shown in FIG. 9(b), and stores the threshold value and step width selected by the image quality selector. Each block has the configuration shown in FIG. 9(c), in which non-zero coefficients are assigned Huffman codes, and when zeros continue, their run lengths are stored. If zeros continue from the middle to the end of the block, a block end mark is added immediately after the coefficient sequence without sending a run length of zero.

この様にして得られた圧縮データは伝送路への送出やフ
ァイル装置への蓄積が行われる。
The compressed data obtained in this manner is sent to a transmission path and stored in a file device.

次に伝送または蓄積された圧縮データは、パラメータ分
離器2−19において符号データ2−20、閾値2−1
2、ステップ巾2−11に分離された後、符号データ2
−20は復号化器2−14において、符号化器1−19
で用いられたエントロピー符号化に対する復号化が行わ
れる。この出力は変換係数であるが、量子化および切り
捨て処理が行われたものである。この変換係数はパラメ
ータ分離器2−19で圧縮データから分離されたステッ
プ巾2−11を用いて、係数逆量子化器2−15で係数
逆量子化が行われる。第10図に係数逆量子化器のブロ
ック図を示す。端子101から入力された変換係数と端
子102を介して入力される量子化ステップ巾が乗算器
104において乗算され端子103に出力される。ここ
で変換係数が直流成分の場合はステップ巾を強制的に1
にして、実質的には何の処理も加えないものが出力され
る。係数逆量子化器の出力は係数巡りり捨て52−16
において、パラメータ分離器で分離された閾値を用いて
係数巡りり捨てが行われる。
Next, the transmitted or accumulated compressed data is processed by a parameter separator 2-19 into encoded data 2-20 and threshold value 2-1.
2. After being separated into step widths of 2-11, code data 2
-20 is the encoder 1-19 in the decoder 2-14.
Decoding is performed for the entropy encoding used in . This output is a transform coefficient that has been quantized and truncated. This transform coefficient is subjected to coefficient dequantization in a coefficient dequantizer 2-15 using a step width 2-11 separated from the compressed data by a parameter separator 2-19. FIG. 10 shows a block diagram of the coefficient dequantizer. A multiplier 104 multiplies the transform coefficient input from a terminal 101 and a quantization step width input via a terminal 102 and outputs the result to a terminal 103 . Here, if the conversion coefficient is a DC component, the step width is forced to 1.
The result is output without any processing. The output of the coefficient inverse quantizer is 52-16
In this step, coefficients are rounded down using the threshold values separated by the parameter separator.

第11図に係数巡りり捨て器のブロック図を示す。端子
111から入力された変換係数は絶対値回路114Aで
その絶対値がとられ、端子112から入力され絶対値回
路114Bでその絶対値がとられた閾値と加算器116
で加算され、極性判定回路118が変換係数の符号を抽
出し、乗算器117で符号を再現する。また零判定回路
は変換係数が零をとるか否かを判定し、零であればAN
Dゲート119を閉じて端子113に零を出力し、零で
ない場合には乗算器117の出力をそのまま端子113
に出力する。また端子111から入力される変換係数が
直流成分に対応するときは、閾値を零にして端子111
から入力される変換係数がそのまま端子113に出力さ
れる。2次元ディスクリートコサイン逆変換器2−17
は第3図に示した2次元ディスクリートコサイン変換器
と同じ構成で実現できる。変換係数をF、変換行列をA
、 Aの逆行列をA−1とすると、Aは正則だから (
AT)−1= (A−1)Tであるので、逆変換で得ら
れる復号画像Pはへ P : A−1・F ・(A′r)−1= A−1・F
 、 (A−1)Tで与えられる。従って読み出し専用
メモリ34の内容をAのかわりにA−1に変更すれば、
第3図の構成をそのまま用いて2次元ディスクリートコ
サイン逆変換を行うことができる。
FIG. 11 shows a block diagram of the coefficient rounding and discarding unit. The absolute value of the conversion coefficient inputted from the terminal 111 is taken by the absolute value circuit 114A, and the absolute value of the conversion coefficient inputted from the terminal 112 is taken by the absolute value circuit 114B and the adder 116.
The polarity determination circuit 118 extracts the sign of the conversion coefficient, and the multiplier 117 reproduces the sign. Also, the zero determination circuit determines whether the conversion coefficient takes zero, and if it is zero, the AN
Close the D gate 119 and output zero to the terminal 113, and if it is not zero, the output of the multiplier 117 is directly sent to the terminal 113.
Output to. In addition, when the conversion coefficient input from the terminal 111 corresponds to a DC component, the threshold value is set to zero and the terminal 111
The conversion coefficients input from the terminal 113 are output as they are to the terminal 113. 2-dimensional discrete cosine inverse transformer 2-17
can be realized with the same configuration as the two-dimensional discrete cosine transformer shown in FIG. The transformation coefficient is F, the transformation matrix is A
, If the inverse matrix of A is A-1, then A is regular, so (
AT)-1 = (A-1)T, so the decoded image P obtained by inverse transformation is P: A-1・F ・(A'r)-1= A-1・F
, (A-1) given by T. Therefore, if the contents of the read-only memory 34 are changed to A-1 instead of A,
Two-dimensional discrete cosine inverse transformation can be performed using the configuration shown in FIG. 3 as is.

以上の実施例では圧縮データのヘッダとして画品質選択
器で選択された閾値、ステップ巾の値をそのまま入れた
が、いくつかの組み合わせに番号を付け、選択された組
み合わせに対応した番号をヘッダとして付ける事もでき
る。この場合にはもちろん伸張装置側に選択番号を実際
に用いられた閾値、ステップ巾に変換する変換回路が必
要となる。また、前記実施例では符号として発生頻度に
応じてあらかじめ設定された可変長符号を用いたが、も
ちろん等長符号を用いる事もできる。
In the above example, the threshold and step width values selected by the image quality selector are directly entered as the header of the compressed data, but some combinations are numbered and the numbers corresponding to the selected combinations are used as the header. You can also attach it. In this case, of course, a conversion circuit is required on the expansion device side to convert the selection number into the actually used threshold value and step width. Further, in the above embodiment, a variable length code preset according to the frequency of occurrence is used as the code, but it is of course possible to use an equal length code.

(発明の効果) 以上に述べた様に本発明のデータ圧縮伸張方式は要求さ
れる画品質に対応する閾値、ステップ巾を選択し、用い
る事によって画像単位に要求される画品質に対応した圧
縮率でデータ圧縮および伸張を行う事ができるようにな
る。
(Effects of the Invention) As described above, the data compression/expansion method of the present invention selects and uses threshold values and step widths corresponding to the required image quality, thereby achieving compression corresponding to the required image quality for each image. Data can be compressed and expanded at a high rate.

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

第1図は本発明の一実施例を示すブロック図、第2図は
ブロックデータ読み出し器のブロック図、第3図は2次
元ディスクリート・コサイン変換器、第4図は係数切り
捨て器のブロック図、第5図はエントロピーとS/Hの
関係を係数切り捨て閾値をパラメータとして示した図、
第6図は係数量子化器のブロック図、第7図はエントロ
ピーとS/Nの関係を係数量子化ステップ巾をパラメー
タとして示した図、第8図はブロック内での符号化の順
序、第9図は符号の構成を示した図、第10図は係数逆
量子化器のブロック図、第11図は係数巡りり捨て器の
ブロック図、第12図は閾値、ステップ巾の組とS/N
比、圧縮率の関係を示す図である。 図において 1−14・・・・・画像メモリー 1−15・・・・・ブロック読み出し器1−16・・・
・・2次元ディスクリート・コサイン変換器1−17・
・・・・係数切り捨て器 1−18・・・・・係数量子化器 1−19・・・・・符号化器 1−22・・・・・画品質選択器 1−23・・・・・パラメータ付加器 2−14・・・・・復号化器 2−15・・・・・係数逆量子化器 2−16・・・・・係数巡りり捨て器 2−17・・・・・2次元ディスクリート・コサイン逆
変換22−19・・・・・パラメータ分離器 26・・・・・行アドレスカウンタ 27・・・・・列アドレスカウンタ 28・・・・・ブロックデータメモリー34・・・・・
読み出し専用メモリー 35A、35B・・・・・乗算5 36A、36B・・
・・・加算器37A、37B・・・・・レジスタ 38・・・・・ブロックデータメモリー44A、44B
・・・・・絶対値回路  45・曲比較器46・・・・
・加算器       47・・・・・乗算器48°°
°°°極性判定器     49・・・・・ANDゲー
ト64・・・・・割算器      104・曲乗算器
114A、114B・・・・・絶対値回路115・・・
・・零判定回路    116・・・・・加算器117
・・・・・乗算器 118・・・・・極性判定回路 119・・・・・ANDゲート である。 第3図 第4図 第5図 エントロピー(bit/pet) 第6図 餌 第7図 第8図 第9図 (b) 第10図 第11図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram of a block data reader, FIG. 3 is a two-dimensional discrete cosine transformer, and FIG. 4 is a block diagram of a coefficient truncation device. Figure 5 is a diagram showing the relationship between entropy and S/H using the coefficient truncation threshold as a parameter.
Fig. 6 is a block diagram of the coefficient quantizer, Fig. 7 is a diagram showing the relationship between entropy and S/N using the coefficient quantization step width as a parameter, and Fig. 8 is a diagram showing the coding order within a block. Figure 9 shows the configuration of the code, Figure 10 is a block diagram of the coefficient inverse quantizer, Figure 11 is a block diagram of the coefficient rounding and discarding unit, and Figure 12 shows the combination of threshold value, step width, and S/ N
It is a figure showing the relationship between a ratio and a compression rate. In the figure, 1-14... Image memory 1-15... Block reader 1-16...
・2-dimensional discrete cosine converter 1-17・
... Coefficient truncation device 1-18 ... Coefficient quantizer 1-19 ... Encoder 1-22 ... Image quality selector 1-23 ... Parameter adder 2-14...Decoder 2-15...Coefficient inverse quantizer 2-16...Coefficient rounding and discarding unit 2-17...Two-dimensional Discrete cosine inverse transform 22-19...Parameter separator 26...Row address counter 27...Column address counter 28...Block data memory 34...
Read-only memory 35A, 35B...Multiplication 5 36A, 36B...
... Adder 37A, 37B ... Register 38 ... Block data memory 44A, 44B
...Absolute value circuit 45, song comparator 46...
・Adder 47... Multiplier 48°°
°°° Polarity determiner 49...AND gate 64...Divider 104/Music multiplier 114A, 114B...Absolute value circuit 115...
...Zero judgment circuit 116...Adder 117
. . . Multiplier 118 . . . Polarity determination circuit 119 . . . AND gate. Figure 3 Figure 4 Figure 5 Entropy (bit/pet) Figure 6 Bait Figure 7 Figure 8 Figure 9 (b) Figure 10 Figure 11

Claims (1)

【特許請求の範囲】[Claims] 圧縮時には、利用者が必要に応じて画品質を設定するこ
とにより、該画品質に対応する係数切り捨て閾値および
係数量子化ステップ巾を設定し、原画像を記憶装置から
ブロック単位で読み出し、該ブロック単位に直交変換を
施して得られる変換係数を該係数切り捨て閾値と係数量
子化ステップ巾を用いて係数切り捨ておよび量子化を行
い、該切り捨ておよび量子化された変換係数にあらかじ
め設定された符号を割当てて符号化データを作成し、該
符号化データと該係数切り捨て閾値と該係数量子化ステ
ップ巾を伝送または蓄積し、伸張時には伝送または蓄積
された該符号化データを復号し、伝送または蓄積された
該係数切り捨て閾値と該係数量子化ステップ巾を用いて
変換係数を再現し、該再現された変換係数に該直交変換
の逆変換を行って画像を復元することを特徴とするデー
タ圧縮伸張方式。
At the time of compression, the user sets the image quality as necessary, sets the coefficient truncation threshold and coefficient quantization step width corresponding to the image quality, reads the original image from the storage device in blocks, and processes the blocks. The transform coefficients obtained by performing orthogonal transformation on the unit are truncated and quantized using the coefficient truncation threshold and the coefficient quantization step width, and a preset sign is assigned to the truncated and quantized transform coefficients. create encoded data, transmit or store the encoded data, the coefficient truncation threshold, and the coefficient quantization step width; decode the transmitted or accumulated encoded data during decompression; A data compression/expansion method characterized in that a transform coefficient is reproduced using the coefficient truncation threshold and the coefficient quantization step width, and an inverse transform of the orthogonal transform is performed on the reproduced transform coefficient to restore an image.
JP59269920A 1984-12-21 1984-12-21 Data compression/expansion method Pending JPS61147692A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59269920A JPS61147692A (en) 1984-12-21 1984-12-21 Data compression/expansion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59269920A JPS61147692A (en) 1984-12-21 1984-12-21 Data compression/expansion method

Publications (1)

Publication Number Publication Date
JPS61147692A true JPS61147692A (en) 1986-07-05

Family

ID=17479054

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59269920A Pending JPS61147692A (en) 1984-12-21 1984-12-21 Data compression/expansion method

Country Status (1)

Country Link
JP (1) JPS61147692A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63109680A (en) * 1986-10-27 1988-05-14 Nec Corp Hybrid encoder for moving image signal
JPS63111790A (en) * 1986-10-30 1988-05-17 Nec Corp Decoder for moving image signal
JPS63121373A (en) * 1986-11-10 1988-05-25 Kokusai Denshin Denwa Co Ltd <Kdd> Coding system for conversion coefficient
JPH01135193A (en) * 1987-11-20 1989-05-26 Nec Corp Still picture transmitter
JPH01267781A (en) * 1988-04-20 1989-10-25 Konica Corp Method for compressing multilevel image data
JPH0448471A (en) * 1990-06-13 1992-02-18 Matsushita Electric Ind Co Ltd Recording and reproducing device
JPH04290087A (en) * 1991-03-19 1992-10-14 Oki Electric Ind Co Ltd In-frame encoder/decoder
WO1995022228A1 (en) * 1994-02-15 1995-08-17 Sony Corporation Method and device for encoding image signal
JP2001143063A (en) * 1999-11-04 2001-05-25 Neucore Technol Inc Image processor
JP2013051522A (en) * 2011-08-30 2013-03-14 Honda Elesys Co Ltd Image compression device, image compression method, and image compression program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5389315A (en) * 1977-01-17 1978-08-05 Matsushita Electric Ind Co Ltd Orthogonal conversion decoding circuit
JPS5588479A (en) * 1978-12-26 1980-07-04 Nippon Telegr & Teleph Corp <Ntt> Picture signal coding process system
JPS5875390A (en) * 1981-07-22 1983-05-07 ブリティシュ・テレコミュニケーションズ・パブリック・リミテッド・カンパニ Video transmitting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5389315A (en) * 1977-01-17 1978-08-05 Matsushita Electric Ind Co Ltd Orthogonal conversion decoding circuit
JPS5588479A (en) * 1978-12-26 1980-07-04 Nippon Telegr & Teleph Corp <Ntt> Picture signal coding process system
JPS5875390A (en) * 1981-07-22 1983-05-07 ブリティシュ・テレコミュニケーションズ・パブリック・リミテッド・カンパニ Video transmitting method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0529196B2 (en) * 1986-10-27 1993-04-28 Nippon Electric Co
JPS63109680A (en) * 1986-10-27 1988-05-14 Nec Corp Hybrid encoder for moving image signal
JPS63111790A (en) * 1986-10-30 1988-05-17 Nec Corp Decoder for moving image signal
JPS63121373A (en) * 1986-11-10 1988-05-25 Kokusai Denshin Denwa Co Ltd <Kdd> Coding system for conversion coefficient
JPH01135193A (en) * 1987-11-20 1989-05-26 Nec Corp Still picture transmitter
JPH01267781A (en) * 1988-04-20 1989-10-25 Konica Corp Method for compressing multilevel image data
JPH0448471A (en) * 1990-06-13 1992-02-18 Matsushita Electric Ind Co Ltd Recording and reproducing device
JPH04290087A (en) * 1991-03-19 1992-10-14 Oki Electric Ind Co Ltd In-frame encoder/decoder
WO1995022228A1 (en) * 1994-02-15 1995-08-17 Sony Corporation Method and device for encoding image signal
EP0699003A1 (en) * 1994-02-15 1996-02-28 Sony Corporation Method and device for encoding image signal
EP0699003A4 (en) * 1994-02-15 1999-10-06 Sony Corp Method and device for encoding image signal
JP2001143063A (en) * 1999-11-04 2001-05-25 Neucore Technol Inc Image processor
JP2013051522A (en) * 2011-08-30 2013-03-14 Honda Elesys Co Ltd Image compression device, image compression method, and image compression program

Similar Documents

Publication Publication Date Title
TWI431948B (en) Efficient coding and decoding of transform blocks
EP0665512B1 (en) An image processing method and apparatus
KR20080044835A (en) Adaptive coding and decoding of wide-range coefficients
JPS61147692A (en) Data compression/expansion method
US5343539A (en) Method for spatial domain image compression
US6396955B1 (en) Image compression and expansion device
JPS61135285A (en) Data expander
KR940009117B1 (en) Method and apparatus for recovery of image data
JPS61135286A (en) Picture data compressor
JPS61123280A (en) Image data compressing device
JPS61149126A (en) Medical image data compression and expansion system
JP3559314B2 (en) Image compression device
JPS61135283A (en) Expander for medical application picture data
JPH0556271A (en) Reverse quantizing method and image data restoring device
JPH04971A (en) Picture encoding system
Bone Orthonormal fractal image encoding using overlapping blocks
JPH1188183A (en) Wavelet converter, its method, wavelet inverse converter, its method, image coder, its method, image decoder and its method
JP2887843B2 (en) Image data restoration method and apparatus
JPH04274674A (en) Data converter
JPH04271664A (en) Picture data compressor and picture data decoder
JP2710135B2 (en) Adaptive coding between frames / intra-frame
JPS63308474A (en) Picture data compressing device
JPH07222149A (en) Method and device for processing picture
JP3175324B2 (en) Image compression device
JPH02171084A (en) System and device for coding picture signal