JP2811304B2 - Method of compressing gradation image data - Google Patents

Method of compressing gradation image data

Info

Publication number
JP2811304B2
JP2811304B2 JP7977587A JP7977587A JP2811304B2 JP 2811304 B2 JP2811304 B2 JP 2811304B2 JP 7977587 A JP7977587 A JP 7977587A JP 7977587 A JP7977587 A JP 7977587A JP 2811304 B2 JP2811304 B2 JP 2811304B2
Authority
JP
Japan
Prior art keywords
code
zero
transform coefficient
block
transform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP7977587A
Other languages
Japanese (ja)
Other versions
JPS63246977A (en
Inventor
久 米川
寛 竹内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP7977587A priority Critical patent/JP2811304B2/en
Priority to US07/176,769 priority patent/US4922273A/en
Publication of JPS63246977A publication Critical patent/JPS63246977A/en
Application granted granted Critical
Publication of JP2811304B2 publication Critical patent/JP2811304B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Image Processing (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はX線写真やCT画像などの医用画像のような階
調画像のデータを圧縮する階調画像データの圧縮方法に
関する。 (発明の背景) デジタル技術の進歩に伴ない、階調画像をデジタル化
して保存、伝送したり、種々のデジタル画像処理を施し
たりすることが頻繁に行なわれるようになった。しかし
ながら、階調画像は2値画像に比べて情報量が多く、従
って階調画像をデジタル化したときのデータ量の多さが
問題となっている。特に医用画像では、デジタル化する
ときの画素数および各画素に要するビット数が、たとえ
ば胸部X線写真では400万画素、8〜10ビットと膨大で
あり、データの保存や転送を行なう上で効率が悪い。 そこで今日、医用画像を含む階調画像の膨大なデータ
を圧縮してコンパクト化するデータ圧縮技術が脚光を浴
びている。 データ圧縮技術は大きく分けて可逆圧縮と非可逆圧縮
とに分類されるが、可逆圧縮では1/2〜1/3程度の低い圧
縮率しか望めないため、1/5以上の高い圧縮率が得られ
る非可逆圧縮方式、特に変換符号化方式が注目されてい
る。 変換符号化とは、画像全体を小さなブロックに分割し
ブロック単位に直交変換を施し、これにより得られた変
換係数を量子化し、符号化する非可逆圧縮方式の1つで
あり、階調画像を圧縮するのに最も適した圧縮方法であ
る。 変換符号化において、変換係数の交流成分の分布は、
ゼロにピークを持つガウス分布に近似されることが知ら
れており、このような分布を持つ変換係数の量子化を量
子化判定レベルにゼロを含むMid−Riser型量子化と,量
子化出力レベルにゼロを含むMid−trace型量子化とに分
類した場合、Mid−trace型量子化の方がブロック内のラ
ンダムノイズが少なくてより好ましいことが報告されて
いる。しかしながら、Mid−trace型の量子化器を用いた
場合、圧縮率を高くすると成分固有のパターン画像が出
現するという欠点があり、拡大、階調、周波数処理など
の画像処理をしたとき不自然な画像が現われて復元画像
の忠実度が低くなるという問題がある。 ところで、Mid−trace型量子化を行う場合の復元画像
の画質は、圧縮時の量子化段階でゼロに量子化された変
換係数交流成分の個数と強い相互関係があることがわか
る。すなわち、復元画像の各ブロックの画像は、量子化
時にゼロ以外に量子化された変換係数交流成分の成分固
有のパターンの加重和となっているため、ゼロ以外に量
子化される変換係数交流成分の個数が少ない、言い換え
ると、ゼロに量子化される個数が多い場合は成分固有の
パターン画像が復元画像内に出現する。そこで成分固有
のパターン画像の出現を抑制するには、量子化出力レベ
ルがゼロとなる量子化判定レベルの量子化幅を狭めてゼ
ロに量子化される変換係数交流成分の個数を少なくす
る。言い換えると、ゼロ以外に量子化される個数を多く
すればよいが、そううすると符号化時の平均符号長が増
加するため圧縮率が低下してしまう。 従って、ゼロに量子化される変換係数交流成分の発生
頻度を各ブロックごとに調べる。ブロック内の全体の変
換係数交流成分の個数は決まっているので、ゼロ以外の
個数を調べることと同様である。これにより成分固有の
パターン画像が表れやすいブロックを検出し検出された
ブロックのみ量子化幅を狭めることによりパターン画像
の出現を抑制した復元画像を得ることができることに気
がついた。 (発明の目的および構成) 本発明は上記の点にかんがみてなされたもので、Mid
−trace型の量子化を行なう変換符号化方式を用いて医
用画像を含む階調画像のデータを圧縮するに当り、成分
固有のパターン画像の発生を防ぎ、高圧縮率で高画質な
復元画像を得ることを目的とし、この目的を達成するた
めに、デジタル化された階調画像データを複数のブロッ
クに分割し、該ブロック毎に直交変換を行って得られる
変換係数を量子化し符号化する階調画像データの圧縮方
法において、前記変換係数のとりうる値の範囲を予め定
められた複数の区間に分割し、前記分割された少なくと
も1つの区間における前記変換係数の発生頻度を求め、
前記求められた発生頻度に基づいて前記ブロック毎に変
換係数の量子化幅を決定し、圧縮を行うようにしたもの
である。 (実施例) 以下本発明を図面に基づいて説明する。 第1図は本発明による階調画像データ圧縮方法の一実
施例を示すブロック図である。 図においてフレームメモリ1には、圧縮対象となる階
調画像データ(本例では、1画素当りのビット数を8ビ
ットとする)が格納されており、まず読み出し装置2が
フレームメモリ1から画像データをブロック単位に読み
出す(本例では、ブロックサイズをライン方向、カラム
方向にそれぞれ16画素とする)。読み出されたブロック
データは、2次元ディスクリートコサイン変換(2D−DC
T)装置3によりコサイン変換され1ブロック分256個の
変換係数を得る。 次に、こうして得られた256個の変換係数のうち1個
の直流成分を除く255個の変換係数交流成分は、量子化
装置4により基本量子化幅woで一様量子化され、各変換
係数ごとに固定長符号である係数番号と極性番号のペア
を得る。係数番号と極性番号のペアは、ブロックバッフ
ァメモリ6に一時的に格納されるとともに、係数番号は
クラス分け装置5へ送られる。 クラス分け装置5では、量子化装置4から送られてく
る1ブロック分の係数番号と、端子52から入力される圧
縮率パラメータによりクラス分け処理を行ない、符号化
装置7へクラス番号を出力する。符号装置7はクラス分
け装置5から送られてくるクラス番号を読み込むと、ブ
ロックバッファメモリ6より1ブロック分の係数番号と
極性番号のペアを読み出し、変換係数交流成分の固定長
符号(番号)を可変長符号に変換して端子8へ出力す
る。符号データは端子8から送信されるかメモリへ格納
される。 第2図は量子化装置4の一例である。 まず端子41から1ブロック分の変換係数のうち直流成
分を除く255個の変換係数交流成分が入力される。255個
の変換係数は、絶対値回路42により絶対値がとられると
同時に、極性判定回路43により変換係数の正負の判定が
行なわれる。極性判定回路43は判定結果を極性番号とし
て端子47に出力する。ここでは、極性番号を1ビット符
号で表わし、変換係数が負の場合は“1"、正の場合は
“0"とする。 一方、絶対値回路42から出力された変換係数の絶対値
は除算回路44により基本量子化幅woで割り算される。割
り算結果は切り捨て回路45によって小数点以下の切り捨
てが行なわれ(この結果を係数番号と呼ぶ)、端子46お
よび端子47に出力される。端子46はクラス分け装置5に
接続されており、端子47はブロックバッファメモリ6に
接続されている。端子41から入力された1つの変換係数
に対して得られる極性番号と係数番号は2つで1組のペ
アをなし、端子47よりブロックバッファメモリ6へ一時
的に格納される。 一方、各ブロックの直流成分は充分小さい量子化幅w
dcで一様量子化されるか、もしくは量子化を行なわずに
他の255個の変換係数交流成分と同様にブロックバッフ
ァメモリ6へ一時的に格納される。 第3図に直流成分を除いた変換係数交流成分の量子化
の様子を示す。 横軸が変換係数の値であり、縦軸は変換係数の発生頻
度である。第3図(a)により示される番号列は切り捨
て回路45から出力される係数番号(k)列であり、第3
図(b)により示される番号列は極性判定回路43から出
力される極性番号(j)列である。 次に第4図はクラス数を4とした場合のクラス分け装
置5の一例である。 端子51は第2図の端子46と接続されており、量子化装
置4から出力される係数番号がここから入力される。こ
こで係数番号をk(k=0,1,2,3,4…)で表わすと、端
子51から入力された係数番号kはカウンタ制御LUT53に
より4ビットの第1次カウンタ制御コードCi(i=0,1,
2,3)に変換される。 第5図(イ)にカウンタ制御LUT53の一例を示す。 一方、端子52からは、ユーザーが端末(図示せず)か
ら入力した圧縮率パラメータPが入力される。本例の場
合圧縮率は2通り用意されており(P=0,1)、Pが大
きいほど圧縮率が高くなることを意味する。端子52から
入力された圧縮率パラメータPは、圧縮率制御LUT54に
より、4ビットの圧縮率制御コードepに変換される。第
5図(ロ)には圧縮制御LUT54の一例を示す。 次にOR回路55は第1次カウンタ制御コードciと圧縮率
制御コードepとを取り込み、両者の論理和である4ビッ
トの第2次カウンタ制御コードdiを求める。 di← ci∪ ep 次にカウンタ制御回路56は第2次カウンタ制御コード
diを取り込み、カウンタ回路57内のカウンタ0からカウ
ンタ3までの4個のカウンタをdiの各ビットのon/off状
態によって制御する。第2次カウンタ制御コードdiの各
ビットは下位ビットから順にカウンタ0、カウンタ1、
カウンタ2、カウンタ3に対応づけされており、ビット
がon(=1)の場合はカウンタ制御回路56が対応するカ
ウンタを+1カウントアップし、ビットがoff(=0)
の場合は対応するカウンタのカウントアップを行なわな
い。第5図(ハ)にdiの各ビットと各カウンタとの対応
関係を示す。なお、ci,epについても各カウンタと同様
の対応関係が成立する。 第6図は、圧縮率パラメータPもしくは圧縮率制御コ
ードepと各カウンタの動作範囲の関係を示す図である。
各圧縮率パラメータP(各ep)に対して、各カウンタは
第6図の矢印で示される範囲の係数番号kについてのみ
動作する。ただし、本例では、カウンタ3はPの値にか
かわらず、すべての係数番号kに対して動作するため、
1ブロック分のクラス分け作業が終了をカウンタ3によ
り知ることができる。従って他にカウンタ3と同様のカ
ウンタを所有する場合はカウンタ3を省略してもよい。 次に、比較回路58の比較処理手順を第7図のフローチ
ャートに示す。 比較回路58は常にカウンタ3のカウント値をチェック
しており(F−1)、カウント値が255に満たないとき
は比較回路58は待機状態にある。カウンタ3のカウント
値が255になると、比較回路58はカウント閾値LUT59から
出力されるカウント閾値Spを読み込む。第5図(ニ)に
カウント閾値LUT59の一例を示す。カウント閾値Sp
は、端子52から入力される圧縮率パラメータPに対して
発光される、カウント値に対する閾値である。比較回路
58がカウント閾値Spを読み込むと、このSpとカウンタ2
のカウンタ値の比較を行なう(F−2)。その結果、
(1) もしカウント閾値Spがカウンタ2のカウント値
以上であればクラス番号mを3にセットし(F−3)、
Spがカウンタ2のカウント値より小さければSpとカウン
タ1のカウント値とを比較する(F−4)。 (2) カウント閾値Spとカウンタ1のカウント値との
比較において、Spがカウンタ1のカウント値以上であれ
ば、クラス番号mを2にセットし(F−5)、Spがカウ
ンタ1のカウント値より小さければSpとカウンタ0のカ
ウント値を比較する(F−6)。 (3) カウント閾値Spとカウンタ0のカウント値との
比較において、Spがカウント値以上であれば、クラス番
号mを1にセットし(F−7)、Spがカウンタ0のカウ
ント値より小さければ、クラス番号mを0にセットする
(F−8)。 (4) クラス番号mがセットされると、端子510より
クラス番号mを出力して(F−9)、1ブロック分のク
ラス分け作業を終了し、カウンタ0からカウンタ3まで
の各カウンタのカウント値をゼロクリアする(F−1
0)。比較回路58から出力されるクラス番号mは、符号
化時にランレングス符号化される変換係数の範囲を示す
パラメータとなっている。すなわち、クラス番号がmで
あるブロックの255個の交流成分に対して、変換係数の
絶対値が0以上Am以下の領域内に存在する変換係数はラ
ンレングス符号化されることを意味する(第6図参
照)。 第8図は符号化装置7の一例である。 クラス分け装置5が1ブロック分のクラス分け作業を
終了すると、符号化装置7は端子79(端子79は第4図の
端子510と接続されている)からクラス番号mを読み込
み、量子化LUT73に格納されている4つの量子化テーブ
ルから量子化に用いるテーブルを1つ選択すると同時に
データ読み出し回路72にブロックバッファメモリ6から
のデータ読み出し指令を送る。データ読み出し回路72は
ブロックバッファメモリ6と接続されている端子71から
直流成分データと、255組の係数番号kと極性番号j
(j=0or1)のペアとを読み込む。読み込まれたデータ
が直流成分であれば、端子78からデータを出力し、読み
込まれたデータが係数番号kと極性番号jのペアであれ
ばクラス番号mにより選択された量子化LUT73内の量子
化テーブルによって係数番号kおよび極性番号jを符号
番号lに変換する。 第9図には量子化LUT73内の量子化テーブルの一例を
示す。 本例は最終的量子化状態が第10図に示す一様量子化と
なるように、係数番号kを均等に区分けした例である
が、このほかに係数番号kを不均等に区分けすることも
可能であり、基本量子化幅Woの整数倍の最終的量子化幅
で一様でない量子化を行なうことができる。 次に交流成分の符号化手順の一例を第11図のフローチ
ャートに示す。 まず量子化LUT73より出力される符号番号lが内部に
符号通過カウンタ74aを有するゼロ判定回路74に送られ
る(P−1)。符号通過カウント74aは符号番号lを受
信すると、符号通過カウント値yを+1カウントアップ
し(P−2)、ゼロ判定回路74が符号番号lのゼロ判定
を行なう(P−3)。もしlがゼロであればゼロカウン
タ75のゼロカウント値zを+1カウントアップした後
(P−4)、符号通過カウント値yが255になったかど
うかを判定する(P−11)。一方、lがゼロでなけれ
ば、ゼロカウント値zがゼロかどうかを判定し(P−
5)、ゼロであれば符号番号lを符号LUT76によって可
変長符号hlに変換して(P−6)端子78からhlを出力し
た後(P−7)符号通過カウント値yが255になったか
どうかを判定する(P−11)。もしゼロカウント値zが
ゼロでなければゼロカウント値zを符号LUT77によって
可変長符号rzに変換し(P−8)、ゼロカウント値zを
ゼロクリアした後(P−9)、rzを端子78から出力し
(P−10)、符号通過カウント値yが255になったかど
うかを判定する(P−11)。 符号通過カウント値yの判定において、もしカウント
値yが255でなければ符号番号lを読み込むステップ
(P−1)にもどって上記の処理を繰り返し行なう。も
し符号通過カウント値yが255であれば(P−11)、ゼ
ロカウント値zがゼロであるかどうかを判定し(P−1
2)、ゼロであれば符号通過カウント値yをゼロクリア
して(P−13)、1ブロック分の変換係数の符号化作業
を終了する。ゼロカウント値zがゼロでなければ符号変
換ステップ(P−8)と、ゼロカウント値zのゼロクリ
アステップ(P−9)と、端子78への可変長符号rz出力
ステップ(P−10)を経た後符号通過カウント値yをゼ
ロクリアし(P−13)1ブロック分の変換係数の符号化
作業を終了する。 第12図(イ)は符号LUT76の一例を示す。 本例は各クラスに共通のハフマン符号hlを用いた例で
ある。本実施例のように一様量子化を行なう場合は各ク
ラスごとに最適なハフマン符号hlを用いたときと各クラ
スに共通のハフマン符号hlを用いたときとで、圧縮率に
大きな違いがないため、各クラスに共通のハフマン符号
hlを用いることによりよりシンプルな装置化が可能とな
る。 第12図(ロ)は符号LUT77の一例を示す。 本例はゼロカウント値zに対して割り当てられるラン
レングス符号に各クラス共通のB1符号を用いた例であ
る。階調画像データを本方式で圧縮する場合の各ゼロラ
ン長の頻度分布はB1符号に適した指数関数適分布となる
ため、B1符号を用いることにより高い圧縮率を得ること
が可能となる。なお第12図(イ)および(ロ)において
Cおよびは0か1の値をとり、≠Cを満足する1ビ
ットの符号である。 第13図は第8図におけるデータ読み出し回路72のデー
タ読み出し順序を示す。 階調画像の変換係数は高周波成分ほど振幅が小さくな
る傾向が強いため、ゼロに量子化される成分の発生する
確立も高周波成分ほど高くなる。従って、第13図(イ)
もしくは(ロ)に示すように、低周波側から高周波方向
に向かって符号化すれば長いゼロランが発生する確立が
高まり、有効なランレングス符号化を行なうことができ
る。 第14図に符号構成の一例を示す。 第14図(イ)は1フレームの画像全体を圧縮した結果
の符号例であり、ヘッダ部とそれに続く各ブロックの符
号と、データ終了符号から成る。 第14図(ロ)はヘッダ部構成の一例であり、ブロック
サイズ(本例では16)、画像ライン方向のブロック数、
画像カラム方向のブロック数および圧縮率パラメータP
が格納されている。 第14図(ハ)は各ブロックの符号構成の一例であり、
クラス番号m(本例では2ビットの固定長符号)、直流
成分符号(固定長符号)、それに続く交流成分符号列
(可変長符号列)より成る。交流成分符号列は同図
(ニ)に示すようなq個(1≦q≦255)の符号より成
る係数符号列(可変長符号列hl1,hl2,…hlq)と同図
(ホ)に示すようなラン長符号(可変長符号rz)とが交
互に並ぶ構成となる。 以下に本実施例に用いた各種パラメータの一例を示
す。 基本量子化幅w0=0.5 A0=0.5,A1=1.0 A2=1.5,A3=2.0 S0=200,S1=225 なお上記パラメータは原画像の画素当りの情報量がn
ビット(本例ではn=8)でブロックサイズがN×N
(本例ではN=16)のとき、ブロック画像をf(x,
y)、変換係数行列をF(u,v)で表わした2次元ディス
クリートコサイン変換式(次式に示す)をフローティン
グポイントで計算した場合の値である。 また本発明においては、2次元ディスクリートコサイ
ン変換装置3の代りに、他の直交変換装置、たとえば2
次元のディスクリートなアダマール変換装置、スラント
変換装置などを用いてもよい。また本発明ではブロック
サイズを16×16のサイズに限定するものではなく、8×
8、32×32、64×64などのサイズでも適応可能であり、
また原画像の1画素当りのビット数も8ビットに限定す
るものではない。またクラス分け装置5において、特定
区間内の係数番号kをカウントする際、特定区間を多数
設けず、1つの特定区間内に存在する係数番号kの個数
の大小に基づいてクラス分けを行なうことも可能であ
る。また、本発明におけるクラス分けパラメータを他の
クラス分けパラメータと組合せてクラス分けを行うこと
も可能である。 (発明の効果) 以上説明したように、本発明においては、変換係数の
とりうる値の範囲を予め定められた複数の区間に分割
し、分割された少なくとも1つの区間における変換係数
の発生頻度を用いることにより、復元画像の画質、特に
Mid−trace型量子化の欠点である成分固有のパターン画
像の発生度合に基づいた量子化が可能となり、たとえば
頻度の高いブロックは頻度を低くするように量子化幅を
決めることにより、パターン画像の発生を抑制し、高画
質の復元画像を得ることができる。
Description: TECHNICAL FIELD The present invention relates to a method of compressing gradation image data for compressing gradation image data such as medical images such as X-ray photographs and CT images. BACKGROUND OF THE INVENTION With the advancement of digital technology, digitized gradation images are frequently stored, transmitted, and subjected to various digital image processings. However, a tone image has a larger amount of information than a binary image, and thus has a problem of a large amount of data when the tone image is digitized. In particular, in the case of medical images, the number of pixels and the number of bits required for each pixel when digitizing are enormous, for example, 4 million pixels and 8 to 10 bits in a chest radiograph, which is an efficient method for storing and transferring data. Is bad. Therefore, today, a data compression technique for compressing enormous data of a gradation image including a medical image to make it compact has been spotlighted. Data compression technologies can be broadly classified into lossless compression and irreversible compression.However, lossless compression can only achieve a low compression ratio of about 1/2 to 1/3, so a high compression rate of 1/5 or more can be obtained. Irreversible compression schemes, especially transform coding schemes, are attracting attention. Transform coding is an irreversible compression method that divides the entire image into small blocks, performs orthogonal transform on a block basis, quantizes the resulting transform coefficients, and encodes them. This is the most suitable compression method for compression. In transform coding, the distribution of the AC component of the transform coefficient is
It is known that it is approximated to a Gaussian distribution having a peak at zero, and the quantization of the transform coefficient having such a distribution is performed by Mid-Riser type quantization including zero in the quantization determination level, and the quantization output level. It has been reported that when classified into Mid-trace type quantization that includes zero, the Mid-trace type quantization has less random noise in the block and is more preferable. However, when a Mid-trace type quantizer is used, there is a drawback that when the compression ratio is increased, a component-specific pattern image appears, which is unnatural when performing image processing such as enlargement, gradation, and frequency processing. There is a problem that the image appears and the fidelity of the restored image is reduced. By the way, it is understood that the image quality of the restored image in the case of performing the Mid-trace type quantization has a strong correlation with the number of the transform coefficient AC components quantized to zero in the quantization stage at the time of compression. That is, since the image of each block of the restored image is a weighted sum of a pattern unique to the component of the transform coefficient AC component quantized to a value other than zero at the time of quantization, the transform coefficient AC component quantized to a value other than zero is calculated. Is small, in other words, when the number quantized to zero is large, a component-specific pattern image appears in the restored image. Therefore, in order to suppress the appearance of the component-specific pattern image, the number of transform coefficient AC components quantized to zero is reduced by narrowing the quantization width of the quantization determination level at which the quantized output level is zero. In other words, the number to be quantized may be increased to a value other than zero, but in such a case, the average code length at the time of encoding increases, so that the compression ratio decreases. Therefore, the frequency of occurrence of the transform coefficient AC component quantized to zero is checked for each block. Since the total number of conversion coefficient AC components in the block is fixed, it is the same as checking the number other than zero. As a result, it has been found that it is possible to obtain a restored image in which the appearance of a pattern image is suppressed by detecting blocks in which a component-specific pattern image is likely to appear and narrowing the quantization width of only the detected blocks. (Object and Configuration of the Invention) The present invention has been made in view of the above points, and
-When compressing the data of a gradation image including a medical image using a transform coding method that performs trace-type quantization, the generation of a component-specific pattern image is prevented, and a high-quality restored image with a high compression ratio is obtained. In order to achieve this object, digitized grayscale image data is divided into a plurality of blocks, and a transform coefficient obtained by performing orthogonal transform for each block is quantized and encoded. In the method of compressing tonal image data, a range of values of the transform coefficient is divided into a plurality of predetermined sections, and a frequency of occurrence of the transform coefficient in at least one of the divided sections is determined.
The quantization width of the transform coefficient is determined for each block based on the determined occurrence frequency, and compression is performed. (Example) Hereinafter, the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a gradation image data compression method according to the present invention. In the figure, a frame memory 1 stores gradation image data to be compressed (in this example, the number of bits per pixel is 8 bits). Are read in block units (in this example, the block size is 16 pixels in the line direction and the column direction, respectively). The read block data is converted into a two-dimensional discrete cosine transform (2D-DC
T) The cosine transform is performed by the device 3 to obtain 256 transform coefficients for one block. Next, of the 256 transform coefficients thus obtained, 255 transform coefficient AC components excluding one DC component are uniformly quantized by the quantizer 4 with a basic quantization width w o , and each transform is performed. A pair of a coefficient number and a polarity number, which are fixed-length codes, is obtained for each coefficient. The pair of the coefficient number and the polarity number is temporarily stored in the block buffer memory 6, and the coefficient number is sent to the classification device 5. The classifying device 5 performs a classifying process based on the coefficient number of one block sent from the quantization device 4 and the compression ratio parameter input from the terminal 52, and outputs the class number to the encoding device 7. When reading the class number sent from the classifying device 5, the coding device 7 reads a pair of the coefficient number and the polarity number for one block from the block buffer memory 6, and converts the fixed-length code (number) of the transform coefficient AC component. The data is converted into a variable length code and output to the terminal 8. The code data is transmitted from the terminal 8 or stored in the memory. FIG. 2 shows an example of the quantization device 4. First, 255 transform coefficient AC components excluding the DC component among the transform coefficients for one block are input from the terminal 41. The absolute values of the 255 conversion coefficients are determined by the absolute value circuit 42, and at the same time, the polarity determination circuit 43 determines whether the conversion coefficients are positive or negative. The polarity determination circuit 43 outputs the determination result to the terminal 47 as a polarity number. Here, the polarity number is represented by a 1-bit code, and is “1” when the conversion coefficient is negative and “0” when the conversion coefficient is positive. On the other hand, the absolute value of the transform coefficient output from the absolute value circuit 42 is divided by the basic quantization width w o by the division circuit 44. The division result is truncated to the decimal point by a truncation circuit 45 (this result is referred to as a coefficient number) and output to terminals 46 and 47. The terminal 46 is connected to the classification device 5, and the terminal 47 is connected to the block buffer memory 6. The polarity number and coefficient number obtained for one transform coefficient input from the terminal 41 form a pair of two, and are temporarily stored in the block buffer memory 6 from the terminal 47. On the other hand, the DC component of each block has a sufficiently small quantization width w.
It is uniformly quantized by dc , or is temporarily stored in the block buffer memory 6 in the same manner as the other 255 transform coefficient AC components without performing quantization. FIG. 3 shows the state of quantization of the AC component of the transform coefficient excluding the DC component. The horizontal axis is the value of the conversion coefficient, and the vertical axis is the frequency of occurrence of the conversion coefficient. The number sequence shown in FIG. 3 (a) is the sequence of coefficient numbers (k) output from the truncation circuit 45.
The number sequence shown by (b) is the polarity number (j) sequence output from the polarity determination circuit 43. Next, FIG. 4 shows an example of the classification device 5 when the number of classes is four. The terminal 51 is connected to the terminal 46 in FIG. 2, from which the coefficient number output from the quantization device 4 is input. When the coefficient number is represented by k (k = 0, 1, 2, 3, 4,...), The coefficient number k input from the terminal 51 is converted into a 4-bit primary counter control code C i ( i = 0,1,
Is converted to 2,3). FIG. 5 (a) shows an example of the counter control LUT 53. On the other hand, a compression ratio parameter P input by the user from a terminal (not shown) is input from the terminal 52. In the case of this example, two types of compression ratios are prepared (P = 0, 1), and the larger the P, the higher the compression ratio. Compression rate parameter P input from the terminal 52, the compression ratio control LUT 54, is converted into 4-bit compression rate control code e p. FIG. 5 (b) shows an example of the compression control LUT 54. Next OR circuit 55 takes in the compression ratio control code e p a primary counter control code c i, obtaining the second-order counter control code d i of 4 bits is a logical sum of both. d i ← c i ∪ e p Next, the counter control circuit 56 executes the second counter control code.
d i is fetched, and four counters from counter 0 to counter 3 in the counter circuit 57 are controlled by the on / off state of each bit of d i . Counter 0, the counter 1 from each bit lower bits of the second-order counter control code d i in this order,
When the bit is on (= 1), the counter control circuit 56 counts up the corresponding counter by +1 and the bit is off (= 0).
In this case, the corresponding counter is not incremented. In FIG. 5 (c) shows the correspondence between the bits and the counters d i. Incidentally, c i, is a similar relationship with each counter holds for e p. 6 is a diagram showing a relationship between operating range of the compression rate parameter P or compression ratio control code e p and each counter.
For each compression rate parameter P (each e p), each counter operates only for the coefficients number k of the range indicated by arrows in FIG. 6. However, in this example, the counter 3 operates for all coefficient numbers k regardless of the value of P.
The end of the classification work for one block can be known from the counter 3. Therefore, if another counter similar to the counter 3 is possessed, the counter 3 may be omitted. Next, the comparison processing procedure of the comparison circuit 58 is shown in the flowchart of FIG. The comparison circuit 58 always checks the count value of the counter 3 (F-1). When the count value is less than 255, the comparison circuit 58 is in a standby state. When the count value of the counter 3 is 255, the comparison circuit 58 reads the count threshold S p which is output from the count threshold LUT 59. FIG. 5 (d) shows an example of the count threshold LUT59. A count threshold S p is emitting the compression rate parameter P which is input from the terminal 52, a threshold value for the count value. Comparison circuit
When the 58 reads the count threshold S p, the S p and counter 2
(F-2). as a result,
(1) If the count threshold S p is set to class number m equal to or greater than the count value of the counter 2 to 3 (F-3),
S p is smaller than the count value of the counter 2 is compared with the count value of the S p and counter 1 (F-4). (2) In comparison between the count value of the count threshold S p and counter 1, if S p is more than the count value of the counter 1, and set the class number m to 2 (F-5), S p counter 1 smaller than the count value comparing the count value of the S p and the counter 0 (F-6). (3) In comparison between the count value of the count threshold S p and the counter 0, if S p is more than the count value, and sets a class number m to 1 (F-7), the count value of S p is counter 0 If smaller, the class number m is set to 0 (F-8). (4) When the class number m is set, the class number m is output from the terminal 510 (F-9), the classification of one block is completed, and the counters 0 to 3 are counted. Clear the value to zero (F-1
0). The class number m output from the comparison circuit 58 is a parameter indicating the range of the transform coefficient to be run-length encoded at the time of encoding. That is, the class number is relative to 255 of the AC component of the block is m, the transform coefficient whose absolute value is present within the following ranges 0 or A m of transform coefficients means that the run-length encoding ( (See FIG. 6). FIG. 8 is an example of the encoding device 7. When the classifying device 5 completes the classifying operation for one block, the encoding device 7 reads the class number m from the terminal 79 (the terminal 79 is connected to the terminal 510 in FIG. 4) and stores the class number m in the quantization LUT 73. One of the tables used for quantization is selected from the four stored quantization tables, and at the same time, a data read command from the block buffer memory 6 is sent to the data read circuit 72. The data reading circuit 72 receives the DC component data from the terminal 71 connected to the block buffer memory 6 and the 255 sets of coefficient numbers k and polarity numbers j.
(J = 0 or 1) is read. If the read data is a DC component, the data is output from the terminal 78. If the read data is a pair of the coefficient number k and the polarity number j, the quantization in the quantization LUT 73 selected by the class number m is performed. The coefficient number k and the polarity number j are converted into the code number 1 by the table. FIG. 9 shows an example of the quantization table in the quantization LUT 73. This example is an example in which the coefficient number k is uniformly divided so that the final quantization state is the uniform quantization shown in FIG. 10, but the coefficient number k may be unequally divided. It is possible, and non-uniform quantization can be performed with a final quantization width that is an integral multiple of the basic quantization width Wo . Next, an example of the coding procedure of the AC component is shown in the flowchart of FIG. First, the code number 1 output from the quantization LUT 73 is sent to a zero determination circuit 74 having a code passage counter 74a therein (P-1). When the code passage count 74a receives the code number l, the code passage count value y is incremented by one (P-2), and the zero determination circuit 74 performs the zero determination of the code number l (P-3). If 1 is zero, after incrementing the zero count value z of the zero counter 75 by +1 (P-4), it is determined whether or not the code passage count value y has reached 255 (P-11). On the other hand, if 1 is not zero, it is determined whether the zero count value z is zero (P−
5) If zero, the code number 1 is converted into a variable length code hl by the code LUT 76 (P-6) and hl is output from the terminal 78 (P-7) Is the code passage count value y equal to 255? It is determined whether it is (P-11). If the zero count value z is not zero the zero count value z is converted by the code LUT77 the variable length code r z (P-8), was cleared to zero zero count value z (P-9), terminals r z It is output from 78 (P-10), and it is determined whether or not the code passage count value y has reached 255 (P-11). In the determination of the code passage count value y, if the count value y is not 255, the process returns to the step (P-1) of reading the code number 1 and repeats the above processing. If the code passing count value y is 255 (P-11), it is determined whether the zero count value z is zero (P-1).
2) If it is zero, the code passage count value y is cleared to zero (P-13), and the encoding operation of the transform coefficient for one block is completed. If zero count value z is not zero and code conversion step (P-8), and zero clearing step of zero count value z (P-9), a variable length code r z output step to the terminal 78 (P-10) After this, the code passing count value y is cleared to zero (P-13), and the encoding operation of the transform coefficient for one block is completed. FIG. 12 (a) shows an example of the code LUT76. This example is an example using a common Huffman code hl for each class. In the case of performing uniform quantization as in the present embodiment, there is no significant difference in the compression ratio between when the optimal Huffman code hl is used for each class and when the common Huffman code hl is used for each class. Huffman code common to each class
By using hl, a simpler device can be realized. FIG. 12 (b) shows an example of the code LUT77. This example is an example in which a B1 code common to each class is used as a run length code assigned to the zero count value z. When the gradation image data is compressed by the present method, the frequency distribution of each zero run length becomes an exponential function suitable distribution suitable for the B1 code. Therefore, it is possible to obtain a high compression ratio by using the B1 code. In FIGS. 12 (A) and 12 (B), C and 1 take a value of 0 or 1, and are 1-bit codes satisfying ΔC. FIG. 13 shows the data reading order of the data reading circuit 72 in FIG. Since the conversion coefficient of the gradation image tends to have a smaller amplitude as the frequency component increases, the probability of generation of a component quantized to zero also increases as the frequency component increases. Therefore, Fig. 13 (a)
Alternatively, as shown in (b), if encoding is performed from the low frequency side toward the high frequency side, the probability of occurrence of a long zero run increases, and effective run-length encoding can be performed. FIG. 14 shows an example of a code configuration. FIG. 14 (a) shows a code example of the result of compressing the entire image of one frame, which is composed of a header part, a code of each subsequent block, and a data end code. FIG. 14 (b) shows an example of the header section configuration, which includes the block size (16 in this example), the number of blocks in the image line direction,
Number of blocks in image column direction and compression ratio parameter P
Is stored. FIG. 14 (c) shows an example of the code configuration of each block.
It is composed of a class number m (in this example, a 2-bit fixed-length code), a DC component code (fixed-length code), and a subsequent AC component code sequence (variable-length code sequence). The AC component code sequence is a coefficient code sequence (variable length code sequences hl 1 , hl 2 ,... Hl q ) composed of q (1 ≦ q ≦ 255) codes as shown in FIG. ) And run length codes (variable length codes r z ) are alternately arranged. Hereinafter, examples of various parameters used in this embodiment will be described. Basic quantization width w 0 = 0.5 A 0 = 0.5, A 1 = 1.0 A 2 = 1.5, A 3 = 2.0 S 0 = 200, S 1 = 225 Note that the information amount per pixel of the original image is n.
The block size is N × N with bits (n = 8 in this example)
When (N = 16 in this example), the block image is represented by f (x,
y), a value obtained by calculating a two-dimensional discrete cosine transform equation (shown in the following equation) representing a transform coefficient matrix by F (u, v) at a floating point. In the present invention, instead of the two-dimensional discrete cosine transform device 3, another orthogonal transform device, for example, 2
A dimensional discrete Hadamard transform device, slant transform device, or the like may be used. Also, in the present invention, the block size is not limited to the size of 16 × 16, but is 8 ×.
Sizes such as 8, 32 x 32, 64 x 64 are also applicable,
Further, the number of bits per pixel of the original image is not limited to 8 bits. When counting the coefficient numbers k in a specific section, the classifying apparatus 5 may classify based on the number of coefficient numbers k present in one specific section without providing a large number of specific sections. It is possible. Further, the classification can be performed by combining the classification parameter in the present invention with other classification parameters. (Effects of the Invention) As described above, in the present invention, the range of values that the transform coefficient can take is divided into a plurality of predetermined sections, and the frequency of occurrence of the transform coefficient in at least one of the divided sections is determined. By using, the quality of the restored image, especially
Quantization based on the degree of occurrence of a component-specific pattern image, which is a drawback of the mid-trace type quantization, becomes possible. For example, by determining a quantization width so that a high-frequency block has a low frequency, a pattern image of the pattern image can be obtained. Generation can be suppressed and a high-quality restored image can be obtained.

【図面の簡単な説明】 第1図は本発明による階調画像データ圧縮方法の一実施
例のブロック線図、第2図は第1図に示した量子化装置
の一例のブロック線図、第3図は変換係数交流成分を量
子化して得られる係数番号と極性番号とを変換係数の発
生頻度との関係で示す図、第4図は第1図に示したクラ
ス分け装置の一例のブロック線図、第5図(イ)はカウ
ンタ制御LUT、(ロ)は圧縮率制御LUT、(ハ)は第2次
カウンタ制御コードと各カウンタの対応関係、(ニ)は
カウント閾値LUTをそれぞれ示す図、第6図(イ)およ
び(ロ)カウンタ回路内の各カウンタの動作範囲を示す
図、第7図は比較回路の比較手順を示すフローチャー
ト、第8図は第1図に示した符号化装置の一例のブロッ
ク線図、第9図は第8図に示した量子化LUTの一例、第1
0図は最終的量子化状態の一例、第11図は第1図に示し
た符号化装置による交流成分符号化手順を示すフローチ
ャート、第12図(イ)および(ロ)はそれぞれ第8図の
2つの符号LUTの一例、第13図(イ)および(ロ)は第
8図のデータ読出し回路におけるデータ読出し順序を示
す図、第14図(イ)、(ロ)、(ハ)、(ニ)、(ホ)
は符号構成の内容の一例を示す図である。 1……フレームメモリ、2……読み出し装置、3……2
次元ディスクリートコサイン変換装置、4……量子化装
置、5……クラス分け装置、6……ブロックバッファメ
モリ、7……符号化装置
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an embodiment of a gradation image data compression method according to the present invention, FIG. 2 is a block diagram of an example of a quantization device shown in FIG. 3 is a diagram showing a coefficient number and a polarity number obtained by quantizing a transform coefficient AC component in relation to the frequency of occurrence of a transform coefficient, and FIG. 4 is a block line of an example of the classification device shown in FIG. FIG. 5A shows a counter control LUT, FIG. 5B shows a compression ratio control LUT, FIG. 5C shows a correspondence relationship between a secondary counter control code and each counter, and FIG. 5D shows a count threshold LUT. 6, (a) and (b) are diagrams showing the operating range of each counter in the counter circuit, FIG. 7 is a flowchart showing the comparison procedure of the comparison circuit, and FIG. 8 is the encoding device shown in FIG. FIG. 9 is a block diagram of an example of the quantization LUT shown in FIG.
FIG. 0 is an example of a final quantization state, FIG. 11 is a flowchart showing an AC component encoding procedure by the encoding apparatus shown in FIG. 1, and FIGS. FIGS. 13 (a) and (b) show an example of two code LUTs showing the data reading order in the data reading circuit of FIG. 8, and FIGS. 14 (a), (b), (c) and (d). ), (E)
Is a diagram illustrating an example of the contents of a code configuration. 1 ... frame memory, 2 ... readout device, 3 ... 2
Dimensional discrete cosine transform device, 4... Quantizer, 5... Classifier, 6... Block buffer memory, 7.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 IEEE TRANSACTIONS ON COMMUNICATIONS VOL.COM−25[11](1977) P.1285−1292(第6図)   ────────────────────────────────────────────────── ─── Continuation of front page       (56) References IEEE TRANSACTIONS                 ON COMMUNICATIONS                 VOL. COM-25 [11] (1977)               P. 1285-1292 (Figure 6)

