JP3645690B2 - Image compression apparatus and camera - Google Patents
Image compression apparatus and camera Download PDFInfo
- Publication number
- JP3645690B2 JP3645690B2 JP17291897A JP17291897A JP3645690B2 JP 3645690 B2 JP3645690 B2 JP 3645690B2 JP 17291897 A JP17291897 A JP 17291897A JP 17291897 A JP17291897 A JP 17291897A JP 3645690 B2 JP3645690 B2 JP 3645690B2
- Authority
- JP
- Japan
- Prior art keywords
- quantization
- orthogonal transform
- value
- transform coefficient
- error
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000006835 compression Effects 0.000 title claims description 29
- 238000007906 compression Methods 0.000 title claims description 29
- 238000013139 quantization Methods 0.000 claims description 242
- 230000003287 optical effect Effects 0.000 claims description 6
- 238000013500 data storage Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 description 38
- 238000010586 diagram Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 7
- 239000011159 matrix material Substances 0.000 description 3
- 230000006866 deterioration Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、カラー静止画像をJPEGアルゴリズムに準拠して情報圧縮する画像圧縮装置およびカメラに関する。
【0002】
【従来の技術】
高解像度画像を符号化(圧縮)して、情報の授受を通信伝送路を介して行なう標準化アルゴリズムがJPEG(Joint Photographic Expert Group )から勧告されている。このJPEGアルゴリズムのプロセスでは、原画像データを2次元離散コサイン変換(以下、2次元DCTという)によって空間周波数軸上の成分に分解し、この空間周波数軸上で表された各データを量子化し、量子化した各データを符号化することにより、大幅な情報圧縮が行なわれている。また圧縮された画像データは復号化、逆量子化することにより伸張される。
【0003】
JPEGでは、量子化あるいは逆量子化のために、所定の量子化テーブルを推奨している。このDCTと量子化による画像圧縮は、広範な被写体において効率の良い画像圧縮であるが、原画像データと伸張された再生画像データとの間に誤差を伴う非可逆方式である。
【0004】
【発明が解決しようとする課題】
画像圧縮の量子化あるいは逆量子化において、被写体の多様性にも関わらず、単一の量子化テーブルを使用するため、被写体によっては再生画像データの劣化が大きくなることが問題である。
【0005】
本発明は、この様な問題点に鑑み、量子化誤差を予測し、量子化と逆量子化による画像劣化が少ない画像圧縮を容易にする画像圧縮装置およびカメラを提供することが目的である。
【0006】
【課題を解決するための手段】
本発明による画像圧縮装置は、撮影光学系から得られた原画像データに対応した直交変換係数を、量子化テーブルを用いて量子化し、量子化直交変換係数を求める量子化手段と、直交変換係数に基づいて、量子化テーブルを更新する量子化テーブル作成手段とを備えたことを特徴としている。
【0007】
画像圧縮装置において、好ましくは、量子化テーブル作成手段が、量子化直交変換係数を逆量子化して求められる逆量子化直交変換係数と直交変換係数との誤差の絶対値が2よりも大きい直交変換係数の標本数を、直交変換係数毎にカウントし、各画像における標本数のデータ(標本数データ)を、所定画像枚数分だけ格納する格納部を備える。
【0008】
画像圧縮装置において、好ましくは、格納部において、新たな画像の標本数データが入力される毎に、格納部に格納された最も古い画像の標本数データが消去されることにより、所定枚数の標本数データが更新される。
【0009】
画像圧縮装置において、好ましくは、量子化テーブル作成手段が、所定枚数の標本数データに基づいて、誤差を予測する量子化誤差予測部と、量子化誤差予測部から得られた予測誤差値に基づいて量子化テーブルを算出し、量子化手段に出力する量子化テーブル算出部とを備える。
【0010】
画像圧縮装置において、好ましくは、量子化テーブル作成手段が、新規に入力された標本数データを含めた所定枚数の標本数データにより、量子化テーブルを作成する。また好ましくは、量子化テーブル作成手段が、新規に入力された標本数データより前に入力された所定枚数の標本数データにより、量子化テーブルを作成する。
【0011】
また本発明によるカメラは、撮影光学系から得られた原画像データに対応した直交変換係数を、量子化テーブルを用いて量子化し、量子化直交変換係数を求める量子化手段と、
直交変換係数に基づいて、量子化テーブルを更新する量子化テーブル作成手段とを備え、
量子化テーブル作成手段が、1画像分の画像データに対応し、量子化直交変換係数を逆量子化して求められる逆量子化直交変換係数と直交変換係数との誤差の絶対値が2よりも大きい直交変換係数の標本数を、直交変換係数毎にカウントし、各画像における標本数のデータ(標本数データ)を、所定画像枚数分だけ格納可能な標本数データ格納手段と、
標本数データ格納手段に格納されている所定枚数の標本数データに基づいて、誤差を予測する量子化誤差予測部と、
量子化誤差予測部から得られた予測誤差値に基づいて量子化テーブルを算出し、量子化手段に出力する量子化テーブル算出部とを備え、
さらに量子化テーブル作成手段によって作成された量子化テーブルを用いて画像圧縮された圧縮画像データを記録媒体に記録する記録手段と、
作成された量子化テーブルを格納する量子化テーブル格納手段とを備える。
【0012】
カメラにおいて、好ましくは、記録手段によって、圧縮画像データが記録媒体の第1の領域に記録され、量子化に用いられた量子化テーブルが記録媒体の第2の領域に記録される。
【0013】
カメラにおいて、好ましくは、量子化テーブル作成手段が、テーブル格納手段に格納されている量子化テーブルを、量子化に用いるとともに、記録媒体への圧縮画像データの記録が完了した後に、この圧縮画像データと対応する標本数データに基づいた量子化テーブルを作成し、作成された量子化テーブルを量子化テーブル格納手段に格納することにより、量子化テーブルを更新する。
【0014】
【発明の実施の形態】
以下、本発明による画像圧縮装置およびカメラの実施形態について添付図面を参照して説明する。
【0015】
図1には本発明の実施形態であるカメラの概略構成が示される。
被写体Sの撮影光学系11を介して得られる被写体像(静止画)は、色分解光学系13によってレッド(R)、グリーン(G)およびブルー(B)の画像に分解され、例えばCCDから成る3枚の撮像素子15に結像される。即ち、各撮像素子15にはそれぞれR、G、Bの画像が形成される。これらR、G、Bの画像信号は信号処理部17において所定の処理を施され、輝度データY、色差データCb、Crに変換されて、画像メモリ19に入力される。画像メモリ19は輝度データYおよび色差データCb、Crをそれぞれ格納するために、相互に独立したメモリ領域に分割されており、各メモリ領域は1画像分の記憶容量を有している。輝度データY、色差データCb、Crは、画像圧縮装置10に対する入力データ(原画像データ)である。
【0016】
輝度データY、あるいは色差データCb、Crは、DCT処理回路12において2次元DCTを施され、空間周波数毎にDCT係数に変換される。これらのDCT係数に基づいて、量子化テーブル作成回路20により輝度データ用量子化テーブルQya、および色差データ用量子化テーブルQcaが作成され、量子化処理回路14に出力される。量子化テーブル作成回路20には統計量格納部21、量子化誤差予測部22、量子化テーブル算出部24が設けられているが、これらの構成および動作については後で詳述する。
【0017】
輝度データY、あるいは色差データCb、CrのDCT係数は、量子化処理回路14において、量子化テーブル作成回路20により作成された量子化テーブルQya、Qcaを用いて量子化され、量子化DCT係数に変換される。輝度データY、あるいは色差データCb、Crの量子化DCT係数は、図示しない符号化処理回路によってJPEGアルゴリズムに従って符号化(圧縮)され、圧縮画像データとして記録媒体Mの圧縮画像データ記録領域M1に記録される。量子化処理回路14において用いられた量子化テーブルQya、Qcaは、記録媒体Mのテーブル記録領域M2に記録される。記録媒体Mは、例えば着脱自在なICカードである。
【0018】
図2は、JPEGの推奨する従来の量子化テーブルを示す。図2(a)は輝度値Y用の量子化テーブルQyであり、図2(b)は色差Cb、Cr用の量子化テーブルQcである。
【0019】
図3を参照して、量子化と逆量子化について説明する。図3には、一例として、8×8画素の原画像データ、すなわち輝度データYのDCT係数Fvuと、量子化DCT係数Rvuと、逆量子化DCT係数F’vu、および量子化テーブルQyが示される。添字v,uは、64個のDCT係数を8×8のマトリクスの形式で表示したときの縦および横方向の位置をそれぞれ示し、添字vは上から0,1,2,...7であり、添字uは左から0,1,2,...7である。
【0020】
原画像データは、DCT処理回路12における2次元DCTによって、8×8=64個のDCT係数Fvuに変換される。2次元DCTは公知であるため、ここでは詳述しない。
【0021】
64個のDCT係数のうち、位置(0,0)にあるDCT成分F00はDC(直流)成分であり、残り63個のDCT係数FvuはAC(交流)成分である。AC成分は、係数F01もしくは係数F10から係数F77に向かって、より高い空間周波数成分が8×8画素ブロックの原画像データ中にどのくらいあるかを示している。DC成分は8×8画素のブロック全体の画素値の平均値(直流成分)を表している。すなわち、各DCT係数Fvuはそれぞれ所定の空間周波数に対応している。
【0022】
量子化テーブルQyを用いてDCT係数Fvuを量子化する式は(1)式により定義される。この式におけるround は、最も近い整数への近似を意味する。すなわち、DCT係数Fvuおよび量子化テーブルQyの各要素同士の割算と、四捨五入とによって、量子化DCT係数Rvuが求められる。
【0023】
【0024】
このように、量子化処理回路14において求められた量子化DCT係数Rvuは、例えばJPEGに準拠したハフマン符号化を用いて、DC成分、AC成分毎に符号化され、圧縮画像データとして記録媒体Mに記録される。ハフマン符号化については、従来公知のため詳細な説明は省略する。
【0025】
符号化された圧縮画像信号を伸張して、画面に表示するためには、復号化、逆量子化、2次元DCTの逆変換(以下、2次元IDCTという)の処理が必要である。この復号化は、ハフマン符号化とは逆の作用であり、従来公知であるため詳述しない。復号化によって得られた量子化DCT係数は、量子化に用いた量子化テーブルQy、Qcを用いてそれぞれ逆量子化され、逆量子化DCT係数F’vuに変換される。これらの逆量子化DCT係数F’vuは2次元DCTの逆変換である2次元IDCTを施され、それぞれ輝度データY’、色差データCb’、Cr’に変換される。2次元IDCTについても公知であるのでここでは詳述しない。
【0026】
例えば、図3に示すDCT係数F00(=261)を、量子化係数q00(=16)を用いて(1)式により求めると、量子化DCT係数R00は16になり、この量子化DCT係数R00(=16)にq00(=16)を掛け合わせると、逆量子化DCT係数F’00(=16 ×16=256)が求められる。なお、DCT係数F00(=261)と、逆量子化DCT係数F’00(=256)との差分値i00(256-261=-5)を係数値誤差とする。このように量子化では除算の余りを丸めるため、圧縮画像データの伸張(逆量子化)において係数値誤差iを生じる。これが量子化誤差の原因である。
【0027】
図4は、DCT係数Fvuと、量子化および逆量子化した後の逆量子化DCT係数F’vuとの各係数毎の係数値誤差ivuを示す図である。本実施形態は、このように量子化、あるいは逆量子化によって生じる係数値誤差ivuを予測し、各量子化係数qvuを算出して量子化テーブルQy、Qcを作成することにより、量子化誤差を小さくする構成を備えている。
【0028】
図1および図5を参照して、量子化テーブル作成回路20における量子化テーブル作成処理を説明する。
例えば8×8画素のブロック数がMである画像データ1枚分が入力される(以下、最新画像データという)と、まず図示しない信号処理回路においてブロック毎に輝度データYと色差データCb、Crに変換され、DCT処理回路12においてDCTが施されて、DCT係数に変換され、統計量格納部21に出力される。
【0029】
統計量格納部21において、最新画像データのDCT係数に関し、v×u×M個のDCT係数から、予測誤差値の統計量が算出される。統計量格納部21は、最新画像データの直前に得られた所定枚数(N枚)の画像データにおける各周波数の標本数のデータ(以下標本数データという)を記録しており、新たに標本数データが入力されると、一番古い標本数データが消去され、最新の標本数データを含む新たなN枚分の標本数データに書き換えられる。
【0030】
量子化誤差予測部22では、統計量格納部21から得られたN枚分の標本数データから量子化誤差を予測する。量子化テーブル算出部24では、量子化誤差予測部22による量子化誤差予測結果に基づいて、量子化テーブルQya、Qcaが算出され、量子化処理回路14に出力される。
【0031】
量子化誤差予測部22における量子化誤差予測について詳述する。
量子化テーブルQyにおける量子化係数をqvuとすると、DCT係数Fvuと逆量子化DCT係数F’vuとの係数値誤差ivuの範囲は、次の(2)式により表される。
【0032】
−qvu/2≦ivu≦qvu/2 ・・・(2)
【0033】
例えば量子化係数qvu=6であれば、係数値誤差ivuは−3、−2、−1、0、1、2、3の何れかに相当する。係数値誤差ivuの範囲は、量子化係数qvuが大きくなるにつれ拡大する。
【0034】
次にM×Nブロックの係数値誤差ivuが、(2)式に示した範囲内で平均的に分布すると予測し、(3)式によって係数値誤差ivuの予測値rmsvuを求める。なお(3)式において、iは係数値誤差ivu、qは量子化係数qvu、rmsは各空間周波数における係数値誤差ivuの二乗平均値の平方根、即ちrms値を示す。例えばq=6であれば、rms=約1.7795である。
【0035】
【数1】
【0036】
図6に、量子化係数qとrms値との対応表を示す。
本実施形態では、輝度データYは8ビット(256段階)で表され、量子化係数qは1から255まで変化することとする。この表によく示されるように、量子化係数qが大きくなると、係数値誤差iの範囲も大きくなるため、rms値は拡大する。
【0037】
本実施形態では、M×N個の全ブロックにおいて所定の条件を満たす、例えば各空間周波数におけるDCT係数Fvuの絶対値が2より大きいDCT係数Fvuの数を、標本数Evuとする(0≦Evu≦M×N)。本実施形態ではDCT係数Fvuの絶対値が2より大きい場合、量子化係数qvuの値が大きくなるにつれ係数値誤差ivuが大きくなる、また標本数Evuが多くなるにつれ、画像全体の量子化誤差が拡大することに注目して、予測誤差合計値Gvuを次の(4)式で表している。
【0038】
Gvu=rmsvu×Evu ・・・(4)
【0039】
予測誤差合計値Gvuが各空間周波数について均一であれば、画像全体の量子化誤差は減少し、画像伸張時において復元性の高い再生画像データが得られる。従って本実施形態では、空間周波数の低い方、特にDC成分に画像情報が集中する性質を利用して、まずDC成分であるDCT係数F00の予測誤差合計値G00が、予め決定された所定の量子化係数q00から(3)式および(4)式により求められる。他のDCT係数Fvu(v,u≠0)、即ち63個のAC成分の予測誤差合計値Gvuは、DC成分の予測誤差合計値G00と同じ値として、(5)式により対応する予測誤差rms’vuが算出され、量子化テーブル算出部24に出力される。
【0040】
【0041】
次に、量子化テーブル算出部24における、量子化テーブル作成処理を説明する。前述の量子化誤差予測により得られた予測誤差rms’vuは、(6)式に代入され、(6)式を満たすq’に最も近い整数である予測量子化係数q’vu(v,u≠0)が求められる。
【0042】
【数2】
【0043】
例えば、480 ×720 画素の画像を10枚処理する場合、画像1枚当たりのブロック数Mは5400であり、総ブロック数M×Nは5400×10=54000である。このときのDC成分に対応する量子化係数q00を6とし、DCT係数F00の絶対値が2より大きい標本数E00を53940 とすると、(3)式および(4)式により予測誤差合計値G00=1.7795×53940 =95986.23が求められる。AC成分、例えばDCT係数F77の絶対値が2より大きい標本数E77を31520 とすると、(5)式により予測量子化係数rms’77=95986.23÷31520 =約3.0452が求められ、(6)式を満たす予測量子化係数q’77=11が求められる。
【0044】
以上のように求められた各予測量子化係数q’vuは、圧縮比に応じてスケーリングされ、8×8のマトリクスQyaの形で量子化処理回路14に出力される。画像圧縮では、量子化係数qを大きくすると高圧縮ができるが、画質は劣化する。逆に量子化係数qを小さくすると画質は向上するが、圧縮後のデータ量が大きくなる。画質は、量子化係数qに所定の圧縮比をかけることによりコントロールされる。
【0045】
図7は作成された量子化テーブルの一例を示す。図7(a)は輝度値Y用の量子化テーブルQyaであり、図7(b)は色差Cb、Cr用の量子化テーブルQcaである。図2と比較すると、特にAC成分においてそれぞれ対応する量子化係数に違いが見られる。
【0046】
図8、図9のフローチャートを参照して、統計量格納部21における統計処理を説明する。図8および図9において、BLOCKSはブロック数Mを示す変数であり、BAは処理する総ブロック数(M×N)と等しい。FvuはDCT係数を示し、添字v、uは、それぞれ0から7まで変化する。Evuは標本数を示す変数である。
【0047】
まず図8を参照する。ステップS102では、変数BLOCKSと変数Evuとの初期値が、それぞれ0に設定される。ステップS104では変数vの初期値が0、ステップS106では変数uの初期値が0に設定される。ステップS108ではDCT係数Fvuの絶対値が2よりも大きいか否かが判定される。DCT係数Fvuの絶対値が2よりも大きければ、ステップS110において標本数Evuが1インクリメントされステップS112に進む。DCT係数Fvuの絶対値が2よりも大きくなければ、ステップS112に進み、変数uが1インクリメントされる。
【0048】
ステップS114では変数uが8であるか否かが判定され、uが8でない、即ち7以下であれば、ステップS108から再実行される。u=8であればステップS116に進み、変数vが1インクリメントされる。同様に、ステップS118では変数vが8であるか否かが判定され、vが8でない、即ち7以下であれば、ステップS106から再実行される。v=8であればステップS120に進む。
【0049】
ステップS120では、変数BLOCKSが1インクリメントされ、ステップS122において変数BLOCKSが総ブロック数BAであるか否かが判定される。BLOCKSがBAでなければ、ステップS104から再実行され、BLOCKS=BAであればステップS124に進む。
【0050】
このように、8×8のDCT係数のマトリクスFvuにおいて、まず一番上の横一列の標本数Evuが左から順にカウントされ、順に次の横一列の標本数Evuがカウントされる。即ち図8の処理では、64個の各周波数成分において、DCT係数Fvuの絶対値が2よりも大きい標本数Evuがそれぞれカウントされる。
【0051】
次に図9を参照する。ステップS124では変数vの初期値が0、ステップS126では変数uの初期値が0、ステップS128では画像数を表す変数iの初期値が0に設定される。ステップS130では、Evu[i+1] はEvu[i] に変換される。例えばE[1] がE[0] になり、E[6] はE[5] になる。ステップS134では変数iが画像数より1枚少ない数(N−1)と等しいか否かが判定される。変数iが(N−1)と等しくなければステップS130が再実行され、変数iが(N−1)と等しければステップS136に進む。ステップS136では、Evu[N-1] がEvuに設定され、ステップS138に進む。
【0052】
ステップS138では、変数uが1インクリメントされ、ステップS140では変数uが8であるか否かが判定される。uが8でない、即ち7以下であれば、ステップS128から再実行される。u=8であればステップS142に進み、変数vが1インクリメントされる。同様に、ステップS144では変数vが8であるか否かが判定され、vが8でない、即ち7以下であれば、ステップS126から再実行される。v=8であれば処理は終了する。
【0053】
例えば、N=10枚分の標本数データ(E[0] 、E[1] 、...E[9] ;括弧内の数値が大きいほど最新の画像データであることを示す)が、統計量格納部21に格納されているとする。最新標本数であるEが統計量格納部21に入力されると、格納されていた標本数データE[i] の添字i(1≦i≦N−1)がそれぞれ1繰り下がり(ステップS130)、標本数データはE[0] 、E[1] 、...E[8] となる。そして最新標本数データEが、E[9] に更新される(ステップS136)。更新されたE[0] 〜E[8] 、およびE[9] は、再び統計量格納部21に格納されるとともに、量子化誤差予測部22に出力される。このように図9の処理では、統計量格納部21に格納されているN枚分の標本数データEを、最新の撮影画像のN枚の標本数データEで常に更新している。
【0054】
図10、図11のフローチャートを参照して、量子化誤差予測部22における量子化誤差予測処理を説明する。図10および図11において、Evuは標本数を示す変数である。
【0055】
まず図10を参照する。ステップS202では、変数Evuの初期値が0に設定される。ステップS204では変数vの初期値が0、ステップS206では変数uの初期値が0に設定される。ステップS208では変数iの初期値が0に設定される。
【0056】
ステップS210では、各空間周波数における標本数Evu[i] の加算が行なわれ、ステップS212において変数iが1インクリメントされ、ステップS214に進む。ステップS214では変数iがNであるか否かが判定され、iがNでなければステップS210から再実行される。変数iがNであると判定されるとステップS216に進む。即ち、ステップS208からステップS214までの処理によって、各空間周波数における標本数EvuのN個の総和が求められる。
【0057】
ステップS216において、変数uが1インクリメントされ、ステップS218では変数uが8であるか否かが判定され、uが8でない、即ち7以下であれば、ステップS208から再実行される。u=8であればステップS220に進み、変数vが1インクリメントされる。同様に、ステップS222では変数vが8であるか否かが判定され、vが8でない、即ち7以下であれば、ステップS206から再実行される。v=8であればステップS302に進む。
【0058】
このように図10の処理では、図8のフローチャートにおいてカウントされた各画像iの標本数Evu[i] の総和Evuを各空間周波数毎に求めている。
【0059】
次に図11を参照する。ステップS302では変数vの初期値が0、ステップS304では変数uの初期値が0に設定される。ステップS306では変数v、uが共に0であるか否かが判定される。変数v、uが共に0であればステップS308に進み、変数v、uが共に0でなければ、ステップS310に進む。
【0060】
ステップS308では、所定の量子化係数q00に基づいて、(3)式を用いてq00のrms値、即ちrms00が求められる。このrms00と標本数E00との乗算により、予測誤差合計値G00が求められ、ステップS312に進む。
【0061】
ステップS310では、予測誤差合計値G00と標本数Evuを(5)式に代入して、rms値であるrms’vuが求められる。その後、rms’vuを(6)式に代入することにより予測量子化係数q’vuが求められ、ステップS312に進む。
【0062】
ステップS312では、変数uが1インクリメントされ、ステップS314では変数uが8であるか否かが判定される。uが8でない、即ち7以下であれば、ステップS306から再実行される。u=8であればステップS316に進み、変数vが1インクリメントされる。同様に、ステップS318では変数vが8であるか否かが判定され、vが8でない、即ち7以下であれば、ステップS304から再実行される。v=8であれば処理は終了する。
【0063】
このように、まず量子化係数q00によりDC成分の予測誤差合計値G00を求め、DC成分のrms00を決定する(ステップS308)。そして、AC成分の各rms値rms’vuを、各総和標本数Evuと予測誤差合計値G00とから求め、予測量子化係数q’vu(v,u≠0)を算出する(ステップS310)。即ち図11の処理では、DC成分の予測誤差合計値G00を基に、AC成分の各周波数成分に対応した63個の予測量子化係数q’vuが決定される。
【0064】
第1実施形態には量子化テーブル作成回路20が設けられ、この量子化テーブル作成回路20は、原画像データのDCT係数から、量子化誤差に関係の深い統計量である標本数データを各空間周波数毎に算出し、所定枚数標本数データを格納し、画像入力毎に更新する統計量格納部21を備えている。また、この標本数データを用いて量子化誤差を予測する量子化誤差予測部22と、量子化係数を量子化誤差に基づいて求め、量子化テーブルを出力する量子化テーブル算出部24とを備えている。従って、所定枚数の最新の画像に最適な単一の量子化テーブルQyaを作成できる。従って同じ圧縮画像データ量で量子化誤差の少ない再生画像データを得ることができる。
【0065】
図12は本発明の第2実施形態を示す図である。第1実施形態と同一の構成には第1実施形態と同符号を付しており、ここでは説明を省略する。第2実施形態では、量子化テーブル作成回路20によって作成された量子化テーブルをQ’y(輝度データ用)、Q’c(色差データ用)とする。
【0066】
量子化テーブル格納部30は、例えばデフォオルトの量子化テーブルQy、Qcが書き込まれたメモリである。DCT処理回路12からにより得られるDCT係数Fvuは、量子化処理回路14に入力されると共に、量子化テーブル作成回路20にも入力される。量子化処理回路14ではデフォルトの量子化テーブルQy、Qcを用いて量子化が行なわれる。量子化された画像データは符号化され、圧縮画像データとして記録媒体Mの圧縮画像データ記録領域M1に記録される。デフォルトの量子化テーブルQy、Qcは、記録媒体Mのテーブル記録領域M2に記録される。
【0067】
次に量子化テーブル作成回路20では、新たに入力されたDCT係数による量子化誤差と、統計量格納部21に記録された過去の量子化誤差とに基づいて、量子化テーブルQ’y、Q’cが作成され、量子化テーブル格納部30に出力される。量子化テーブル格納部30は、量子化テーブル作成回路から得られた量子化テーブルQ’y、Q’cを、デフォルトの量子化テーブルQy、Qcとして書き換える。
【0068】
従って、量子化に用いられる量子化テーブルQy、Qcは、以前に入力された画像データに基づいて作成されたものである。第2実施形態においても、第1実施形態と同様、各画像のDCT係数から量子化誤差を予測し、誤差の統計量を更新することにより量子化テーブルQy、Qcを作成する構成であり、同じ圧縮画像データ量で量子化誤差の少ない再生画像データを得ることができる。さらに第2実施形態では、量子化テーブルQy、Qcは量子化テーブル格納部30から読み込むだけで良いので、量子化テーブルの算出結果を待たずに量子化でき、処理時間の短縮も図られる。
【0069】
【発明の効果】
本発明によると、量子化誤差を予測し、量子化と逆量子化による画像劣化が少ない画像圧縮を容易にする画像圧縮装置、およびカメラを提供することができる。
【図面の簡単な説明】
【図1】本発明によるカメラの第1実施形態を示すブロック図である。
【図2】JPEG推奨の輝度データ用量子化テーブルと色差データ用量子化テーブルを示す図である。
【図3】輝度データYのDCT係数Fvuと、量子化DCT係数Rvuと、逆量子化DCT係数F’vu、および量子化テーブルQyを示す図である。
【図4】DCT係数Fvuと、逆量子化DCT係数F’vuとの各係数毎の係数値誤差ivuを示す図である。
【図5】量子化テーブル作成回路におけるフローを示すブロック図である。
【図6】量子化係数qとrms値との対応を示す表である。
【図7】作成された輝度データ用量子化テーブルQyaと色差データ用量子化テーブルQcaとを示す図である。
【図8】量子化誤差統計処理のフローチャートの前半部分を示す図である。
【図9】量子化誤差統計処理のフローチャートの後半部分を示す図である。
【図10】量子化誤差予測処理のフローチャートの前半部分を示す図である。
【図11】量子化誤差予測処理のフローチャートの後半部分を示す図である。
【図12】本発明によるカメラの第2実施形態を示すブロック図である。
【符号の説明】
10 画像圧縮装置
12 DCT処理回路
14 量子化処理回路
20 量子化テーブル作成回路
21 統計量格納部
22 量子化誤差予測部
24 量子化テーブル算出部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image compression apparatus and a camera for compressing information of a color still image according to a JPEG algorithm.
[0002]
[Prior art]
JPEG (Joint Photographic Expert Group) recommends a standardization algorithm that encodes (compresses) high-resolution images and exchanges information via a communication transmission path. In this JPEG algorithm process, original image data is decomposed into components on the spatial frequency axis by two-dimensional discrete cosine transform (hereinafter referred to as two-dimensional DCT), and each data represented on the spatial frequency axis is quantized. Significant information compression is performed by encoding each quantized data. The compressed image data is expanded by decoding and inverse quantization.
[0003]
JPEG recommends a predetermined quantization table for quantization or inverse quantization. This image compression by DCT and quantization is efficient image compression in a wide range of subjects, but is an irreversible method with an error between the original image data and the expanded reproduced image data.
[0004]
[Problems to be solved by the invention]
In quantization or inverse quantization of image compression, a single quantization table is used regardless of the variety of subjects, so that there is a problem that degradation of reproduced image data increases depending on subjects.
[0005]
In view of such problems, it is an object of the present invention to provide an image compression apparatus and a camera that predict a quantization error and facilitate image compression with little image deterioration due to quantization and inverse quantization.
[0006]
[Means for Solving the Problems]
An image compression apparatus according to the present invention includes a quantization unit that quantizes an orthogonal transform coefficient corresponding to original image data obtained from a photographing optical system using a quantization table to obtain a quantized orthogonal transform coefficient, and an orthogonal transform coefficient. And a quantization table creating means for updating the quantization table based on the above.
[0007]
In the image compression apparatus, preferably, the quantization table creating means performs orthogonal transform in which an absolute value of an error between the inverse quantized orthogonal transform coefficient and the orthogonal transform coefficient obtained by dequantizing the quantized orthogonal transform coefficient is greater than 2. A storage unit that counts the number of samples of the coefficient for each orthogonal transform coefficient and stores data of the number of samples in each image (sample number data) for a predetermined number of images is provided.
[0008]
In the image compression device, preferably, every time new sample number data is input in the storage unit, the sample number data of the oldest image stored in the storage unit is deleted, whereby a predetermined number of samples are obtained. Number data is updated.
[0009]
In the image compression apparatus, preferably, the quantization table creating means is based on a quantization error prediction unit that predicts an error based on a predetermined number of sample data, and a prediction error value obtained from the quantization error prediction unit. A quantization table calculating unit that calculates a quantization table and outputs the quantization table to the quantization means.
[0010]
In the image compression apparatus, it is preferable that the quantization table creating unit creates a quantization table from a predetermined number of sample number data including newly input sample number data. Preferably, the quantization table creating means creates a quantization table from a predetermined number of sample number data input before the newly input sample number data.
[0011]
The camera according to the present invention includes a quantization unit that quantizes an orthogonal transform coefficient corresponding to original image data obtained from a photographing optical system using a quantization table, and obtains a quantized orthogonal transform coefficient;
A quantization table creating means for updating the quantization table based on the orthogonal transform coefficient,
The quantization table creation means corresponds to the image data for one image, and the absolute value of the error between the inverse quantization orthogonal transform coefficient and the orthogonal transform coefficient obtained by inverse quantization of the quantized orthogonal transform coefficient is greater than 2. A sample number data storage means for counting the number of samples of the orthogonal transform coefficient for each orthogonal transform coefficient and storing data of the number of samples in each image (sample number data) for a predetermined number of images;
A quantization error prediction unit that predicts an error based on a predetermined number of sample data stored in the sample data storage means;
A quantization table calculating unit that calculates a quantization table based on the prediction error value obtained from the quantization error prediction unit and outputs the quantization table to the quantization unit;
Further, a recording means for recording the compressed image data, which has been compressed using the quantization table created by the quantization table creating means, on a recording medium;
Quantization table storage means for storing the created quantization table.
[0012]
In the camera, the compressed image data is preferably recorded by the recording means in the first area of the recording medium, and the quantization table used for quantization is recorded in the second area of the recording medium.
[0013]
In the camera, preferably, the quantization table creating unit uses the quantization table stored in the table storage unit for quantization, and after the compressed image data is recorded on the recording medium, the compressed image data is stored. A quantization table is created based on the sample number data corresponding to and the created quantization table is stored in the quantization table storage means, thereby updating the quantization table.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of an image compression apparatus and a camera according to the present invention will be described below with reference to the accompanying drawings.
[0015]
FIG. 1 shows a schematic configuration of a camera according to an embodiment of the present invention.
A subject image (still image) obtained through the photographing
[0016]
The luminance data Y or the color difference data Cb and Cr are subjected to two-dimensional DCT in the
[0017]
The DCT coefficients of the luminance data Y or the color difference data Cb and Cr are quantized by the
[0018]
FIG. 2 shows a conventional quantization table recommended by JPEG. 2A shows a quantization table Qy for the luminance value Y, and FIG. 2B shows a quantization table Qc for the color differences Cb and Cr.
[0019]
With reference to FIG. 3, the quantization and the inverse quantization will be described. In FIG. 3, as an example, the original image data of 8 × 8 pixels, that is, the DCT coefficient F vu of the luminance data Y, the quantized DCT coefficient R vu , the inverse quantized DCT coefficient F ′ vu , and the quantization table Qy Is shown. Subscripts v and u indicate the positions in the vertical and horizontal directions when 64 DCT coefficients are displayed in the form of an 8 × 8 matrix, respectively, and the subscript v is 0, 1, 2,. . . 7 and the subscript u is 0, 1, 2,. . . 7.
[0020]
The original image data is converted into 8 × 8 = 64 DCT coefficients F vu by the two-dimensional DCT in the
[0021]
Of the 64 DCT coefficients, the DCT component F00 at the position (0, 0) is a DC (direct current) component, and the remaining 63 DCT coefficients F vu are AC (alternating current) components. The AC component indicates how much higher spatial frequency components are present in the original image data of the 8 × 8 pixel block from the coefficient F01 or the coefficient F10 to the coefficient F77. The DC component represents an average value (DC component) of pixel values of the entire 8 × 8 pixel block. That is, each DCT coefficient F vu corresponds to a predetermined spatial frequency.
[0022]
An equation for quantizing the DCT coefficient F vu using the quantization table Qy is defined by equation (1). Round in this equation means approximation to the nearest integer. That is, the quantized DCT coefficient R vu is obtained by dividing each element of the DCT coefficient F vu and the quantization table Qy and rounding off.
[0023]
[0024]
As described above, the quantized DCT coefficient R vu obtained in the
[0025]
In order to decompress the encoded compressed image signal and display it on the screen, decoding, inverse quantization, and inverse transformation of the two-dimensional DCT (hereinafter referred to as two-dimensional IDCT) are required. This decoding is the reverse of Huffman coding and is well known in the art and will not be described in detail. The quantized DCT coefficients obtained by decoding are inversely quantized using the quantization tables Qy and Qc used for quantization, respectively, and converted into inverse quantized DCT coefficients F ′ vu . These inversely quantized DCT coefficients F ′ vu are subjected to two-dimensional IDCT , which is the inverse transformation of the two-dimensional DCT, and converted into luminance data Y ′, color difference data Cb ′, and Cr ′, respectively. The two-dimensional IDCT is also known and will not be described in detail here.
[0026]
For example, when the DCT coefficient F00 (= 261) shown in FIG. 3 is obtained by the equation (1) using the quantization coefficient q00 (= 16), the quantization DCT coefficient R00 becomes 16, and this quantization DCT coefficient R00 When (00) is multiplied by q00 (= 16), an inverse quantized DCT coefficient F′00 (= 16 × 16 = 256) is obtained. Note that a difference value i00 (256−261 = −5) between the DCT coefficient F00 (= 261) and the inverse quantization DCT coefficient F′00 (= 256) is defined as a coefficient value error. As described above, since the remainder of division is rounded in quantization, a coefficient value error i occurs in decompression (inverse quantization) of compressed image data. This is the cause of quantization error.
[0027]
FIG. 4 is a diagram showing a coefficient value error i vu for each coefficient between the DCT coefficient F vu and the quantized and inverse quantized DCT coefficient F ′ vu . The present embodiment predicts the coefficient value error i vu caused by quantization or inverse quantization in this way, calculates each quantization coefficient q vu and creates the quantization tables Qy and Qc, thereby quantizing A configuration for reducing the error is provided.
[0028]
The quantization table creation process in the quantization
For example, when one piece of image data in which the number of blocks of 8 × 8 pixels is M is input (hereinafter referred to as the latest image data), first, luminance data Y and color difference data Cb, Cr for each block in a signal processing circuit (not shown). The
[0029]
In the
[0030]
The quantization
[0031]
The quantization error prediction in the quantization
If the quantization coefficient in the quantization table Qy is q vu , the range of the coefficient value error i vu between the DCT coefficient F vu and the inverse quantization DCT coefficient F ′ vu is expressed by the following equation (2).
[0032]
−q vu / 2 ≦ i vu ≦ q vu / 2 (2)
[0033]
For example, if the quantization coefficient q vu = 6, the coefficient value error i vu corresponds to any of −3, −2, −1, 0, 1, 2, and 3. The range of the coefficient value error i vu increases as the quantization coefficient q vu increases.
[0034]
Next, it is predicted that the coefficient value error i vu of the M × N block is averagely distributed within the range shown in the equation (2), and the predicted value rms vu of the coefficient value error i vu is obtained by the equation (3). In equation (3), i is a coefficient value error i vu , q is a quantization coefficient q vu , and rms is a square root of a mean square value of the coefficient value error i vu at each spatial frequency, that is, an rms value. For example, if q = 6, rms = about 1.7795.
[0035]
[Expression 1]
[0036]
FIG. 6 shows a correspondence table between the quantization coefficient q and the rms value.
In the present embodiment, the luminance data Y is represented by 8 bits (256 levels), and the quantization coefficient q changes from 1 to 255. As well shown in this table, when the quantization coefficient q increases, the range of the coefficient value error i also increases, so that the rms value increases.
[0037]
In the present embodiment, the predetermined condition is satisfied in the M × N total blocks, for example, the absolute value of the DCT coefficients F vu at each spatial frequency a number greater than 2 DCT coefficients F vu, the number of samples E vu ( 0 ≦ E vu ≦ M × N). In this embodiment, when the absolute value of the DCT coefficient F vu is larger than 2, the coefficient value error i vu increases as the value of the quantization coefficient q vu increases, and as the number of samples E vu increases, Focusing on the fact that the quantization error increases, the prediction error total value G vu is expressed by the following equation (4).
[0038]
G vu = rms vu × E vu (4)
[0039]
If the prediction error total value G vu is uniform for each spatial frequency, the quantization error of the entire image is reduced, and reproduced image data with high recoverability can be obtained at the time of image expansion. Therefore, in the present embodiment, the prediction error total value G00 of the DCT coefficient F00, which is a DC component, is first determined to be a predetermined predetermined quantum by utilizing the property that image information is concentrated on the lower spatial frequency, particularly the DC component. It can be obtained from equation (3) and equation (4) from the conversion factor q00. The other DCT coefficients F vu (v, u ≠ 0), that is, the prediction error total value G vu of the 63 AC components is assumed to be the same value as the DC component prediction error
[0040]
[0041]
Next, the quantization table creation process in the quantization
[0042]
[Expression 2]
[0043]
For example, when processing 10 images of 480 × 720 pixels, the number of blocks M per image is 5400, and the total number of blocks M × N is 5400 × 10 = 54000. Assuming that the quantization coefficient q00 corresponding to the DC component at this time is 6 and the number of samples E00 whose DCT coefficient F00 is larger than 2 is 53940, the prediction error total value G00 = Equation (3) and (4) 1.7795 × 53940 = 95986.23 is required. If the sample number E77 whose absolute value of the AC component, for example, the DCT coefficient F77 is larger than 2, is set to 31520, the predicted quantization coefficient rms'77 = 95986.23 ÷ 31520 = about 3.0452 is obtained by the equation (5). A predicted quantization coefficient q′77 = 11 that satisfies the equation is obtained.
[0044]
Each predicted quantization coefficient q ′ vu obtained as described above is scaled according to the compression ratio, and is output to the
[0045]
FIG. 7 shows an example of the created quantization table. FIG. 7A shows a quantization table Qya for the luminance value Y, and FIG. 7B shows a quantization table Qca for the color differences Cb and Cr. Compared to FIG. 2, there is a difference in the quantization coefficient corresponding to each of the AC components.
[0046]
The statistical processing in the
[0047]
Reference is first made to FIG. In step S102, initial values of the variable BLOCKS and the variable E vu are set to 0, respectively. In step S104, the initial value of the variable v is set to 0, and in step S106, the initial value of the variable u is set to 0. In step S108, it is determined whether or not the absolute value of the DCT coefficient F vu is larger than 2. If the absolute value of the DCT coefficient F vu is larger than 2, the sample number E vu is incremented by 1 in step S110, and the process proceeds to step S112. If the absolute value of the DCT coefficient F vu is not larger than 2, the process proceeds to step S112, and the variable u is incremented by 1.
[0048]
In step S114, it is determined whether or not the variable u is 8. If u is not 8, that is, 7 or less, the process is re-executed from step S108. If u = 8, the process proceeds to step S116, and the variable v is incremented by one. Similarly, in step S118, it is determined whether or not the variable v is 8. If v is not 8, that is, 7 or less, the process is re-executed from step S106. If v = 8, the process proceeds to step S120.
[0049]
In step S120, the variable BLOCKS is incremented by 1. In step S122, it is determined whether or not the variable BLOCKS is the total number of blocks BA. If BLOCKS is not BA, the process is re-executed from step S104, and if BLOCKS = BA, the process proceeds to step S124.
[0050]
Thus, in the matrix F vu of the DCT coefficients of 8 × 8, most sample sizes E vu horizontal row on the first counting from left to right, sequentially the number of samples E vu of the next horizontal row is counted. That is, in the process of FIG. 8, the number of samples E vu whose absolute value of the DCT coefficient F vu is greater than 2 is counted in each of the 64 frequency components.
[0051]
Reference is now made to FIG. In step S124, the initial value of variable v is set to 0. In step S126, the initial value of variable u is set to 0. In step S128, the initial value of variable i representing the number of images is set to 0. In step S130, E vu [i + 1] is converted to E vu [i]. For example, E [1] becomes E [0] and E [6] becomes E [5]. In step S134, it is determined whether or not the variable i is equal to a number (N-1) that is one less than the number of images. If the variable i is not equal to (N-1), step S130 is re-executed, and if the variable i is equal to (N-1), the process proceeds to step S136. In step S136, E vu [N-1] is set to E vu , and the process proceeds to step S138.
[0052]
In step S138, the variable u is incremented by 1. In step S140, it is determined whether or not the variable u is 8. If u is not 8, that is, 7 or less, the process is re-executed from step S128. If u = 8, the process proceeds to step S142, and the variable v is incremented by one. Similarly, in step S144, it is determined whether or not the variable v is 8. If v is not 8, that is, 7 or less, the process is re-executed from step S126. If v = 8, the process ends.
[0053]
For example, N = 10 sample number data (E [0], E [1],... E [9]; the larger the value in parentheses indicates the more recent image data is) It is assumed that it is stored in the
[0054]
The quantization error prediction process in the quantization
[0055]
Reference is first made to FIG. In step S202, the initial value of the variable E vu is set to 0. In step S204, the initial value of the variable v is set to 0, and in step S206, the initial value of the variable u is set to 0. In step S208, the initial value of the variable i is set to zero.
[0056]
In step S210, the number of samples E vu [i] at each spatial frequency is added. In step S212, the variable i is incremented by 1, and the process proceeds to step S214. In step S214, it is determined whether or not the variable i is N. If i is not N, the process is re-executed from step S210. If it is determined that the variable i is N, the process proceeds to step S216. In other words, N sums of the number of samples E vu at each spatial frequency are obtained by the processing from step S208 to step S214.
[0057]
In step S216, the variable u is incremented by 1. In step S218, it is determined whether the variable u is 8. If u is not 8, that is, 7 or less, the process is re-executed from step S208. If u = 8, the process proceeds to step S220, and the variable v is incremented by one. Similarly, in step S222, it is determined whether or not the variable v is 8. If v is not 8, that is, 7 or less, the process is re-executed from step S206. If v = 8, the process proceeds to step S302.
[0058]
Thus, in the process of FIG. 10, the total Evu of the number of samples E vu [i] of each image i counted in the flowchart of FIG. 8 is obtained for each spatial frequency.
[0059]
Reference is now made to FIG. In step S302, the initial value of the variable v is set to 0, and in step S304, the initial value of the variable u is set to 0. In step S306, it is determined whether or not the variables v and u are both 0. If both the variables v and u are 0, the process proceeds to step S308. If both the variables v and u are not 0, the process proceeds to step S310.
[0060]
In step S308, based on a predetermined quantization coefficient q00, the rms value of q00, that is, rms00, is obtained using equation (3). By multiplying rms00 by the number of samples E00, a prediction error total value G00 is obtained, and the process proceeds to step S312.
[0061]
In step S310, the prediction error total value G00 and the number of samples E vu are substituted into equation (5) to obtain rms ′ vu which is an rms value. Thereafter, the predicted quantization coefficient q ′ vu is obtained by substituting rms ′ vu into the equation (6), and the process proceeds to step S312.
[0062]
In step S312, the variable u is incremented by 1. In step S314, it is determined whether or not the variable u is 8. If u is not 8, that is, 7 or less, the process is re-executed from step S306. If u = 8, the process proceeds to step S316, and the variable v is incremented by one. Similarly, in step S318, it is determined whether or not the variable v is 8. If v is not 8, that is, 7 or less, the process is re-executed from step S304. If v = 8, the process ends.
[0063]
Thus, first, the DC component prediction error total value G00 is obtained from the quantization coefficient q00, and the DC component rms00 is determined (step S308). Then, each rms value rms ' vu of the AC component is obtained from each total sample number E vu and the prediction error total value G00, and a predicted quantization coefficient q' vu (v, u ≠ 0) is calculated (step S310). . That is, in the process of FIG. 11, 63 predicted quantization coefficients q ′ vu corresponding to each frequency component of the AC component are determined based on the DC component prediction error total value G00.
[0064]
In the first embodiment, a quantization
[0065]
FIG. 12 is a diagram showing a second embodiment of the present invention. The same components as those of the first embodiment are denoted by the same reference numerals as those of the first embodiment, and description thereof is omitted here. In the second embodiment, the quantization table created by the quantization
[0066]
The quantization
[0067]
Next, in the quantization
[0068]
Accordingly, the quantization tables Qy and Qc used for quantization are created based on previously input image data. In the second embodiment, as in the first embodiment, the quantization error is predicted from the DCT coefficient of each image, and the quantization tables Qy and Qc are created by updating the error statistic. Reproduced image data with a small quantization error can be obtained with the amount of compressed image data. Furthermore, in the second embodiment, the quantization tables Qy and Qc need only be read from the quantization
[0069]
【The invention's effect】
According to the present invention, it is possible to provide an image compression apparatus and a camera that predict a quantization error and facilitate image compression with little image deterioration due to quantization and inverse quantization.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of a camera according to the present invention.
FIG. 2 is a diagram showing a JPEG recommended luminance data quantization table and a color difference data quantization table;
FIG. 3 is a diagram illustrating a DCT coefficient F vu , a quantized DCT coefficient R vu , an inverse quantized DCT coefficient F ′ vu , and a quantization table Qy of luminance data Y.
FIG. 4 is a diagram showing a coefficient value error i vu for each coefficient between a DCT coefficient F vu and an inverse quantized DCT coefficient F ′ vu .
FIG. 5 is a block diagram showing a flow in a quantization table creation circuit.
FIG. 6 is a table showing a correspondence between a quantization coefficient q and an rms value.
FIG. 7 is a diagram illustrating a created luminance data quantization table Qya and a color difference data quantization table Qca.
FIG. 8 is a diagram showing the first half of a flowchart of quantization error statistical processing;
FIG. 9 is a diagram illustrating a latter half of a flowchart of quantization error statistical processing;
FIG. 10 is a diagram showing the first half of a flowchart of quantization error prediction processing;
FIG. 11 is a diagram illustrating a latter half of the flowchart of the quantization error prediction process;
FIG. 12 is a block diagram showing a second embodiment of the camera according to the present invention.
[Explanation of symbols]
10
Claims (9)
絶対値が所定値よりも大きい前記直交変換係数の標本数をカウントし、各画像における前記標本数のデータ(標本数データ)を所定画像枚数分だけ格納する格納部を備え、前記格納部への新たな画像の前記標本数データの入力と、前記格納部において、前記所定枚数を超えて新たな画像の前記標本数データを入力する毎に、前記格納部に格納した最も古い画像の前記標本数データを消去することにより、前記標本数データの更新が可能であって、絶対値が所定値よりも大きい第1の直交変換係数と対応する逆量子化直交変換係数とが取り得る係数値誤差の二乗平均の平方根(rms値)を算出し、更新された前記標本数データにおける前記第1の直交変換係数の前記標本数と前記rms値との乗算により予測誤差合計値を求め、前記予測誤差合計値を更新された前記標本数データにおける第2の直交変換係数の前記標本数で除算して、前記第2の直交変換係数に対応したrms値として表わされる予測誤差値を求め、前記直交変換係数に対応する量子化係数のうち、前記予測誤差値が前記第2の直交変換係数に対応した前記rms値となる場合の前記量子化係数に基づいて、前記量子化テーブルを更新する量子化テーブル作成手段とを備えたことを特徴とする画像圧縮装置。Quantization means for quantizing the orthogonal transform coefficient corresponding to the original image data obtained from the photographing optical system using a quantization table and obtaining the quantized orthogonal transform coefficient;
A storage unit that counts the number of samples of the orthogonal transform coefficient whose absolute value is greater than a predetermined value, and stores the data of the number of samples in each image (sample number data) for a predetermined number of images; The number of samples of the oldest image stored in the storage unit each time the sample number data of the new image is input and the sample number data of the new image exceeding the predetermined number is input in the storage unit. By deleting the data, the sample number data can be updated, and the coefficient value error that can be taken by the first orthogonal transform coefficient whose absolute value is larger than the predetermined value and the corresponding inverse quantization orthogonal transform coefficient can be reduced. A root mean square (rms value) is calculated, a prediction error total value is obtained by multiplying the rms value by the number of samples of the first orthogonal transform coefficient in the updated sample number data, and the prediction error The calculated value is divided by the number of samples of the second orthogonal transform coefficient in the updated sample number data to obtain a prediction error value expressed as an rms value corresponding to the second orthogonal transform coefficient, and the orthogonal transform A quantization table that updates the quantization table based on the quantization coefficient when the prediction error value is the rms value corresponding to the second orthogonal transform coefficient among the quantization coefficients corresponding to the coefficient An image compression apparatus comprising: creation means.
絶対値が2よりも大きい前記直交変換係数の標本数をカウントする前記格納部を備えたことを特徴とする請求項1に記載の画像圧縮装置。The quantization table creating means includes
The image compression apparatus according to claim 1, further comprising: the storage unit that counts the number of samples of the orthogonal transform coefficient whose absolute value is greater than two.
前記量子化直交変換係数を逆量子化して求められる逆量子化直交変換係数と前記直交変換係数との誤差である画像全体の量子化誤差を、
絶対値が所定値よりも大きい前記直交変換係数と対応する逆量子化直交変換係数とが取り得る係数値誤差の二乗平均の平方根(rms値)であって直流成分に対応する前記rms値と、前記格納されている前記標本数データにおける前記直流成分の前記標本数との乗算により予測誤差合計値を求め、前記予測誤差合計値を前記格納されている前記標本数データにおける交流成分の前記標本数で除算して、前記交流成分に対応した前記rms値として表わされる予測誤差値を求めることにより、予測する量子化誤差予測部と、
前記直交変換係数に対応する量子化係数のうち、前記量子化誤差予測手段から得られた前記予測誤差値が前記係数値誤差の二乗平均の平方根となる場合の前記量子化係数を、前記画像全体の量子化誤差を小さくする予測量子化係数として算出し、前記量子化手段に出力する量子化テーブル算出部とを備えることを特徴とする請求項1に記載の画像圧縮装置。The quantization table creating means includes
The quantization error of the entire image, which is an error between the inversely quantized orthogonal transform coefficient obtained by dequantizing the quantized orthogonal transform coefficient and the orthogonal transform coefficient,
The rms value corresponding to the DC component of the root mean square (rms value) of the coefficient value error that can be taken by the orthogonal transform coefficient corresponding to the orthogonal transform coefficient having an absolute value larger than a predetermined value ; A prediction error total value is obtained by multiplying the DC component in the stored sample number data by the sample number, and the prediction error total value is calculated as the sample number of the AC component in the stored sample number data. A quantization error prediction unit for predicting by calculating a prediction error value expressed as the rms value corresponding to the AC component by dividing by
Of the quantized coefficients corresponding to the orthogonal transform coefficients , the quantized coefficient when the predicted error value obtained from the quantized error predicting means is a square root of the root mean square of the coefficient value error, the entire image the image compression apparatus according to claim 1, characterized in that it comprises a quantization table calculating unit that calculates a predictive quantization coefficients to reduce the quantization error, and outputs before Symbol quantizing means.
前記直交変換係数に基づいて、前記量子化テーブルを更新する量子化テーブル作成手段と、
前記量子化テーブル作成手段が、1画像分の画像データに対応し、絶対値が所定値よりも大きい前記直交変換係数の標本数を、前記直交変換係数毎にカウントし、各画像における前記標本数のデータ(標本数データ)を、所定画像枚数分だけ格納可能な標本数データ格納手段と、
前記標本数データ格納手段に格納されている所定枚数の前記標本数データに基づいて、前記量子化直交変換係数を逆量子化して求められる逆量子化直交変換係数と前記直交変換係数との誤差である画像全体の量子化誤差を、
絶対値が所定値よりも大きい第1の直交変換係数と対応する逆量子化直交変換係数とが取り得る係数値誤差の二乗平均の平方根(rms値)と、前記格納されている前記標本数データにおける前記第1の直交変換係数の前記標本数との乗算により予測誤差合計値を求め、前記予測誤差合計値を前記格納されている前記標本数データにおける第2の直交変換係数の前記標本数で除算して前記第2の直交変換係数に対応したrms値として表される予測誤差値を求めることにより、予測する量子化誤差予測部と、
前記直交変換係数に対応する量子化係数のうち、前記量子化誤差予測部から得られた前記予測誤差値が前記第2の直交変換係数に対応した前記rms値となる場合の前記量子化係数を、前記画像全体の量子化誤差を小さくする予測量子化係数として算出し、前記予測量子化係数に基づいて量子化テーブルを算出し、前記量子化手段に出力する量子化テーブル算出部とを備え、
さらに前記量子化テーブル作成手段によって作成された前記量子化テーブルを用いて画像圧縮された圧縮画像データを記録媒体に記録する記録手段と、
作成された前記量子化テーブルを格納する量子化テーブル格納手段とを備え、
前記量子化手段が、前記テーブル格納手段に格納されている前記量子化テーブルを、量子化に用いるとともに、前記量子化テーブル作成手段が、前記記録媒体への前記圧縮画像データの記録が完了した後に、この圧縮画像データと対応する前記標本数データに基づいた前記量子化テーブルを作成し、前記量子化テーブル格納手段が、作成された前記量子化テーブルを格納することにより、前記量子化テーブルを更新することを特徴とするカメラ。Quantization means for quantizing the orthogonal transform coefficient corresponding to the original image data obtained from the photographing optical system using a quantization table and obtaining the quantized orthogonal transform coefficient;
A quantization table creating means for updating the quantization table based on the orthogonal transform coefficient ;
The quantization table creating means counts the number of samples of the orthogonal transform coefficient corresponding to the image data for one image and whose absolute value is larger than a predetermined value for each orthogonal transform coefficient, and the number of samples in each image Sample number data storage means capable of storing a predetermined number of image data (sample number data),
Based on a predetermined number of the sample number data stored in the sample number data storage means, an error between an inverse quantized orthogonal transform coefficient obtained by dequantizing the quantized orthogonal transform coefficient and the orthogonal transform coefficient The quantization error of an entire image
The root mean square (rms value) of the coefficient value error that can be taken by the first orthogonal transform coefficient whose absolute value is larger than a predetermined value and the corresponding inverse quantization orthogonal transform coefficient, and the stored sample number data A prediction error total value is obtained by multiplying the first orthogonal transform coefficient by the number of samples in, and the prediction error total value is calculated as the number of samples of the second orthogonal transform coefficient in the stored sample number data. A quantization error prediction unit for predicting by calculating a prediction error value expressed as an rms value corresponding to the second orthogonal transform coefficient by dividing ;
Of the quantization coefficients corresponding to the orthogonal transform coefficients, the quantization coefficient when the prediction error value obtained from the quantization error prediction unit is the rms value corresponding to the second orthogonal transform coefficient. the image to calculate the overall quantization error as the predictive quantization coefficients to reduce said calculating a quantization table based on the predicted quantization factor, and a said quantization table calculating unit for outputting the quantization means,
Further, a recording unit that records compressed image data that has been image-compressed using the quantization table created by the quantization table creating unit, on a recording medium;
Quantization table storage means for storing the created quantization table ,
After the quantization means uses the quantization table stored in the table storage means for quantization and the quantization table creation means completes recording of the compressed image data on the recording medium The quantization table is created based on the sample number data corresponding to the compressed image data, and the quantization table storage unit updates the quantization table by storing the created quantization table. the camera according to claim to Rukoto.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17291897A JP3645690B2 (en) | 1997-06-13 | 1997-06-13 | Image compression apparatus and camera |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17291897A JP3645690B2 (en) | 1997-06-13 | 1997-06-13 | Image compression apparatus and camera |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH114438A JPH114438A (en) | 1999-01-06 |
| JP3645690B2 true JP3645690B2 (en) | 2005-05-11 |
Family
ID=15950773
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17291897A Expired - Fee Related JP3645690B2 (en) | 1997-06-13 | 1997-06-13 | Image compression apparatus and camera |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3645690B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4899053A (en) * | 1987-10-21 | 1990-02-06 | Criticare Systems, Inc. | Solid state non-dispersive IR analyzer using electrical current-modulated microsources |
-
1997
- 1997-06-13 JP JP17291897A patent/JP3645690B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH114438A (en) | 1999-01-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101454990B (en) | Video compression method | |
| JP3356663B2 (en) | Image encoding device, image encoding method, and recording medium recording image encoding program | |
| US5864637A (en) | Method and apparatus for improved video decompression by selective reduction of spatial resolution | |
| EP0854653A2 (en) | Fast inverse discrete cosine transform system and method and video compression/decompression system | |
| JP3579544B2 (en) | Image compression / decompression device | |
| JPH09247675A (en) | Image compression method and image compression system | |
| JPH1075448A (en) | Image compression device and image decompression device | |
| US20070019875A1 (en) | Method of further compressing JPEG image | |
| JP3222780B2 (en) | Image compression device | |
| JP3375539B2 (en) | Image compression device and image decompression device | |
| JP3645690B2 (en) | Image compression apparatus and camera | |
| JP3645689B2 (en) | Image compression apparatus and quantization table creation apparatus | |
| US20020173952A1 (en) | Coding | |
| US6445870B1 (en) | Image compression and expansion device | |
| JP3260284B2 (en) | Image compression device and image decompression device | |
| JP3559314B2 (en) | Image compression device | |
| EP1345449A1 (en) | Digital image compression and decompression using block coding | |
| JP3709106B2 (en) | Image compression and decompression device | |
| JP3655734B2 (en) | Image compression apparatus and image display apparatus | |
| JPH06113291A (en) | Picture coder and decoder | |
| JP3392949B2 (en) | Image compression device and image decompression device | |
| KR100744442B1 (en) | Improved Cascade Compression Method and System for Digital Video and Images | |
| JPH08289290A (en) | Image reproducing device | |
| US20090110312A1 (en) | Method of image compression with intelligent prediction mechanism | |
| JPH0487471A (en) | Picture processing unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040224 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040426 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040927 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041007 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050121 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050204 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090210 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100210 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110210 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120210 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130210 Year of fee payment: 8 |
|
| LAPS | Cancellation because of no payment of annual fees |