Claims (1)

(57)【特許請求の範囲】 1.デジタル化された階調画像データを複数のブロック
に分割し、該ブロック毎に直交変換を行って得られる変
換係数を量子化し符号化する階調画像データの圧縮方法
において、 前記変換係数のとりうる値の範囲を予め定められた複数
の区間に分割し、前記分割された少なくとも1つの区間
における前記変換係数の発生頻度を求め、前記求められ
た発生頻度に基づいて前記ブロック毎に変換係数の量子
化幅を決定することを特徴とする階調画像データの圧縮
方法。 2.前記変換係数の発生頻度としてゼロに量子化される
変換係数の発生頻度を求めることを特徴とする特許請求
の範囲第1項に記載の階調画像データの圧縮方法。 3.前記分割された区間における変換係数の発生頻度を
求める際に、前記変換係数の絶対値に対しての発生頻度
を求めることを特徴とする特許請求の範囲第1項または
第2項に記載の階調画像データの圧縮方法。 4.前記直交変換が、2次元ディスクリートコサイン変
換であることを特徴とする特許請求の範囲第1項、第2
項または第3項に記載の階調画像データの圧縮方法。
(57) [Claims] In a method of compressing gradation image data, which divides digitized gradation image data into a plurality of blocks, and quantizes and encodes transformation coefficients obtained by performing orthogonal transformation for each block, The range of values is divided into a plurality of predetermined sections, the frequency of occurrence of the transform coefficient in at least one of the divided sections is determined, and the quantum of the transform coefficient for each block is determined based on the determined frequency of occurrence. A method of compressing gradation image data, characterized in that a gradation width is determined. 2. 2. The method according to claim 1, wherein the frequency of occurrence of the transform coefficient quantized to zero is obtained as the frequency of occurrence of the transform coefficient. 3. 3. The floor according to claim 1, wherein, when calculating the frequency of occurrence of the transform coefficient in the divided section, the frequency of occurrence of the transform coefficient with respect to the absolute value is obtained. A method for compressing tonal image data. 4. 2. The method according to claim 1, wherein the orthogonal transform is a two-dimensional discrete cosine transform.
Item 4. The method for compressing gradation image data according to item 3 or 3.
JP7977587A 1987-04-02 1987-04-02 Method of compressing gradation image data Expired - Lifetime JP2811304B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP7977587A JP2811304B2 (en) 1987-04-02 1987-04-02 Method of compressing gradation image data
US07/176,769 US4922273A (en) 1987-04-02 1988-04-01 Compression method of halftone image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7977587A JP2811304B2 (en) 1987-04-02 1987-04-02 Method of compressing gradation image data

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP7067612A Division JPH07283948A (en) 1995-03-27 1995-03-27 Compressing device for gradation picture data

Publications (2)

Publication Number Publication Date
JPS63246977A JPS63246977A (en) 1988-10-13
JP2811304B2 true JP2811304B2 (en) 1998-10-15

Family

ID=13699577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7977587A Expired - Lifetime JP2811304B2 (en) 1987-04-02 1987-04-02 Method of compressing gradation image data

Country Status (1)

Country Link
JP (1) JP2811304B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2560873B2 (en) * 1990-02-28 1996-12-04 日本ビクター株式会社 Orthogonal transform coding Decoding method
JP2816230B2 (en) * 1990-04-27 1998-10-27 コニカ株式会社 Image data compression device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IEEE TRANSACTIONS ON COMMUNICATIONS VOL.COM−25[11](1977)P.1285−1292(第6図)

Also Published As

Publication number Publication date
JPS63246977A (en) 1988-10-13

Similar Documents

Publication Publication Date Title
US7782960B2 (en) DCT compression using Golomb-Rice coding
KR100914160B1 (en) Lossless intraframe encoding using golomb-rice
US4922273A (en) Compression method of halftone image data
JP2004531995A5 (en)
AU2002316546A1 (en) Lossless intraframe encoding using golomb-rice
JPH08116447A (en) Coder for image signal
JP3163880B2 (en) Image compression coding device
JP2811304B2 (en) Method of compressing gradation image data
JP2841197B2 (en) Method of compressing gradation image data
JP2511669B2 (en) Compressor for gradation image data
JP2821496B2 (en) Method of compressing gradation image data
JPH07283948A (en) Compressing device for gradation picture data
EP0762771A2 (en) Apparatus and method for variable-length coding
JPH09172379A (en) Variable length en-coding device/method
JP3049265B2 (en) Image data coding circuit
JP3205028B2 (en) Image compression apparatus and method
JP2668900B2 (en) High efficiency coding device
JP3347409B2 (en) Image coding apparatus and method
JPH01237774A (en) Encoding method in compression of gradation picture data
Myojoyama et al. Lossless compression of medical image by hierarchical sorting
JPH07184204A (en) Transformation method for picture signal, transmitter for picture signal

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070807

Year of fee payment: 9