JP3932244B2 - Image encoding / decoding method and apparatus, and recording medium recording the program - Google Patents

Image encoding / decoding method and apparatus, and recording medium recording the program Download PDF

Info

Publication number
JP3932244B2
JP3932244B2 JP2000141675A JP2000141675A JP3932244B2 JP 3932244 B2 JP3932244 B2 JP 3932244B2 JP 2000141675 A JP2000141675 A JP 2000141675A JP 2000141675 A JP2000141675 A JP 2000141675A JP 3932244 B2 JP3932244 B2 JP 3932244B2
Authority
JP
Japan
Prior art keywords
vector
basis
block
image
nest
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
Application number
JP2000141675A
Other languages
Japanese (ja)
Other versions
JP2001326935A (en
Inventor
史彦 板垣
深雪 川島
Original Assignee
株式会社ハドソン
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 株式会社ハドソン filed Critical 株式会社ハドソン
Priority to JP2000141675A priority Critical patent/JP3932244B2/en
Priority to CA 2328037 priority patent/CA2328037A1/en
Priority to US09/731,484 priority patent/US6714687B2/en
Priority to KR1020000076886A priority patent/KR100741553B1/en
Priority to TW89127438A priority patent/TW503666B/en
Priority to MXPA01001104 priority patent/MXPA01001104A/en
Priority to EP20010301069 priority patent/EP1156679A3/en
Priority to CN01104592A priority patent/CN1324060A/en
Publication of JP2001326935A publication Critical patent/JP2001326935A/en
Priority to US10/760,291 priority patent/US7231089B2/en
Application granted granted Critical
Publication of JP3932244B2 publication Critical patent/JP3932244B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/008Vector quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/649Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding the transform being applied to non rectangular image segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/94Vector quantisation

Description

【0001】
【発明の属する技術分野】
本発明は画像符号/復号方法及びその装置並びにそのプログラムを記録した記録媒体に関し、更に詳しくはハイブリッドベクトル量子化(HVQ:Hybrid Vector Quantization)方式による画像符号/復号方法及びその装置並びにそのプログラムを記録した記録媒体に関する。
【0002】
今日、静止画圧縮の国際標準であるJPEG(Joint Photographic Expert Group)方式では、8×8の画素ブロックを2次元DCTによりDC値及び基本〜63倍周波数の各係数値に変換すると共に、自然画の周波数成分が低周波領域に集中していることを利用して画品質が低下しない範囲内で各係数値を異なる量子化幅で量子化し、情報量の削減を行ってからハフマン符号化を行っている。
【0003】
これに対してHVQ方式は、JPEGと同様に平均値分離型ブロック符号化の一種であるが、ベクトル量子化と直交変換符号化の中間方式である適応的直交変換(AOT:Adaptive Orthogonal Transform)をその圧縮原理としている。ここで、AOTはベクトル量子化のコードブックに相当する基底の巣(ネスト)から必要最少数の非直交基底系を選択し、対象ブロックを所望の許容誤差Z以内に近似する方式である。HVQ方式では復号演算を整数型で行えるため、復号が高速である。またJPEGに特有なモスキート及びブロックノイズ、GIFに特有な擬似輪郭が発生しないため自然画像,人工画像(アニメーション画像,CG画像)を高画質で高圧縮できる。本発明はこのようなHVQ方式における画質の更なる改善及び符号化演算の高速化に関する。
【0004】
【従来の技術】
本件出願人は画像の自己相似性を利用したHVQ方式による画像符号/復号方法を既に提案している(特願平10-189239)。以下その内容を説明する。なお、本明細書を通して記号〈a〉はベクトルa又はブロックa、記号‖a‖はベクトルaの大きさ(ノルム)、記号〈a・b〉はベクトルa,bの内積を表す。また図や[数]中のベクトルやブロックを太文字で表す。
【0005】
図13は従来の画像符号装置(エンコーダ)のブロック図で、図において、11は原画像データを記憶する原画像メモリ、12は原画像データの各画素ブロック(4×4画素)につきブロック平均(DC)値を求めるDC値生成部、13は各DC値につき差分予測符号化を行う差分PCM符号部(DPCM)、14は差分PCM符号から各DC値を復号する逆DPCM符号部(IDPCM)、15は復号DC画像を記憶するDC画像メモリ、16はDC画像の一部から所定サイズのDCネストを切り出すDCネスト生成部、17はDCネストを記憶するDCネストメモリである。
【0006】
更に、18は符号対象であるターゲット画像ブロック〈Rj〉から対応する復号DC値DCJを分離する減算器、19はDC分離された残差ベクトル〈dj〉を記憶する残差ベクトルバッファ、20はDCネストからダウンサンプルされた4×4画素の基底候補ブロック〈Ui〉を記憶する候補ブロックバッファ、21は基底候補ブロック〈Ui〉のブロック平均値aiを求める平均器、22は基底候補ブロック〈Ui〉からブロック平均値aiを分離する減算器、23は平均値分離された基底候補ベクトル〈ui〉を記憶する候補ベクトルバッファ、24は、残差ベクトルの二乗ノルム‖dj2が許容誤差Zを超える場合に、DCネストを探索して残差ベクトル〈dj〉を許容誤差Z以内に近似するための直交基底系αk〈uk'〉(k=1〜m)を生成する適応的直交変換処理部(AOT)、25は生成された直交基底系αk〈uk'〉(k=1〜m)につき、各対応する非直交基底ベクトル〈uk〉(k=1〜m)に掛けて等価な非直交基底系βk〈uk〉(k=1〜m)を生成するための展開係数βkを求める係数変換部、26は上記DC値のDPCM符号や非直交基底系βk〈uk〉等の情報を更に圧縮符号化するためのハフマン,ランレングス,固定長符号等による符号部である。
【0007】
DC値生成部12は4×4画素のブロック平均値を求め、小数点以下を四捨五入(又は切り捨て等)する。DPCM13は、図示しないが、J行,I列のDC値をDCJ,I とする時に、該DCJ,I の予測値DCJ,I'を例えばDCJ,I'=(DCJ,I-1 +DCJ-1,I )/2により求め、その予測誤差ΔDCJ,I =DCJ,I −DCJ,I'を量子化係数Q(Z) により線形量子化して出力する。この量子化係数Q(Z)は許容誤差Zと対応付けられており、許容誤差Zに応じて1〜8の範囲で変化する。
【0008】
DCネスト生成部16はDC画像から例えば縦39×横71の領域をそのまま切り出(コピー)してDCネストとする。DCネストはコードブックとして使用されるため、交流成分を多く含むものが望ましい。そこで、複数の候補領域につき、各領域内で隣り合うDC値の差分をとってこれらの絶対値等の総和を求め、総和が最大となるような領域を切り出してDCネストとする。
【0009】
また基底候補ブロック〈Ui〉のダウンサンプルは、縦横1DC値毎に頂点(px,py)∈[0,63]×[0,31]を設定し、かつそのサブサンプル間隔は(sx,sy)∈{(1,1),(1,2),(2,1),(2,2)}の計4種類とする。従って、トータルではN(=8192)個の基底候補ブロック〈Ui〉が存在し、これらはAOT24からのインデクスカウンタiで参照される。以下、従来の適応的直交変換処理部24の動作を説明する。
【0010】
図14は従来の適応的直交変換処理のフローチャート、図15で該処理のイメージ図である。図14において、残差ベクトルの二乗ノルム‖〈dj〉‖2>Zであるとこの処理に入力する。ステップS121ではレジスタEに残差ベクトルの二乗ノルム‖〈dj〉‖2をセットする。また基底数カウンタk=1に初期化する。ステップS122では最小値保持レジスタE’に大きな値(例えば100000)をセットする。ステップS123では基底候補ブロック〈Ui〉のインデクスカウンタi=0に初期化する。これはDCネストの開始アドレス(px,py)=(0,0),サブサンプル間隔(sx,sy)=(1,1)に対応する。
【0011】
ステップS124では基底候補ブロック〈Ui〉からそのブロック平均値aiを分離して基底候補ベクトル〈ui〉を生成する。この演算は整数精度で行われるため、ブロック平均値aiに小数点以下の値が発生した場合はこれを四捨五入(又は切り捨て等)する。ステップS125では必要(k>1)なら基底候補ベクトル〈ui〉をそれ以前の直交基底ベクトル〈uk'〉に直交化する。
【0012】
図15(A),(B)に直交化処理のイメージ図を示す。図15(A)において、まず第1基底候補ベクトル〈u1〉はそのままで第1基底ベクトル〈u1'〉となり得る。次に第2基底候補ベクトル〈u2〉は以下の方法により第1基底ベクトル〈u1'〉に直交化される。即ち、第2基底候補ベクトル〈u2〉の第1基底ベクトル〈u1'〉への射影は(1)式の関係で得られる。
【0013】
【数1】

Figure 0003932244
【0014】
従って、第2直交ベクトル〈u2'〉は第2基底候補ベクトル〈u2〉から前記射影分のベクトルを引くことで得られる。
【0015】
【数2】
Figure 0003932244
【0016】
図15(B)において、次に第3基底候補ベクトル〈u3〉を第1,第2の基底ベクトル〈u1'〉,〈u2'〉に直交化する。この図は3次元的に描かれている。まず第3基底候補ベクトル〈u3〉を第1基底ベクトル〈u1'〉に直交化すると上記同様にして中間の直交ベクトル〈u3''〉が得られる。
【0017】
【数3】
Figure 0003932244
【0018】
更にこの中間直交ベクトル〈u3''〉を第2基底ベクトル〈u2'〉に直交化すると第3基底ベクトル〈u3'〉が得られる。
【0019】
【数4】
Figure 0003932244
【0020】
図13に戻り、ステップS126では得られた直交ベクトル〈ui'〉を使用し、残差ベクトル〈dk〉(但し、最初は〈dj〉)との距離を最小とする様なスカラー係数αiを求める。
【0021】
図15(C)にその処理イメージを示す。図において、ある時点の残差ベクトルを〈dk〉とする時に、これを直交ベクトル〈ui'〉で近似した後の残差ベクトルの二乗ノルムei=‖〈dk〉−αi〈ui'〉‖2が最小となるのは、図より明らかなように、直交ベクトル〈ui'〉にスカラー係数αiを掛けたものと、残差ベクトル{〈dk〉−αi〈u'〉}とが直交する時(内積=0)である。従って、スカラー係数αiは(5)式の関係により求まる。
【0022】
【数5】
Figure 0003932244
【0023】
なお、図には残差ベクトル〈dk〉(但し、k=0)を他の第1基底候補ベクトル〈uj'〉で近似した場合が描かれている。第1基底候補ベクトル〈uj'〉は任意方向をとり得るから、図示のようなイメージとなる。
【0024】
図14に戻り、ステップS127では残差ベクトル〈dk〉を基底候補ベクトルαi〈ui'〉で近似した後の誤差ベクトルの二乗ノルムeiを求める。この演算は(6)式により得られる。
【0025】
【数6】
Figure 0003932244
【0026】
ステップS128ではei<E'か否かを判別する。ei<E'の場合はステップS129でE'の内容をeiで更新する。またその時のαi,〈ui'〉,〈ui〉等に係る情報を配列[αk],[uk'],[uk]に保持する。またei<E'でない場合は上記ステップS129の処理をスキップする。
【0027】
ステップS130ではカウンタiに+1し、更にステップS131ではi≧N(=8192)か否かを判別する。i≧Nでない場合はステップS124に戻り、次の基底候補ベクトル〈ui〉につき上記同様の処理を行う。以下同様にして進み、やがて、ステップS131の判別でi≧Nになるとこの段階における全基底候補ベクトル〈ui〉が試されたことになる。この時、レジスタE'は最小の二乗ノルムeiを保持している。
【0028】
ステップS132ではE’≦Zか否かを判別し、E’≦Zでない場合はステップS133でE=E'とする。即ち、残差ベクトルの二乗ノルムを更新する。ステップS134ではkに+1し、ステップS122に戻る。またE’≦Zの場合はこの処理を抜ける。こうして、最初の残差ベクトル〈dj〉との差を許容誤差Z以下に近似するための直交基底系αk〈uk'〉(k=1〜m)が得られる。
【0029】
【発明が解決しようとする課題】
しかし、上記従来方式では基底候補ブロック〈Ui〉のブロック平均値aiにつきその小数点以下を四捨五入(又は切り捨て等)していたため、画質の改善が頭打ちとなる不都合があった。これを図16に従って説明する。
【0030】
図16(a)は基底候補ブロック〈Ui〉のある行の画素値を列(x)方向に見た場合を示している。実際は16画素分のブロック平均値であるが、ここでは説明の簡単のため4画素で説明する。図16(a)において、各画素値は「5,2,4,3」からなりそのブロック平均値ai=3.5である。今、例えばこの小数点以下を切り捨てるとすると、図16(b)に示す如く、基底候補ベクトル〈ui〉のブロック平均値ai=0.5となる。図16(c)において、復号ブロックのDC値DCJに基底ベクトルβk〈uk〉を加算すると、復号画像のターゲットブロック〈Rj〉にはDC成分(ai=0.5)が重畳されてしまう。しかも、基底数が複数の場合は、このようなDC成分は0<ai<1の範囲の様々な値でDCJに重畳される結果、復号画像ではブロック毎に一種の雑音が重畳された形となり、このため画質の改善が図れなかった。以上のことは小数点以下を四捨五入又は切り上げする場合も同様である。
【0031】
また、従来のAOT処理では各基底候補ベクトル〈ui〉を一々前の基底ベクトル〈uk'〉に直交化していたため、AOT処理に多大の演算と時間を要していた。
【0032】
本発明は上記従来技術の問題点に鑑み成されたもので、その目的とする所は、より高画質かつ高速の符号/復号が得られる画像符号/復号方法及びその装置並びにそのプログラムを記録した記録媒体を提供することにある。
【0033】
【課題を解決するための手段】
上記の課題は例えば図1の構成により解決される。即ち、本発明(1)の画像符号方法は、画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成し、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストとするステップと、符号対象の画素ブロック〈Rj〉からそのブロック平均値DCJを分離した後の残差ベクトル〈dj〉の大きさが所定の許容値Zを超えると判定した場合に、前記DCネストより順次基底候補ブロック〈U〉を抽出し、該ブロックからブロック平均値aiを分離して基底候補ベクトル〈ui〉を生成し、該基底候補ベクトルを使用した適応的直交変換(AOT)処理により前記残差ベクトルを許容値以下に近似するための1又は2以上の基底ベクトルを求めるステップと、を備えるものである。従って、ブロック平均値aiに小数点以下の端数は生ぜず、整数精度のブロック平均値aiが高速に得られる。また、1回のネスト生成処理でその下位nビットを0にされたDCネストが効率よく得られる。
【0034】
また、本発明(2)の画像符号方法は、画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成し、その一部をDCネストとするステップと、符号対象の画素ブロックからそのブロック平均値を分離した後の残差ベクトルの大きさが所定の許容値を超えると判定した場合に、前記DCネストより順次基底候補ブロックを抽出し、該ブロックを構成する各DC画素の下位n(n=log2B)ビットを0にしてからそのブロック平均値を分離して基底候補ベクトル〈ui〉を生成し、該基底候補ベクトルを使用した適応的直交変換処理により前記残差ベクトルを許容値以下に近似するための1又は2以上の基底ベクトルを求めるステップと、を備えるものである。
【0036】
上記本発明(1),(2)のような基底候補ベクトル〈ui〉はその全要素の和(ブロック平均値)が常に0であり、DC成分が完全に分離されている。従って、復号側でこのような基底ベクトル〈uk〉を幾つ重ねても不要なDC成分(雑音)は生じない。そして、これにより本HVQ方式の画質が大幅に改善された。
【0039】
また好ましくは本発明(3)においては、上記本発明(1)又は(2)において、適応的直交変換処理は DCネストを使用して最初の残差ベクトル〈d〉との差の大きさを最小とするための第1基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトル〈u〉とするときに、
i=〈d・ui2/‖ui2
を最大とする前記基底候補ベクトル〈u〉を第1基底ベクトル〈u〉として抽出するステップと、該第1基底ベクトル〈u1〉をその大きさで正規化して第1正規化基底ベクトル〈v1〉となし、これを保持するステップと、第1スカラー係数α1を残差ベクトル〈d〉の第1正規化基底ベクトル〈v1〉への射影分として求め、これを保持するステップと、を備えるものである。
【0040】
本発明()によれば、図14の従来のステップS126,S127で行っていたような最初の残差ベクトル〈d〉との差の二乗ノルム‖〈d〉−αi〈ui〉‖2を最小とするような条件を上記簡単な演算及び条件で探索できる。従って、AOT処理を高速化できる。例えば第1スカラー係数α 1 の演算は、抽出された第1正規化基底ベクトル〈v 1 〉への射影分として一回求めれば良く、演算が大幅に簡略化される。
【0041】
また好ましくは本発明(4)においては、上記本発明(3)において、適応的直交変換処理は 最初の残差ベクトル〈d〉を第1スカラー係数α1と第1正規化基底ベクトル〈v1〉とのスカラー積α〈v〉により近似した後の第1残差ベクトル〈d〉が所定の許容値を超えると判定した場合に、DCネストを使用して第1残差ベクトル〈d〉との差の大きさを最小とするための第2基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトル〈u〉とするときに、
i={〈d・ui〉−(〈d・u1〉〈u1・ui〉)/‖u122
/{‖ui2−(〈u1・ui〉)/‖u1‖)2
を最大とする前記基底候補ベクトル〈u〉を第2基底ベクトル〈u〉として抽出するステップと、該第2基底ベクトル〈u〉を正規化及び第1正規化基底ベクトル〈v1〉に直交化して第2正規化基底ベクトル〈v〉となし、これを保持するステップと、第2スカラー係数αを第1残差ベクトル〈d〉の第2正規化基底ベクトル〈v〉への射影分として求め、これを保持するステップと、を備えるものである。
【0042】
本発明()によれば、上記本発明()の効果に加え、上式分子の〈d・u1〉,‖u1‖及び分母の‖ui2,‖u1‖については既に第1基底探索で行った演算結果を利用できるため、AOT処理を更に効率化、高速化できる。また、ベクトルの直交化演算も抽出した第2基底ベクトル〈u 〉につき第1正規化基底ベクトル〈v 1 〉に対して1回行えば良く、演算が大幅に簡略化される。
【0043】
また好ましくは本発明(5)においては、上記本発明(4)において、適応的直交変換処理は 第1残差ベクトル〈d〉を第2スカラー係数αと第2正規化基底ベクトル〈v〉とのスカラー積α2〈v2〉により近似した後の第2残差ベクトル〈d〉が所定の許容値を超えると判定した場合に、DCネストを使用して第2残差ベクトル〈d〉との差の大きさを最小とするための第3基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトル〈u〉とするときに、
i
(〈d・ui〉−d・v1〉〈v1・ui〉−〈d・v2〉〈v2・ui〉)2
/{‖ui2−〈v1・ui2−〈v2・ui2
を最大とす前記基底候補ベクトル〈u〉を第3基底ベクトル〈u〉として抽出するステップと、該第3基底ベクトル〈u〉を正規化及び第1正規化基底ベクトル〈v1〉と第2正規化基底ベクトル〈v〉とに直交化して第3正規化基底ベクトル〈v〉となし、これを保持するステップと、第3スカラー係数αを第2残差ベクトル〈d〉の第3正規化基底ベクトル〈v〉への射影分として求め、これを保存するステップと、
を備えるものである。
【0044】
本発明(5)によれば、上記本発明(3),(4)の効果に加え、上式分子の(〈d・u〉−d・v〉〈v・u〉)及び分母の(‖u−〈v・u)については既に第1,第2の基底探索で行った演算結果を利用できるため、こうしてAOT処理を更に効率化、高速化できる。
【0045】
また好ましくは本発明(6)においては、上記本発明(3)〜(5)において、適応的直交変換処理は 最初の残差ベクトル〈d〉=(d,d…,d)との差の大きさを最小とする基底候補ベクトル〈ui〉=(u,u,…,u)を探査すべく両者の内積〈d・ui〉を求める演算を含み、該演算は、基底候補ベクトル〈ui〉の任意要素(例えば )を残りの要素の一次結合で置き換えると共に、残差ベクトル〈d〉と基底候補ベクトル〈ui〉との内積〈d・ui〉を、
〈d・ui〉=(d1 )u1+(d2 )u2+,
…,+(
但し、(d −d )u の項を除く
の積和演算により求めるものである。
【0046】
本発明(6)においては、上記基底候補ベクトル〈ui〉の全要素の和が常に0であることにより、その任意要素(例えば )を残りの要素の一次結合で表せる。従って、最初の残差ベクトル〈d〉との内積演算〈d・ui〉は上式のような積和演算に展開でき、こうして面倒な積和演算の回数を1回分省略できる。HVQ方式による画像符号処理ではベクトルの内積演算が大量に行われるため、各1回の省略は全体としての符号処理の高速化に大きく貢献する。
【0047】
また好ましくは本発明(7)においては、上記本発明(3)〜(5)において、m個のスカラー係数αk(k=1〜m)とm個の正規化基底ベクトル〈vk〉(k=1〜m)とからなる正規直交基底系の組をm個のスカラー展開計数βk(k=1〜m)と前記各正規化基底ベクトルの元となったm個の基底候補ベクトル〈uk〉(k=1〜m)とからなる非直交基底系の組に変換するステップと、該変換したm個のスカラー展開計数βkと、DCネストからm個の基底候補ベクトル〈uk〉を抽出するための抽出情報とからなる組と、DC画像とをそれぞれ符号化して符号データを出力するステップと、を更に備えるものである。
このように正規直交基底系αk,〈vk〉(k=1〜m)の組を非直交基底系βk,〈uk〉(k=1〜m)の組に変換することにより、復号側では各基底候補ベクトル〈uk〉を一々直交化する必要は無く、夫々にβkを掛けて加算することにより残差ベクトル〈dj〉を近似できる。従って、復号処理を簡単かつ高速に行える。
また本発明(8)の画像符号方法は、上記本発明(7)において、m個のスカラー展開係数β1〜βのノルムをその大きさ順に並べ替え、0を含む隣接ノルム間の各差分を求め、得られた各差分につき所定ビット数の下位ビットを除く残りの上位ビットにハフマン符号化を適用するものである。
【0048】
一般にスカラー展開係数β〜βのノルムは様々な値をとり得るが、これらを大きさ順に並べて0を含む隣接ノルム間の各差分をとると、各差分の大きさは互いに近似(又は同一)となる場合が少なくない。そこで、これらの差分値につき所定ビット数の下位ビットを除く残りの上位ビットにハフマン符号を適用することで更なる符号圧縮が可能となる。
【0049】
また好ましくは本発明(9)においては、上記本発明(1),(3)又は(5)において、適応的直交変換処理で求めた基底ベクトルの数が所定以上の場合は基底系の符号化に代えて、符号対象ブロックの画像データそのものを符号化するものである。従って、復号画質の改善が図れる。また実際上このような状況は極めて少ないので符号圧縮率に与える影響は極めて少ない。
【0050】
また上記の課題は例えば図10の構成により解決される。即ち,本発明(10)の画像復号方法は、本発明(7)に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生し、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストとするステップと、前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号するステップと、ターゲットブロックに対するm個のスカラー展開計数と、m個の抽出情報によりDCネストから抽出した各基底候補ブロックとのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生するステップと、を備えるものである。従って、ブロック平均値に小数点以下の端数は生ぜず、整数精度のブロック平均値が高速に得られる。
【0051】
また本発明(11)の画像復号方法は、本発明(7)に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生し、その一部をDCネストとするステップと、前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号するステップと、ターゲットブロックに対するm個のスカラー展開計数βk(k=1〜m)と、m個の抽出情報によりDCネストから抽出した各基底候補ブロック〈Uk〉(k=1〜m)につき各DC画素の下位n(n=log2B)ビットを0にしたもの、とのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生するステップと、を備えるものである。
【0052】
本発明(10),(11)においては、各選択ブロック〈Uk〉の下位nビットが0にされていることにより、これらを予め累積加算しても、その加算結果はブロックサイズB(例えば16)の整数倍となる。なお、展開係数βkは整数精度とする。従って、最後にこの累積加算結果をブロック画素数Bで除算すれば1回の除算でブロック平均値Ajが効率よく求まる。従って、基底ブロックβk k〉(k=1〜m)を重ね合わせる演算を効率よく行える。
【0054】
また本発明(12)の画像符号装置は、画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成すると共に、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストを生成し、メモリに記憶するDCネスト生成手段と、符号対象の画素ブロック〈Rj〉からそのブロック平均値DCJを分離した後の残差ベクトル〈dj〉の大きさが所定の許容値Zを超えると判定した場合に、前記DCネストより順次基底候補ブロックを抽出し、該ブロックからブロック平均値を分離して基底候補ベクトルを生成し、該基底候補ベクトルを使用した適応的直交変換(AOT)処理により前記残差ベクトル〈dj〉を許容値以下に近似するための1又は2以上の基底ベクトルを求める演算手段と、を備えるものである。
【0055】
また本発明(13)の画像復号装置は、本発明(7)に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生すると共に、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストを再生し、メモリに記憶するDCネスト再生手段と、前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号する復号手段と、ターゲットブロックに対するm個のスカラー展開計数と、m個の抽出情報によりDCネストから抽出した各基底候補ブロックとのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生する画像再生手段と、を備えるものである。
【0056】
また本発明(14)の記録媒体は、上記本発明(1)乃至(11)の何れか1つに記載の処理をコンピュータに実行させるためのプログラムを記録したコンピュータ読取り可能な記録媒体である。
【0057】
【発明の実施の形態】
以下、添付図面に従って本発明に好適なる実施の形態を詳細に説明する。なお、全図を通して同一符号は同一又は相当部分を示すものとする。
【0058】
図2は実施の形態による画像符号装置のブロック図で、図において、31は復号DC画像から本発明によるDCネストを生成するDCネスト生成部、17は生成されたDCネストを記憶するDCネストメモリ、32はAOT処理を効率よくかつ高速に行う適応的直交変換処理部(AOT)、33は係数変換部、34は展開係数βkの更に高圧縮を可能とする符号部である。その他の構成については上記図13で述べたものと同様でよい。なお、上記各部の特徴は以下の動作説明によって明らかとなる。
【0059】
図3は実施の形態による画像符号(メイン)処理のフローチャートである。ステップS1では原画像メモリ11に原画像データを読み込む。例えばRGB系の対象画像をYUV系に変換して読み込む。Yは輝度データ、U,Vは色差データに相当し、U,Vは横2画素の輝度平均を用いてダウンサンプリングされる。一例の輝度データYは縦960×横1280画素からなり、画素毎に例えば8ビットが割り付けられている。なお、以下は輝度データYの処理を中心に述べるが、U,Vについても同様に処理できる。
【0060】
ステップS2では全画像データにつき4×4画素毎のブロック平均(DC)値を求める。このとき小数点以下は例えば四捨五入される。ステップS3では全DC値を公知の2次元DPCM法等により符号化して出力する。ステップS4では全DPCM出力をIDPCM復号してDC画像を再生し、DC画像メモリ15に格納する。これは符号側/復号側のAOT処理条件を同一にするためである。ステップS5ではDCネスト生成部31がDC画像からDCネストを生成し、DCネストメモリ17に格納する。なお、DCネストを切り出す領域の選択等は従来と同様でよい。
【0061】
図7にDCネストの生成イメージを示す。図7(a)において、本実施の形態ではDC画像メモリ15から切り出した各DC画素DCJの下位4ビットをマスク(=0)してこれをDCネストメモリ17のネスト画素Njに記憶する。下位4ビットは24=B(B=ブロックサイズ16)又は4=log2Bの関係にある。下位4ビットをマスクした結果、基底候補ブロック〈Ui〉の総和は常に16の整数倍となり、よってこれを1/16したブロック平均値aiは常に整数となる。従って、基底候補ブロック〈Ui〉からブロック平均値aiを分離した基底候補ベクトル〈ui〉のブロック平均値は常に0となる。
【0062】
図7(a),(b)に具体的な数値例をグラフで示す。但し、ここでは説明の簡単のため4画素分の平均をとっている。図7(c)において、復号ブロック〈Rj〉のDC値DCJに複数の基底ベクトルβk〈uk〉を累積加算しても、各基底ベクトルβk〈uk〉のブロック平均値は常に0であるため、従来のような雑音は重畳されない。これにより画質の大幅な改善が図れた。
【0063】
図8(a)に図7の数値例を表で示す。DC画素A〜Dの合計SUM=251であり、その平均値AV=251/4=62.75(非整数)である。これらのDC画素A〜Dをネスト画素A〜Dに転送する際に下位4ビットをマスクする。これによりネスト画素A〜Dの合計SUM=224となり、その平均値AV=224/4=56(整数)となる。更に、ネスト画素A〜Dからその平均値AV=56を分離した基底候補ベクトル〈ui〉の各要素a〜dは「24,−24,8,−8」となり、これらの総和sum=0(完全平均値分離)となっている。
【0064】
図8(b)は図8(a)と同じ数値例を示している。但し、DC画素A〜Dをそのままネスト画素A〜Dにコピーし、ネスト画素A〜Dの総和SUMから下位4ビットをマスク(=0)する点で異なっている。この方法でも総和SUMは16の倍数になるから、ブロック平均値AV=60(整数)となる。しかしこの方法によると、ネスト画素A〜Dからその平均値AV=60を分離した基底候補ベクトル〈ui〉の各要素a〜dは「33,−25,13,−10」となり、必ずしもその総和sum=0(完全平均値分離)とはならない。
【0065】
なお、図8(b)に示す如くDC画像の一部をそのままDCネストにコピーしておき、該DCネストから基底候補ブロック〈Ui〉をダウンサンプルする時に各画素から下位4ビットをマスク(=0)しても良い。
【0066】
図3に戻り、ステップS6では原画像メモリ11及びDC画像メモリ15に対する各インデクスカウンタj,Jを共に0に初期化する。但し、jは符号対象のターゲットブロック〈Rj〉のインデクスカウンタ、JはDC画素のインデクスカウンタを夫々表す。ステップS7ではターゲットブロック〈Rj〉から対応する復号DC値DCJを分離して残差ベクトル〈dj〉を求める。ステップS8では残差ベクトルの二乗ノルム‖dj2が許容誤差Zより大きいか否かを判別する。‖dj2>Zでない場合はステップS17で基底数「0」を符号出力する。この場合のターゲットブロック〈Rj〉は後述の交流成分予測法により復号される。また‖dj2>Zの場合はステップS9で後述の適応的直交変換処理を行う。
【0067】
ステップS10では適応的直交変換で生成された基底数k>4か否かを判別する。因みに、実測ではほとんどの場合にk=1〜3程度の統計結果が得られている。そこで、k>4の場合はステップS18で基底数「5」を符号出力し、かつターゲットブロック〈Rj〉の各画素値を符号出力する。またk>4でない場合はステップS11で後述の展開係数βkへの変換を行う。ステップS12では基底数「m」,展開係数βk及び非直交基底ベクトル〈ui〉のインデクス情報iを夫々符号出力する。
【0068】
ステップS13ではカウンタj,Jに夫々+1する。但し、カウンタjに対する+1は1画素ブロック分の更新を意味する。ステップS14ではj≧M(=全画像ブロック数)か否かを判別する。j≧Mでない場合はステップS7に戻り、次のターゲットブロック〈Rj〉につき上記同様の符号処理を行う。以下同様にして進み、やがて、ステップS14の判別でj≧Mになると、ステップS15ではハフマン等による符号化を行う。この符号化については後述する。こうして1画像分の符号処理を終了する。
【0069】
図4〜図6は実施の形態による適応的直交変換処理のフローチャート(1)〜(3)で、必要最少数の直交基底系αk〈vk〉(k=1〜m)を効率よくかつ高速に求め得る場合を示している。なお、以下の説明では上記ステップS7で求められた最初の残差ベクトル〈dj〉を〈d〉で表し、その後に更新される残差ベクトルを〈dk〉(k=1〜m)で表す。
【0070】
図4は第1基底の探索処理を示している。この処理の説明前に、該処理を高速に行うために行った計算上の工夫を説明する。即ち、通常なら第1基底は残差ベクトル〈d〉との差の二乗ノルムeiを最小とする基底候補ベクトル〈ui〉として求められるが、この関係式を更に展開すると(7)式が得られる。
【0071】
【数7】
Figure 0003932244
【0072】
ところで、(7)式右辺第1項の‖d‖2>0は基底候補によらず一定であるから、同右辺第2項を最大にする〈ui〉が第1基底となり得る。そこで、この右辺第2項をhiとおく。
【0073】
【数8】
Figure 0003932244
【0074】
以下は、hiを最大とするような第1基底αk〈vk〉を探索・決定する処理である。ステップS21では後述の内積演算〈d・ui〉の前処理として〈d〉の第16成分を残りの各成分の値から差し引いた15次元ベクトル〈d'〉を求める。ステップS22ではi=0〜(N−1)につきhi分子の内積〈d'・ui〉を求め、これらを配列[Pi]{i=0〜(N−1)}に格納する。
【0075】
この内積演算を具体的に言うと、〈ui〉は本来16次元ベクトルであるが、本実施の形態ではそのブロック平均値(全要素の和)=0により、その第16成分u16は残りの15成分の一次結合で表せる。
【0076】
【数9】
Figure 0003932244
【0077】
従って、hi分子の内積〈d・ui〉をこれと等価な〈d'・ui〉により求め、こうして積和演算を1回分(全iでは8192回分)省略できる。
【0078】
【数10】
Figure 0003932244
【0079】
ステップS23ではi=0〜(N−1)につきhi分母の二乗ノルム‖ui2を求め、これらを配列[Li]{i=0〜(N−1)}に格納する。
【0080】
【数11】
Figure 0003932244
【0081】
配列[Li]は一度求めておけば後に結果を利用できる。ステップS24ではhiの最大値を保持するレジスタE=0,基底候補ベクトル〈ui〉のインデクスカウンタi=0,基底数カウンタk=1に夫々初期化する。
【0082】
ステップS25ではhi=Pi 2/Liを求める。ステップS26ではhi>Eか否かを判別する。hi>Eの場合はステップS27でEをhiで更新し、かつその時のiを配列[Ik](k=1)に保持する。またhi>Eでない場合は上記ステップS27の処理をスキップする。
【0083】
ステップS28ではiに+1し、更にステップS29ではi≧N(全候補数)か否かを判別する。i≧Nでない場合はステップS25に戻り、次のhiにつき上記同様の最大値探索処理を行う。以下、同様にして進み、やがてi≧Nになると全ネストブロックの探索終了である。この時、上記配列[Ik]にはhiを最大とするような第1基底ベクトル〈u1〉のインデクス値iが保持されている。
【0084】
ステップS30では第1基底ベクトル〈u1〉を正規化して正規化基底ベクトル〈v1〉となし、これを配列[Vk](k=1)に格納する。またスカラー係数α1(〈d〉の〈v1〉への射影)を求め、これを配列[Ak](k=1)に格納する。
【0085】
ステップS31では残差ベクトル〈d〉を第1基底で近似後の残差ベクトル〈d1〉=〈d〉−α1〈v1〉により更新する。ステップS32では新たな残差ベクトルの二乗ノルムe=‖d12を求め、更にステップS33ではe≦Zか否かを判別する。e≦Zの場合はこの段階でAOT処理を終了し、またe≦Zでない場合は次いで第2基底の探索処理を行う。
【0086】
図5は第2基底の探索処理を示している。この処理の説明前に該処理を効率よく行うために行った計算上の工夫を説明する。即ち、通常なら第2基底は残差ベクトル〈d1〉との差の二乗ノルムeiを最小とする直交ベクトル〈ui'〉として求められるが、この関係式を更に展開すると(12)式が得られる。
【0087】
【数12】
Figure 0003932244
【0088】
ここで、直交ベクトル〈ui'〉は第2基底の候補ベクトル<ui>を第1正規化基底ベクトル<v1>に直交化したものである。
【0089】
【数13】
Figure 0003932244
【0090】
同様にして、上記(12)式右辺第1項の‖d12>0は基底候補によらず一定であるから、同右辺第2項を最大にするような直交ベクトル〈ui'〉が第2基底となり得る。この右辺第2項をhiとおく。
【0091】
【数14】
Figure 0003932244
【0092】
iは、このまま求めても良いが、上記図4の演算結果を効率よく利用するために(14)式の分母を変形する。即ち、まずhi分子の直交ベクトル〈ui'〉を基底候補ベクトル〈ui〉で表すと、hi分子は(15)式で表せる。
【0093】
【数15】
Figure 0003932244
【0094】
更に残差ベクトル〈d1〉を最初の残差ベクトル〈d〉で表すと、hi分子は(16)式で表せる。
【0095】
【数16】
Figure 0003932244
【0096】
従って、hi分子の演算には第1基底探索で得られた演算結果〈d・u1〉,‖u1‖を利用できる。また、同様にしてhi分母を変形すると(17)式で表せる。
【0097】
【数17】
Figure 0003932244
【0098】
従って、hi分母の演算には第1基底探索で得られた演算結果‖ui2,‖u1‖を利用できる。以上を(14)式のhiに代入すると、hiは(18−1)式となり、最終的に(18−2)式で表せる。
【0099】
【数18】
Figure 0003932244
【0100】
ここで、Pi=〈d・ui〉,Li=‖u2は配列[Pi],[L]の演算結果を夫々利用でき、かつPk=P1=〈d・u1〉,√(Lk)=√(L1)=‖u1‖も前回の演算結果を利用できる。従って、今回新たに演算するのは〈uk・ui〉=〈u1・ui〉の部分である。
【0101】
以上を前提として、第2基底の探索は以下の演算処理を行う。即ち、ステップS41ではk=1によりP1=〈d・u1〉,L1=‖u12を保持する。これらは上記ステップS22,S23で求めた結果を利用できる。なお、添え字の「1」は第1基底〈u1〉を指すインデクスカウンタiの内容であり、これは上記ステップS27の処理により配列[Ik]に保持されている。ステップS42では(19)式の演算を行い、結果をレジスタη,κに格納する。
【0102】
【数19】
Figure 0003932244
【0103】
ステップS43では後述の内積演算〈u1・ui〉の前処理として〈u1〉の第16成分を残りの各成分の値から差し引いた15次元ベクトル〈w1〉を求める。ステップS44ではi=0〜(N−1)につき内積〈wk・ui〉ηを求め、これらを配列[Qi]に格納する。ステップS45ではi=0〜(N−1)につき(Pi−κQi)を求め、これらを配列[Pi]に格納する。ここで、右辺のPiは上記ステップS22の演算結果であり、更にこのステップS45の演算結果をステップS22の配列[Pi]に上書き保存することで、配列[Pi]の内容は過去の演算結果を反映して逐次更新される。ステップS46ではi=0〜(N−1)につき(Li−Qi 2)を求め、これらを配列[Li]に格納(上書)する。ここで、右辺のLiは上記ステップS23の演算結果であり、更にこのステップS46の演算結果をステップS23の配列[Li]に上書き保存することで、配列[Li]の内容も過去の演算結果を反映して逐次更新される。以上によるhiの繰り返し演算は最終的に(20)式で表せる。
【0104】
【数20】
Figure 0003932244
【0105】
ステップS47ではhiの最大値を保持するレジスタE=0,基底候補ベクトル〈ui〉のインデクスカウンタi=0に夫々初期化し、かつ基底数カウンタkに+1する。この時点でk=2となる。
【0106】
ステップS48ではhi=Pi 2/Liを求める。ステップS49ではhi>Eか否かを判別する。hi>Eの場合はステップS50でEをhiで更新し、その時のiを配列[Ik](k=2)に保持する。またhi>Eでない場合は上記ステップS50の処理をスキップする。
【0107】
ステップS51ではiに+1し、更にステップS52ではi≧Nか否かを判別する。i≧Nでない場合はステップS48に戻り、次のhiにつき上記同様の最大値探索処理を行う。以下、同様にして進み、やがて、i≧Nになると全ネストブロックの探索終了である。この時、上記配列[Ik](k=2)にはhiを最大とするような第2基底ベクトル〈u2〉のインデクス値iが保持されている。
【0108】
ステップS53では第2基底ベクトル〈u2〉を〈v1〉に正規直交化して正規化基底ベクトル〈v2〉となし、これを配列[Vk](k=2)に格納する。またスカラー係数α2(〈d1〉の〈v2〉への射影)を求め、これを配列[Ak](k=2)に格納する。このように基底ベクトル〈u2〉の正規直交化とスカラー係数α2の演算は上記探索結果について1回行えばよく、これによってAOT処理の大幅な軽量化と高速化が図られる。以下も同様である。
【0109】
ステップS54では残差ベクトル〈d1〉を第2基底で近似後の残差ベクトル〈d2〉=〈d1〉−α2〈v2〉により更新する。ステップS55では新たな残差ベクトルの二乗ノルムe=‖d22を求め、更にステップS56ではe≦Zか否かを判別する。e≦Zの場合はこの段階でAOT処理を終了し、またe≦Zでない場合は第3基底の探索処理を行う。
【0110】
図6は第3基底の探索処理を示している。この処理の説明前に該処理を効率よく行うために行った計算上の工夫を説明する。即ち、通常なら第3基底は残差ベクトル〈d2〉との差の二乗ノルムeiを最小とする直交ベクトル〈ui'〉として求められるが、この関係式を更に展開すると(21)式が得られる。
【0111】
【数21】
Figure 0003932244
【0112】
ここで、直交ベクトル〈ui'〉は第3基底の候補ベクトル〈ui〉を第1,第2の正規化基底ベクトル〈v1〉,〈v2〉に直交化したものである。
【0113】
【数22】
Figure 0003932244
【0114】
同様にして上記(21)式右辺第1項の‖d22>0は基底候補によらず一定であるから、同右辺第2項を最大にするような直交ベクトル〈ui'〉が第3基底となり得る。この右辺第2項をhiとおく。
【0115】
【数23】
Figure 0003932244
【0116】
更にhi分子の直交ベクトル〈ui'〉を基底候補ベクトル〈ui〉で表すと、hi分子は(24)式で表せる。
【0117】
【数24】
Figure 0003932244
【0118】
更に(24)式の残差ベクトル〈d2〉を最初の残差ベクトル〈d〉で表すと、hi分子は(25)式で表せる。
【0119】
【数25】
Figure 0003932244
【0120】
同様にしてhi分母を変形すると(26)式で表せる。
【0121】
【数26】
Figure 0003932244
【0122】
以上を(23)式のhiに代入すると(27)式が得られる。
【0123】
【数27】
Figure 0003932244
【0124】
ところで、(27)式分子/分母の各第2項までは既に計算されており、これらには(28)式の関係がある。
【0125】
【数28】
Figure 0003932244
【0126】
従って、hiの演算は上記(18−2)式に習って最終的に(29)式で表せる。
【0127】
【数29】
Figure 0003932244
【0128】
(29)式は内積〈uk・ui〉が〈vk・ui〉になっていることを除き、上記(18−2)式と同じ形をしている。従って、これ以降の各基底は図5と同様のルーティンを再帰的に使用することで効率よく求まる。
【0129】
以上を前提として、第3基底以降の探索は以下の演算処理を行う。即ち、ステップS61ではk=2によりP2=〈d1・u2〉,L2=‖u22を保持する。ステップS62では(30)式の演算を行い、結果をレジスタη,κに格納する。
【0130】
【数30】
Figure 0003932244
【0131】
ステップS63では後述の内積演算〈v2・ui〉の前処理として〈v2〉の第16成分を残りの各成分の値から差し引いた15次元ベクトル〈w2〉を求める。但し、〈v2〉の各成分は整数値ではないので、このままでは内積演算を実数型で行う必要が生じる。これを避けるために、予め〈v2〉(即ち、〈w2〉)の各成分に定数aを掛けて整数にしておく。
【0132】
ステップS64ではi=0〜(N−1)につき内積(〈w2・ui〉η/a)を求め、これらを配列[Qi]に格納(上書)する。この時、各演算結果を定数aで割ることにより、位を戻す。ステップS65ではi=0〜(N−1)につき(Pi−κQi)を求め、これらを配列[Pi]に格納(上書)する。ステップS66ではi=0〜(N−1)につき(Li−Qi 2)を求め、これらを配列[Li]に格納(上書)する。以上により上記(29)式の演算は(31)式で表せる。
【0133】
【数31】
Figure 0003932244
【0134】
ステップS67ではhiの最大値を保持するレジスタE=0,基底候補ベクトル〈ui〉のインデクスカウンタi=0に夫々初期化し、かつ基底数カウンタkに+1する。この時点でk=3となる。
【0135】
ステップS68ではhi=Pi 2/Liを求める。ステップS69ではhi>Eか否かを判別する。hi>Eの場合はステップS70でEをhiで更新し、その時のiを配列[Ik](k=3)に保持する。またhi>Eでない場合は上記ステップS70の処理をスキップする。
【0136】
ステップS71ではiに+1し、更にステップS72ではi≧Nか否かを判別する。i≧Nでない場合はステップS68に戻り、次のhiにつき上記同様の最大値探索処理を行う。以下、同様にして進み、やがて、i≧Nになると全ネストブロックの探索終了である。この時、上記配列[Ik](k=3)にはhiを最大とするような第3基底ベクトル〈u3〉のインデクス値iが保持されている。
【0137】
ステップS73では第3基底ベクトル〈u3〉を〈v1〉,〈v2〉に直交化かつ正規化して正規化基底ベクトル〈v3〉となし、これを配列[Vk]に格納する。またスカラー係数α3(〈d2〉の〈v3〉への射影)を求め、これを配列[Ak]に格納する。
【0138】
ステップS74では残差ベクトル〈d2〉を第3基底で近似後の残差ベクトル〈d3〉=〈d2〉−α3〈v3〉により更新する。ステップS75では新たな残差ベクトルの二乗ノルムe=‖d32を求め、更にステップS76ではe≦Zか否かを判別する。e≦Zの場合はこの段階でAOT処理を終了し、またe≦Zでない場合はステップS61に戻り、第4基底以降の前処理及び探索処理を行う。なお、図示しないが、好ましくは、例えば上記ステップS76の次にk≧4か否かの判別処理を設け、k≧4の場合はこのAOT処理を抜けるようにする。
【0139】
以上により、AOT処理の大幅な軽量化、かつ高速化が可能となり、演算時間は実測比で従来の1/3〜1/10に短縮された。
【0140】
図2を参照し、AOT32からはαk,〈vk〉(k=1〜m)の組が得られ、これらの一次結合により残差ベクトル〈dj〉を許容誤差Z以内に近似できる。更に、係数変換部33はαk,〈vk〉(k=1〜m)の組をβk,〈uk〉(k=1〜m)の組に変換すべく、以下(従来と同様)の方法により展開係数βkを求める。即ち、今、基底候補ベクトル〈uk〉,展開係数βk,正規化基底ベクトル〈vk〉,スカラー係数αkの各行列を(32)式とおく時に、
【0141】
【数32】
Figure 0003932244
【0142】
これらを(33)式で関係つける。
【0143】
【数33】
Figure 0003932244
【0144】
これを行列Bについて解くためには、まず行列Uを正方行列に変換すべく、両辺に行列Uの転置行列UTを左側から掛ける。
【0145】
【数34】
Figure 0003932244
【0146】
この行列(UTU)は、(35)式の様に展開され、
【0147】
【数35】
Figure 0003932244
【0148】
ここで〈ui・uj〉は内積を表し、かつ〈ui・uj〉=〈uj・ui〉であるから、対角要素に対して対称な正方行列が得られ、かつ〈ui〉と〈uj〉とが異なるから、逆行列が存在する。そこで、更に両辺の左側から行列(UTU)の逆行列(UTU)-1を掛けることで(36)式が得られ、βkが求まる。
【0149】
【数36】
Figure 0003932244
【0150】
このように正規直交基底系αk,〈vk〉(k=1〜m)の組を非直交基底系βk,〈uk〉(k=1〜m)の組に変換することにより、復号側では各基底候補ベクトル〈uk〉を一々直交化する必要は無く、夫々にβkを掛けて加算することにより残差ベクトル〈dj〉を近似できる。従って、復号処理を簡単かつ高速に行える。次に展開係数βkの圧縮符号処理を説明する。
【0151】
図9は実施の形態による展開係数符号処理のイメージ図である。図9(a)において、生成されたβ1〜β4からノルム(大きさ)を抽出する。図9(b)において、ノルムを例えば昇順(β3,β2,β4,β1)に並べ換え、前方(最初は0)から順に差分(△β3,△β2,△β4,△β1)を求める。図9(c)において、係数残差(△β3,△β2,△β4,△β1)をその下位2ビットと上位ビットとに分離し、上位ビットをハフマン符号化する。
【0152】
この例では△β3と(△β2=△β4=△β1)との2組の値が発生しており、よってハフマン符号では発生頻度の高い(△β2,△β4,△β1)にはビット数の少ない符号が割り振られ、また発生頻度の低い△β3にはビット数の多い符号が割り振られる。従って、展開係数βkの圧縮符号化が可能となる。しかも、係数残差△βkの上位ビットをハフマン符号化する構成により、下位ビットの端数分が切り離されることになり、よって上位ビットでは図示の如く△β2=△β4=△β1となるような可能性が高い。
【0153】
また、残差△βkの下位2ビットは正負の符号ビットと共に対応する基底ベクトル〈uk〉のインデクス情報(13ビット=0〜8191)と共に2バイト固定長符号エリアにパッキングされ、固定長符号として出力される。これらの符号の出力順は△β3,△β2,△β4,△β1(即ち、u3,u2,u4,u1)の順である。
【0154】
図9(d)において、復号側では各符号をu3,u2,u4,u1の順で入力し、夫々から係数△β3,△β2,△β4,△β1を分離する。更に最初の△β3からβ3を復号し、該β3に△β2を加えてβ2を復号し、該β2に△β4を加えてβ4を復号し、そして、該β4に△β1を加えてβ1を復号する。βk〈uk〉はこれらの和(一次結合)をとって機能するものであるから、これらの順序は問題ではない。
【0155】
なお、上記ノルムを昇順に並べ換え、前方(最初は0)から順に差分を求めたが、逆にノルムを降順に並べ換え、後方(最初は0)から順に差分を求めても良い。
【0156】
以下、符号部34による符号処理を説明する。DPCMの予測残差△DCJ,I については量子化係数Q(Z)で量子化すると共に、△DCJ,I =0の場合のみランレングスを考慮し、予測残差△DCJ,I 及びランレングスを夫々独立にハフマン符号化する。基底数kは、k=0の場合のみランレングスを考慮し、基底数k 及びランレングスを夫々独立にハフマン符号化する。係数残差△βkの上位ビットは定数Q(例えば8)で量子化した商をハフマン符号化する。また基底ベクトル〈uk〉のコード情報i(=13ビット)に展開係数βkの符号ビット及び係数残差△βkの下位2ビットを詰めて計16ビットの固定長符号となし、これらは残差△βkの昇順(又は降順)に詰めて送られる。全体としては画素ブロック単位で出現順に詰めて符号列を構成する。必要なら画素ブロックの切り替わりを示すための符号EOBを書き込む。
【0157】
図10は実施の形態による画像復号装置のブロック図で、上記図2の画像符号装置に対応したものである。図において、41はハフマン等による復号部、42は注目画素DCJを含む周囲のDC値DCJ'から交流成分を含むターゲットブロック〈Rj〉を推定する交流成分予測部、43は復号基底系βk〈uk〉(k=1〜m)に基づきく近似残差ベクトル〈dj〉を再生する残差ベクトル再生部、44は復号ブロック〈Rj〉に基づきターゲットブロック〈Rj〉を再生するRj再生部、45は再生画像を記憶する再生画像メモリ、46は復号DC値をIDPCM復号するIDPCM部、47は復号DC画像を記憶するDC画像メモリ、48は図2と同様のDCネスト生成部、49はDCネストを記憶するDCネストメモリ、50はDCネストからダウンサンプルされた選択ブロック〈Uk〉を保持する選択ブロックバッファ、51は〈Uk〉にβkを乗算する乗算器、52,53はβk〈Uk〉(k=1〜m)の累積加算部、54は累積加算結果のブロック平均値Ajを求める平均器、55は累積加算結果からブロック平均値Ajを分離する減算器、56は再生近似残差ベクトル〈dj〉を保持する近似ベクトルバッファ、57はターゲットブロック〈Rj〉の再生DC値DCJに再生近似残差ベクトル〈dj〉を加算する加算器である。
【0158】
図11は実施の形態による画像復号処理のフローチャートである。ステップS101では画像符号データを読み込む。ステップS102では図2と同様のIDPCM法によりY,U,Vの各DC値を解凍(復号)し、DC画像を再生する。ステップS103ではY成分のDC画像からDCネストを生成する。この時、上記図7で示した如く、各DC画素値DCJの下位4ビットがマスク(=0)され、各DCネスト画素値Njとなる。なお、DC画像の切り出し位置等の情報は別途に受け取る。ステップS104では原画像メモリ45及びDC画像メモリ47に対するインデクスカウンタj,Jを共に0に初期化する。
【0159】
ステップS105では1ブロック画像分の符号データを入力する。ステップS106では基底数k=0か否かを判別する。k=0の場合はステップS114で後述する交流成分予測法によりターゲットブロック〈R〉を再生する。またk≠0の場合は更にステップS107で1≦k≦4か否かを判別する。
【0160】
1≦k≦4の場合はステップS112で残差ベクトル〈dj〉を逆量子化する。本実施の形態では予めDCネストの下位4ビットがマスク(=0)されているため、各選択ブロック〈Uk〉に直接βkを掛けてこれらを累積加算し、累積加算結果からそのブロック平均値Ajを1回だけ分離することで残差ベクトル〈dj〉が一挙に得られる。よって復号処理が高速化される。ステップS113では得られた残差ベクトル〈dj〉に対応するDC値DCJを加算する。
【0161】
また1≦k≦4でない場合はステップS108でターゲットブロック〈Rj〉の復号データよりターゲットブロック〈Rj〉を直接再生する。こうして、上記何れかの方法により4×4画素のターゲットブロック〈R〉が再生された。ステップS109では再生されたターゲットブロック〈R〉を再生画像メモリ45に格納する。
【0162】
ステップS110ではカウンタj,Jに夫々+1し、更にステップS111ではi≧M(全画素ブロック数)か否かを判別する。i≧Mでない場合はステップS105に戻り、次のブロック画像符号データにつき上記同様の復号・再生処理を行う。以下同様にして進み、やがて、ステップS111の判別でj≧Mになると、1画像分の復号処理を終了する。
【0163】
図12は実施の形態における交流成分予測のイメージ図で、公知の予測法を採用できる.図12(A)は段階的交流成分予測法を示しており、以下に内容を概説する。その第1段階では注目ブロックS上の各サブブロックS1 〜S4 を該Sを含む周囲4ブロック(U,R,B,L)の各DC値から次式により推定する。
【0164】
1 =S+(U+L−B−R)/8
2 =S+(U+R−B−L)/8
3 =S+(B+L−U−R)/8
4 =S+(B+R−U−L)/8
同様にして、この第1段階目ではU1 〜U4 ,L1 〜L4 ,R1 〜R4 ,B1 〜B4 等が推定される。更に、その第2段階では上記方法を再帰的に使用することで、S1 上の4画素P1 〜P4 を次式により推定する。
【0165】
1 =S1 +(U3 +L2 −S3 −S2 )/8
2 =S1 +(U3 +S2 −S3 −L2 )/8
3 =S1 +(S3 +L2 −U3 −S2 )/8
4 =S1 +(S3 +S2 −U3 −L2 )/8
2 〜S4 上の各4画素P1 〜P4 についても同様である。このような2段階処理によりターゲットブロック〈R〉が再生される。
【0166】
図13(B)は本件出願人による既提案の非段階的交流成分予測法を示しており、注目ブロックSを含む周囲4ブロック(U,R,B,L)の各DC値から各サブブロックS1 〜S4 における各4画素P1 〜P4 を一挙に推定する。以下内容を概説する。まずS1 上の4画素P1 〜P4 を求める場合は、S2 ≒S3 ≒S,U3 ≒U,L2 ≒Lの各近似を行う。この近似を上記S1 上のP1 の式に適用すると、
1 =S1 +(U3 +L2 −S3 −S2 )/8
=S1 +(U+L−S−S)/8
が得られる。更にこの式に上記S1 の式、S1 =S+(U+L−B−R)/8を代入すると、S1 上のP1 は最終的に、
1 =S+(2U+2L−2S−B−R)/8
で表せる。また上記S1 上のP2 については、
2 =S1 +(U3 +S2 −S3 −L2 )/8
=S1 +(U+S−S−L)/8
が得られる。更にこの式に上記S1 の式、S1 =S+(U+L−B−R)/8を代入すると、S1 上のP2 は最終的に、
2 =S+(2U−B−R)/8
で表せる。また上記S1 上のP3 については、
3 =S1 +(S3 +L2 −U3 −S2 )/8
=S1 +(S+L−U−S)/8
が得られる。更にこの式に上記S1 の式、S1 =S+(U+L−B−R)/8を代入すると、S1 上のP3 は最終的に、
3 =S+(2L−B−R)/8
で表せる。また上記S1 上のP4 については、
4 =S1 +(S3 +S2 −U3 −L2 )/8
=S1 +(S+S−U−L)/8
が得られる。更にこの式に上記S1 の式、S1 =S+(U+L−B−R)/8を代入すると、S1 上のP4 は最終的に、
4 =S+(2S−B−R)/8
で表せる。従って、S1 上の4画素P1 〜P4 は、
1 =S+(2U+2L−2S−B−R)/8
2 =S+(2U−B−R)/8
3 =S+(2L−B−R)/8
4 =S+(2S−B−R)/8
により非段階的に一挙に求まる。S2 〜S4上の各4画素P1 〜P4 についても同様である。
【0167】
なお、上記実施の形態を具体的数値例を伴って説明したが本発明がこれらに限定されないことは明らかである。
【0168】
また、上記本発明に好適なる実施の形態を述べたが、本発明思想を逸脱しない範囲内で各部の構成、制御、処理及びこれらの組合せの様々な変更が行えることは言うまでも無い。
【0169】
【発明の効果】
以上述べた如く本発明によれば、DCネストの改良により高画質が得られ、またAOT演算の工夫により高速符号化が得られた。従って、HVQ方式の高画質化、高速符号化に寄与するところが極めて大きい。
【図面の簡単な説明】
【図1】本発明の原理を説明する図である。
【図2】実施の形態による画像符号装置のブロック図である。
【図3】実施の形態による画像符号(メイン)処理のフローチャートである。
【図4】実施の形態による適応的直交変換処理のフローチャート(1)である。
【図5】実施の形態による適応的直交変換処理のフローチャート(2)である。
【図6】実施の形態による適応的直交変換処理のフローチャート(3)である。
【図7】実施の形態によるDCネストの説明図(1)である。
【図8】実施の形態によるDCネストの説明図(2)である。
【図9】実施の形態による展開係数符号処理のイメージ図である。
【図10】実施の形態による画像復号装置のブロック図である。
【図11】実施の形態による画像復号処理のフローチャートである。
【図12】実施の形態における交流成分予測のイメージ図である。
【図13】従来の画像符号装置のブロック図である。
【図14】従来の適応的直交変換処理のフローチャートである。
【図15】従来の適応的直交変換処理のイメージ図である。
【図16】従来の平均値分離処理のイメージ図である。
【符号の説明】
11 原画像メモリ
12 DC値生成部
13 差分PCM符号部(DPCM)
14 逆DPCM符号部(IDPCM)
15 DC画像メモリ
16 DCネスト生成部
17 DCネストメモリ
18 減算器
19 残差ベクトルバッファ
20 抽出部ブロックバッファ
21 平均器
22 減算器
23 候補ベクトルバッファ
24 適応的直交変換処理部(AOT)
25 係数変換部
26 符号部
31 DCネスト生成部
32 適応的直交変換処理部(AOT)
33 係数変換部
34 符号部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding / decoding method and apparatus and a recording medium on which the program is recorded. More specifically, the present invention relates to an image encoding / decoding method and apparatus and program based on hybrid vector quantization (HVQ). The recording medium.
[0002]
Today, the JPEG (Joint Photographic Expert Group) system, which is an international standard for still image compression, converts 8 × 8 pixel blocks into DC values and coefficient values of fundamental to 63 times frequency by two-dimensional DCT, Using the fact that the frequency components are concentrated in the low frequency region, each coefficient value is quantized with a different quantization width within a range where the image quality does not deteriorate, and the amount of information is reduced, and then Huffman coding is performed. ing.
[0003]
On the other hand, the HVQ method is a kind of average value separation type block coding like JPEG, but adaptive orthogonal transform (AOT) is an intermediate method between vector quantization and orthogonal transform coding. The compression principle is used. Here, AOT is a method of selecting a necessary minimum number of non-orthogonal basis systems from a base nest corresponding to a vector quantization codebook and approximating a target block within a desired tolerance Z. In the HVQ method, decoding can be performed in an integer type, so that decoding is fast. In addition, since mosquito and block noise peculiar to JPEG and pseudo contour peculiar to GIF do not occur, natural images and artificial images (animation images, CG images) can be compressed with high image quality. The present invention relates to further improvement in image quality and speeding up of the encoding operation in such an HVQ system.
[0004]
[Prior art]
The present applicant has already proposed an image encoding / decoding method based on the HVQ method using self-similarity of images (Japanese Patent Application No. 10-189239). The contents will be described below. Throughout this specification, the symbol <a> represents the vector a or block a, the symbol ‖a‖ represents the magnitude (norm) of the vector a, and the symbol <a · b> represents the inner product of the vectors a and b. Also, vectors and blocks in figures and [number] are shown in bold letters.
[0005]
FIG. 13 is a block diagram of a conventional image encoding device (encoder). In the figure, 11 is an original image memory for storing original image data, 12 is a block average (4 × 4 pixels) for each pixel block (4 × 4 pixels) of the original image data. DC) a DC value generator for obtaining a value, 13 is a differential PCM encoder (DPCM) that performs differential prediction encoding for each DC value, 14 is an inverse DPCM encoder (IDPCM) that decodes each DC value from the differential PCM code, 15 is a DC image memory for storing a decoded DC image, 16 is a DC nest generation unit for cutting out a DC nest of a predetermined size from a part of the DC image, and 17 is a DC nest memory for storing the DC nest.
[0006]
Further, reference numeral 18 denotes a target image block <R to be coded.jThe corresponding decoded DC value DCJ, 19 is a DC-separated residual vector <dj> Is a residual vector buffer 20 for storing 4 × 4 pixel base candidate blocks <Ui> Is a candidate block buffer for storing the base candidate block <Ui> Block average value ai, 22 is a base candidate block <Ui> Block average value ai, 23 is a base candidate vector <uiThe candidate vector buffer 24 stores the square norm ‖d of the residual vector.j2If the error exceeds the tolerance Z, the DC nest is searched for a residual vector <dj) To approximate within an allowable error Zk<Uk'> (K = 1 to m) generating an adaptive orthogonal transform processing unit (AOT), 25 is a generated orthogonal basis set αk<Uk'> (K = 1 to m), each corresponding non-orthogonal basis vector <uk> (K = 1 to m) multiplied by the equivalent non-orthogonal basis set βk<Uk> A coefficient conversion unit for obtaining the expansion coefficient βk for generating (k = 1 to m), 26 is a DPCM code of the DC value and a non-orthogonal basis set βk<Uk> Is a code part using Huffman, run length, fixed-length code, etc. for further compression encoding.
[0007]
The DC value generation unit 12 obtains a block average value of 4 × 4 pixels, and rounds off (or rounds down) after the decimal point. Although not shown, the DPCM 13 converts the DC value of the J row and the I column to DC.J, IThe DCJ, IPredicted value DCJ, IFor example DCJ, I'= (DCJ, I-1+ DCJ-1, I) / 2, and its prediction error ΔDCJ, I= DCJ, I-DCJ, I'Is quantized coefficient Q (Z) To linearly quantize and output. The quantization coefficient Q (Z) is associated with the allowable error Z, and changes in the range of 1 to 8 according to the allowable error Z.
[0008]
The DC nest generation unit 16 cuts out (copies), for example, a 39 × 71 area directly from the DC image to obtain a DC nest. Since the DC nest is used as a code book, it is desirable to include a large amount of alternating current components. Therefore, for a plurality of candidate regions, the difference between adjacent DC values in each region is calculated to obtain the sum of these absolute values and the region where the sum is maximized is cut out to be a DC nest.
[0009]
The base candidate block <UiThe down-sample of> sets a vertex (px, py) ∈ [0, 63] x [0, 31] for each vertical and horizontal 1DC value, and the subsample interval is (sx, sy) ∈ {(1, 1 ), (1,2), (2,1), (2,2)}. Therefore, in total, N (= 8192) base candidate blocks <Ui> Are referred to by the index counter i from the AOT 24. The operation of the conventional adaptive orthogonal transform processing unit 24 will be described below.
[0010]
FIG. 14 is a flowchart of conventional adaptive orthogonal transform processing, and FIG. 15 is an image diagram of the processing. In FIG. 14, the square norm of the residual vector ‖ <dj〉 ‖2If it is> Z, this process is input. In step S121, the residual vector square norm に <dj〉 ‖2Set. Also, the base number counter k = 1 is initialized. In step S122, a large value (for example, 100,000) is set in the minimum value holding register E '. In step S123, the base candidate block <Ui> Is initialized to 0. This corresponds to the DC nest start address (px, py) = (0, 0) and the subsample interval (sx, sy) = (1, 1).
[0011]
In step S124, the base candidate block <UiThe block average value ai is separated from the base candidate vector <ui> Is generated. Since this operation is performed with integer precision, the block average value aiIf a value after the decimal point occurs, round it off (or round it down). If necessary (k> 1) in step S125, the basis candidate vector <ui> Is the previous orthogonal basis vector <ukOrthogonalizes to '>.
[0012]
FIGS. 15A and 15B show image diagrams of orthogonalization processing. In FIG. 15A, first, the first basis candidate vector <u1> As it is, the first basis vector <u1It can be '>. Next, the second basis candidate vector <u2Is the first basis vector <u by the following method:1'> Is orthogonalized. That is, the second basis candidate vector <u2First basis vector <u1Projection to '> is obtained by the relationship of equation (1).
[0013]
[Expression 1]
Figure 0003932244
[0014]
Therefore, the second orthogonal vector <u2'> Is the second basis candidate vector <u2> Is obtained by subtracting the vector of the projection.
[0015]
[Expression 2]
Figure 0003932244
[0016]
In FIG. 15B, the third basis candidate vector <uThreeIs the first and second basis vectors <u1'>, <U2Orthogonalizes to '>. This figure is drawn three-dimensionally. First, the third basis candidate vector <uThreeIs the first basis vector <u1When orthogonalized to '>, the intermediate orthogonal vector <uThree''> Is obtained.
[0017]
[Equation 3]
Figure 0003932244
[0018]
Further, this intermediate orthogonal vector <uThree''> To the second basis vector <u2When orthogonalized to '>, the third basis vector <uThree'> Is obtained.
[0019]
[Expression 4]
Figure 0003932244
[0020]
Returning to FIG. 13, in step S126, the obtained orthogonal vector <ui'> And the residual vector <dk(However, at first <dj>) Scalar coefficient α that minimizes the distance toiAsk for.
[0021]
FIG. 15C shows the processing image. In the figure, the residual vector at a certain time is expressed as <dk>, This is the orthogonal vector <uiThe square norm ei = e <d of the residual vector after approximation with '>k> -Αi<Ui '> ‖2As is clear from the figure, the scalar coefficient α is minimized in the orthogonal vector <ui ′>.iMultiplied by the residual vector {<dk> -Αi<Ui'>} Is orthogonal (inner product = 0). Therefore, the scalar coefficient αiIs obtained from the relationship of equation (5).
[0022]
[Equation 5]
Figure 0003932244
[0023]
In the figure, the residual vector <dk> (Where k = 0) is replaced with another first basis candidate vector <ujThe case approximated by '> is drawn. First basis candidate vector <ujSince “>” can take any direction, the image is as shown in the figure.
[0024]
Returning to FIG. 14, in step S127, the residual vector <dk> Is the basis candidate vector αi<UiThe square norm of the error vector after approximation with '> eiAsk for. This calculation is obtained by equation (6).
[0025]
[Formula 6]
Figure 0003932244
[0026]
In step S128, eiIt is determined whether or not <E ′. eiIf <E ′, the content of E ′ is changed to e in step S129.iUpdate with. Α at that timei, <Ui'>, <Ui> Information related to the array [αk], [Uk'], [Uk]. EiIf not <E ′, the process of step S129 is skipped.
[0027]
In step S130, the counter i is incremented by 1, and in step S131, it is determined whether i ≧ N (= 8192). If i ≧ N is not satisfied, the process returns to step S124, and the next basis candidate vector <uiThe same processing as above is performed for Thereafter, the process proceeds in the same manner. Eventually, when i ≧ N in the determination in step S131, all the basis candidate vectors <u at this stagei> Has been tried. At this time, the register E ′ has the minimum square norm e.iHolding.
[0028]
In step S132, it is determined whether E ′ ≦ Z. If E ′ ≦ Z is not satisfied, E = E ′ is set in step S133. That is, the square norm of the residual vector is updated. In step S134, k is incremented by 1, and the process returns to step S122. If E ′ ≦ Z, the process is exited. Thus, the first residual vector <djThe orthogonal basis set α for approximating the difference fromk<Uk'> (K = 1 to m) is obtained.
[0029]
[Problems to be solved by the invention]
However, in the above conventional method, the base candidate block <Ui> Block average value aiSince the number after the decimal point is rounded off (or rounded down, etc.), there has been a disadvantage that the improvement in image quality has reached its peak. This will be described with reference to FIG.
[0030]
FIG. 16A shows a base candidate block <UiThe pixel value of a certain line is seen in the column (x) direction. Actually, it is a block average value for 16 pixels, but here it will be described with 4 pixels for simplicity of explanation. In FIG. 16A, each pixel value is composed of “5, 2, 4, 3” and its block average value ai= 3.5. Now, for example, if this decimal point is rounded down, as shown in FIG.i> Block average value ai= 0.5. In FIG. 16C, the DC value DC of the decoded blockJTo the basis vector βk<Uk> Is added, the decoded image target block <Rj> Has a DC component (ai= 0.5) is superimposed. In addition, when there are a plurality of basis numbers, such a DC component is 0 <ai<DC at various values in the range of <1JAs a result, a kind of noise is superimposed on each block in the decoded image, so that the image quality cannot be improved. The same applies to the case where the decimal part is rounded off or rounded up.
[0031]
In the conventional AOT processing, each base candidate vector <ui> Is the basis vector <ukSince it was orthogonalized to '>, the AOT process required a great deal of computation and time.
[0032]
The present invention has been made in view of the above-mentioned problems of the prior art, and its object is to record an image encoding / decoding method and apparatus for obtaining higher image quality and higher speed encoding / decoding, and a program thereof. It is to provide a recording medium.
[0033]
[Means for Solving the Problems]
  The above problem is solved by the configuration of FIG. That is, according to the image coding method of the present invention (1), the image data is divided into blocks for each B pixel to generate a DC image composed of the average value of each block, and a subordinate of each DC pixel obtained by extracting a part of the DC image. n (n = log2B) A step of setting a bit to 0 to make a DC nest and a pixel block <Rj> The block average value DCJResidual vector <d after separatingj> Exceeds a predetermined tolerance ZIs determined, Base candidate blocks <Ui> And the block average value a from the blockiAnd the basis candidate vector <uiAnd generating one or more basis vectors for approximating the residual vector to a tolerance or less by adaptive orthogonal transformation (AOT) processing using the basis candidate vectors. is there. Therefore, the block average value aiDoes not produce any fractional part, and the block precision a with integer precision aiCan be obtained at high speed. Further, a DC nest in which the lower n bits are set to 0 in one nest generation process can be obtained efficiently.
[0034]
  In the image encoding method of the present invention (2), the image data is divided into blocks for each B pixel to generate a DC image composed of each block average value, a part of which is DC nest, The magnitude of the residual vector after separating the block average value from the pixel block exceeds a predetermined toleranceIs determined, Sequentially extract base candidate blocks from the DC nest, and the lower n (n = log) of each DC pixel constituting the block2B) After setting the bit to 0, the block average value is separated and the basis candidate vector <uiAnd obtaining one or more base vectors for approximating the residual vector to a tolerance or less by an adaptive orthogonal transformation process using the base candidate vectors.
[0036]
  In the present invention (1), (2)Such a basis candidate vector <uiThe sum of all elements (block average value) is always 0, and the DC component is completely separated. Therefore, on the decoding side, such a basis vector <uk>, No unnecessary DC component (noise) is generated. As a result, the image quality of the present HVQ method is greatly improved.
[0039]
  Also preferably, in the present invention (3), in the present invention (1) or (2), the adaptive orthogonal transform process uses a DC nest to set the magnitude of the difference from the first residual vector <d>. First basis vector <u for minimization1, Which includes a base candidate vector sequentially extracted from the DC nest.The<Ui>
  hi= <D · ui>2/ ‖Ui2
The basis candidate vector <uiIs the first basis vector <u1> And the first basis vector <u1Is normalized by the magnitude of the first normalized basis vector <v1> And nothing, thisHoldStep and first scalar coefficient α1Is the first normalized basis vector <v of the residual vector <d>1Is obtained as a projection to &gt; and holds this.
[0040]
    The present invention (3) According to the conventional steps S126 and S127 of FIG.the firstThe square norm of the difference from the residual vector <d> ‖ <d> −αi<Ui〉 ‖2It is possible to search for a condition that minimizes the above-described simple calculation and conditions. Therefore, the AOT process can be speeded up.For example, the first scalar coefficient α 1 Is calculated by extracting the first normalized basis vector <v 1 It only needs to be obtained once as a projection to〉, and the calculation is greatly simplified.
[0041]
  Also preferably, in the present invention (4), in the present invention (3), the adaptive orthogonal transform processing uses the first residual vector <d> as the first scalar coefficient α.1And the first normalized basis vector <v1> Scalar product α1<V1The first residual vector <d1> Exceeds the specified toleranceIs determined, The first residual vector <d1The second basis vector <u for minimizing the difference between2, Which includes a base candidate vector sequentially extracted from the DC nest.The<Ui>
  hi= {<D · ui>-(<D · u1> <U1・ Ui>) / ‖U12}2
          / {‖Ui2-(<U1・ Ui>) / ‖U1‖)2}
The basis candidate vector <uiTo the second basis vector <u2> And the second basis vector <u2Is normalized and the first normalized basis vector <v1To the second normalized basis vector <v2>, The step of holding this, and the second scalar coefficient α2To the first residual vector <d1The second normalized basis vector <v of2Is obtained as a projection to &gt; and holds this.
[0042]
  The present invention (4) According to the present invention (3) In addition to the effect of <d · u1>, ‖U1‖ And denominator ‖ui2, ‖U1As for ‖, since the calculation result already performed in the first basis search can be used, the AOT process can be further improved in efficiency and speed.In addition, the second basis vector <u 2 The first normalized basis vector <v 1 > Is performed once, and the calculation is greatly simplified.
[0043]
  Preferably, in the present invention (5), in the present invention (4), the adaptive orthogonal transform processing is performed by the first residual vector <d1Is the second scalar coefficient α2And the second normalized basis vector <v2> Scalar product α2<V2> Second residual vector <d2Is determined to exceed a predetermined allowable value, the second residual vector <d2> The third basis vector <u for minimizing the difference between3, Which includes a base candidate vector sequentially extracted from the DC nest.The<Ui>
  hi=
  (<D · ui〉 −<d ・ v1> <V1・ Ui>-<D · v2> <V2・ Ui>)2
      / {‖Ui2-<V1・ Ui>2− <V2・ Ui>2}
The maximumRuThe basis candidate vector <ui> The third basis vector <u3> And the third basis vector <u3Is normalized and the first normalized basis vector <v1> And the second normalized basis vector <v2And the third normalized basis vector <v3>, The step of holding this, and the third scalar coefficient α3To the second residual vector <d2The third normalized basis vector <v of3Step of saving as a projection of
Is provided.
[0044]
  According to the present invention (5), in addition to the effects of the present inventions (3) and (4), (<d · ui〉 −<d ・ v1> <V1・ Ui>) And denominator (‖ui2− <V1・ Ui>2As for (), since the calculation results already performed in the first and second basis searches can be used, the AOT process can be further improved in efficiency and speed.
[0045]
  Preferably, in the present invention (6), in the present inventions (3) to (5), the adaptive orthogonal transform processing is performed by using the first residual vector <d> = (d1, d2…, DnCandidate vector <u that minimizes the difference betweeni> = (U1, u2, ..., un) To find the inner product <d · ui> Which includes a basis candidate vector <ui> Optional elements (for example,u q ) Is replaced with a linear combination of the remaining elements, and the residual vector <d> and the basis candidate vector <ui> Inner product <d · ui>
  <D · ui> = (D1d q ) U1+ (D2d q ) U2+,
                  …, + (d n d q )u n
  However, (d q -D q ) U q Except for
It is obtained by the product-sum operation.
[0046]
  In the present invention (6), the basis candidate vector <uiThe sum of all elements ofu q ) Can be expressed as a linear combination of the remaining elements. Therefore, the inner product operation <d · u with the first residual vector <d>i> Can be expanded into a product-sum operation as shown in the above equation, and thus the number of troublesome product-sum operations can be omitted by one. In image coding processing by the HVQ method, a large number of vector inner product operations are performed. Therefore, omission of each time greatly contributes to speeding up of the coding processing as a whole.
[0047]
  Preferably, in the present invention (7), m scalar coefficients α in the present inventions (3) to (5).k(k = 1 to m) and m normalized basis vectors <vk> (K = 1 to m) and the set of orthonormal basis sets m scalar expansion count βk(k = 1 to m) and m basis candidate vectors <u that are the basis of each of the normalized basis vectorsk> A set of non-orthogonal basis sets consisting of (k = 1 to m), and the converted m scalar expansion counts βkAnd m basis candidate vectors <u from the DC nestk>, And a step of encoding each of the DC images and outputting code data.
  The orthonormal basis set αk, <Vk> (K = 1 to m)k, <Uk> (K = 1 to m), the decoding side converts each basis candidate vector <uk> Do not need to be orthogonalized, and βkThe residual vector <dj> Can be approximated. Therefore, the decoding process can be performed easily and at high speed.
  The image encoding method according to the present invention (8) is the same as the image encoding method according to the present invention (7).1~ ΒmThe norms are sorted in the order of their sizes, and each difference between adjacent norms including 0 is obtained. For each obtained differenceTo the remaining high-order bits excluding the low-order bits of the specified number of bitsHuffman coding is applied.
[0048]
  Generally scalar expansion coefficient β1~ ΒmThe norms of can take various values, but when these are arranged in order of magnitude and each difference between adjacent norms including 0 is taken, the magnitudes of the differences are often approximate (or identical) to each other. Therefore, these difference valuesTo the remaining upper bits excluding the lower bits of the specified number of bitsBy applying the Huffman code, further code compression is possible.
[0049]
  Preferably, in the present invention (9), the adaptive orthogonal transform processing in the present invention (1), (3) or (5) is performed.Found basisVectorIf the number is more than the predetermined,Instead of the base system encoding, the image data itself of the encoding target block is encoded. Therefore, the decoding image quality can be improved. In fact, since such a situation is extremely small, the influence on the code compression rate is extremely small.
[0050]
  Further, the above problem is solved by, for example, the configuration of FIG. That is, the image decoding method of the present invention (10) reproduces a DC image corresponding to the block average value for each B pixel from the code data described in the present invention (7), and extracts a part of the DC image. The lower n of each DC pixel (n = log2B) A step of setting a bit to 0 to make a DC nest, a step of decoding a set of m scalar expansion counts and m pieces of extracted information from the code data, and m scalar expansion counts for the target block And a scalar product β with each base candidate block extracted from the DC nest by m pieces of extraction informationk<Uk> (K = 1 to m)blockThe cumulative addition is performed every time, and the block average value is separated from the addition result to obtain a residual vector <djIs generated, and this is combined with the DC value of the target block to reproduce the image data. Therefore, no fractional part is generated in the block average value, and an integer-precision block average value can be obtained at high speed.
[0051]
  The image decoding method of the present invention (11) includes a step of reproducing a DC image corresponding to each block average value for each B pixel from the code data described in the present invention (7), and setting a part of the DC image as a DC nest. , Decoding a set of m scalar expansion counts from the code data and m pieces of extracted information, and m scalar expansion counts β for the target blockk(k = 1 to m) and each base candidate block <U extracted from the DC nest by m pieces of extraction informationk> For each DC pixel per k (k = 1 to m) (n = log2B) Scalar product β with 0 bitk<Uk> (K = 1 to m)blockThe cumulative addition is performed every time, and the block average value is separated from the addition result to obtain a residual vector <djIs generated, and this is combined with the DC value of the target block to reproduce the image data.
[0052]
  In the present invention (10), (11), each selected block <UkSince the lower n bits of> are set to 0, even if these are accumulated in advance, the addition result is an integral multiple of the block size B (for example, 16). The expansion coefficient βkIs an integer precision. Therefore, if this cumulative addition result is finally divided by the block pixel number B, the block average value A can be obtained by one division.jIs obtained efficiently. Therefore, the baseblockβk<U k> (K = 1 to m) can be efficiently calculated.
[0054]
  Further, the image encoding device of the present invention (12) divides the image data into blocks for each B pixel to generate a DC image consisting of each block average value, and subtracts each DC pixel from which a part of the DC image is extracted. n (n = log2B) DC nest generation means for generating a DC nest by setting a bit to 0 and storing it in a memory, and a pixel block <Rj> The block average value DCJResidual vector <d after separatingj> Exceeds a predetermined tolerance ZIs determined, Sequentially extracting a base candidate block from the DC nest, separating a block average value from the block to generate a base candidate vector, and performing the adaptive orthogonal transform (AOT) processing using the base candidate vector to generate the residual vector <DjCalculating means for obtaining one or more basis vectors for approximating the value of> to a tolerance value or less.
[0055]
  The image decoding apparatus according to the present invention (13) reproduces a DC image corresponding to each block average value for each B pixel from the code data according to the present invention (7) and extracts a part of the DC image. The lower n of each DC pixel (n = log2B) DC nest reproducing means for reproducing a DC nest with bits set to 0 and storing it in a memory; Decoding means for decoding a set of m scalar expansion counts and m extracted information from the code data; , A scalar product β of m scalar expansion counts for the target block and each base candidate block extracted from the DC nest by m pieces of extraction informationk<Uk> (K = 1 to m)blockThe cumulative addition is performed every time, and the block average value is separated from the addition result to obtain a residual vector <djIs generated and combined with the DC value of the target block to reproduce the image data.
[0056]
  The present invention (14) Recording media of the present invention (1) to (11The computer-readable recording medium which recorded the program for making a computer perform the process as described in any one of 1).
[0057]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the accompanying drawings. Note that the same reference numerals denote the same or corresponding parts throughout the drawings.
[0058]
FIG. 2 is a block diagram of the image coding apparatus according to the embodiment. In the figure, 31 is a DC nest generation unit that generates a DC nest according to the present invention from a decoded DC image, and 17 is a DC nest memory that stores the generated DC nest. , 32 is an adaptive orthogonal transform processing unit (AOT) that performs AOT processing efficiently and at high speed, 33 is a coefficient transforming unit, and 34 is a expansion coefficient β.kIt is a code | cord | chord part which enables further high compression. Other configurations may be the same as those described in FIG. Note that the characteristics of each of the above parts will become apparent from the following description of the operation.
[0059]
FIG. 3 is a flowchart of image code (main) processing according to the embodiment. In step S1, original image data is read into the original image memory 11. For example, an RGB target image is converted into a YUV system and read. Y corresponds to luminance data, U and V correspond to color difference data, and U and V are down-sampled using a luminance average of two horizontal pixels. The luminance data Y as an example is composed of 960 pixels vertically × 1280 pixels horizontally, and, for example, 8 bits are assigned to each pixel. In the following, the processing of luminance data Y will be mainly described, but U and V can be processed in the same manner.
[0060]
In step S2, a block average (DC) value for every 4 × 4 pixels is obtained for all image data. At this time, the decimal part is rounded off, for example. In step S3, all DC values are encoded and output by a known two-dimensional DPCM method or the like. In step S 4, all DPCM outputs are IDPCM decoded to reproduce a DC image and store it in the DC image memory 15. This is to make the AOT processing conditions on the code side / decoding side the same. In step S <b> 5, the DC nest generation unit 31 generates a DC nest from the DC image and stores it in the DC nest memory 17. It should be noted that the selection of the area from which the DC nest is cut out may be the same as in the past.
[0061]
FIG. 7 shows a DC nest generation image. 7A, in this embodiment, each DC pixel DC cut out from the DC image memory 15 is used.JAre masked (= 0) and this is used as a nested pixel N in the DC nested memory 17.jTo remember. The lower 4 bits are 2Four= B (B = block size 16) or 4 = log2B relationship. As a result of masking the lower 4 bits, the base candidate block <Ui> Is always an integer multiple of 16, and therefore the block average value a that is 1/16 of the sumiIs always an integer. Therefore, the base candidate block <Ui> Block average value aiBase candidate vector <uiThe block average value of> is always 0.
[0062]
FIGS. 7A and 7B are graphs showing specific numerical examples. However, an average of four pixels is taken here for simplicity of explanation. In FIG. 7C, the decoding block <Rj> DC value DCJMultiple basis vectors βk<Uk> Is cumulative, each basis vector βk<UkSince the block average value of> is always 0, conventional noise is not superimposed. This greatly improved the image quality.
[0063]
FIG. 8A shows a numerical example of FIG. 7 in a table. The sum SUM of the DC pixels A to D is 251 and the average value AV is 251/4 = 62.75 (non-integer). When the DC pixels A to D are transferred to the nested pixels A to D, the lower 4 bits are masked. As a result, the sum SUM of the nested pixels A to D becomes 224, and the average value AV becomes 224/4 = 56 (integer). Further, a base candidate vector <u that separates the average value AV = 56 from the nested pixels A to DiThe elements a to d in “>” are “24, −24, 8, and −8”, and the sum of these elements is sum = 0 (complete average value separation).
[0064]
FIG. 8B shows the same numerical example as FIG. However, the difference is that the DC pixels A to D are copied as they are to the nested pixels A to D, and the lower 4 bits are masked (= 0) from the sum SUM of the nested pixels A to D. Even in this method, since the sum SUM is a multiple of 16, the block average value AV = 60 (integer). However, according to this method, a base candidate vector <u that is obtained by separating the average value AV = 60 from the nested pixels A to D.i> Elements “a” to “d” are “33, −25, 13, −10”, and the sum “sum” is not necessarily 0 (complete average value separation).
[0065]
As shown in FIG. 8B, a part of the DC image is directly copied to the DC nest, and the base candidate block <Ui> May be masked (= 0) from each pixel.
[0066]
Returning to FIG. 3, in step S6, the index counters j and J for the original image memory 11 and the DC image memory 15 are both initialized to zero. Where j is the target block to be encoded <Rj> Represents an index counter for J, and J represents an index counter for a DC pixel. In step S7, the target block <RjThe corresponding decoded DC value DCJAnd the residual vector <dj> In step S8, the square norm of the residual vector ‖dj2Is greater than the allowable error Z. ‖Dj2If not> Z, the base number “0” is output as a sign in step S17. Target block <R in this casej> Is decoded by an AC component prediction method described later. ‖Dj2If> Z, adaptive orthogonal transform processing described later is performed in step S9.
[0067]
In step S10, it is determined whether or not the basis number k> 4 generated by the adaptive orthogonal transform. Incidentally, in the actual measurement, statistical results of about k = 1 to 3 are obtained in most cases. Therefore, if k> 4, the base number “5” is output in step S18, and the target block <RjEach pixel value of> is output as a sign. On the other hand, if k> 4 is not satisfied, an expansion coefficient β described later is obtained in step S11.kConvert to. In step S12, the basis number “m” and the expansion coefficient βkAnd non-orthogonal basis vectors <uiThe index information i is output as a code.
[0068]
In step S13, the counters j and J are incremented by one. However, +1 with respect to the counter j means an update for one pixel block. In step S14, it is determined whether or not j ≧ M (= total number of image blocks). If not j ≧ M, the process returns to step S7, and the next target block <RjThe same sign processing as described above is performed for Thereafter, the process proceeds in the same manner. Eventually, when j ≧ M is determined in step S14, encoding by Huffman or the like is performed in step S15. This encoding will be described later. Thus, the encoding process for one image is completed.
[0069]
4 to 6 are flowcharts (1) to (3) of the adaptive orthogonal transform processing according to the embodiment.k<Vk> (K = 1 to m) can be obtained efficiently and at high speed. In the following description, the first residual vector <d determined in step S7 above.jIs represented by <d>, and the residual vector updated thereafter is represented by <dk> (K = 1 to m).
[0070]
FIG. 4 shows the first base search process. Prior to the description of this process, a calculation device performed to perform the process at high speed will be described. That is, normally, the first basis is the square norm e of the difference from the residual vector <d>.iBasis candidate vector <uiHowever, when this relational expression is further expanded, Expression (7) is obtained.
[0071]
[Expression 7]
Figure 0003932244
[0072]
By the way, ‖d‖ in the first term on the right side of equation (7)2Since> 0 is constant regardless of the basis candidates, the second term on the right side is maximized <ui> May be the first basis. Therefore, the second term on the right side is changed to hifar.
[0073]
[Equation 8]
Figure 0003932244
[0074]
The following is hiThe first basis α that maximizesk<Vk> In step S21, inner product calculation <d · u, which will be described later.iAs a pre-processing, a 15-dimensional vector <d ′> is obtained by subtracting the 16th component of <d> from the values of the remaining components. In step S22, h for i = 0 to (N-1).iInner product of molecules <d '· ui> And the array [Pi] {I = 0 to (N−1)}.
[0075]
Specifically, this inner product operation is expressed as <uiIs originally a 16-dimensional vector, but in the present embodiment, its block average value (sum of all elements) = 0, so that its 16th component u16Can be expressed by a linear combination of the remaining 15 components.
[0076]
[Equation 9]
Figure 0003932244
[0077]
Therefore, hiInner product of molecules <d · uiIs equivalent to <d '· uiThus, the product-sum operation can be omitted once (8192 times for all i).
[0078]
[Expression 10]
Figure 0003932244
[0079]
In step S23, h for i = 0 to (N-1).iDenominator square norm ‖ui2Are obtained and the array [Li] {I = 0 to (N−1)}.
[0080]
## EQU11 ##
Figure 0003932244
[0081]
Array [Li] Can be used once and the results can be used later. In step S24, hiRegister E = 0 which holds the maximum value of the base candidate vector <uiThe index counter i = 0 and the base number counter k = 1 are initialized.
[0082]
In step S25, hi= Pi 2/ LiAsk for. In step S26, hiIt is determined whether or not> E. hiIf> E, h in step S27iAnd the current i is updated to the array [Ik] (K = 1). HiIf not> E, the process of step S27 is skipped.
[0083]
In step S28, i is incremented by 1, and in step S29, it is determined whether i ≧ N (total number of candidates). If i ≧ N is not satisfied, the process returns to step S25, and the next hiThe maximum value search process similar to the above is performed. Thereafter, the process proceeds in the same manner. When i ≧ N, the search for all nested blocks is completed. At this time, the array [Ik] For hiThe first basis vector <u1> Index value i is held.
[0084]
In step S30, the first basis vector <u1) To normalize basis vectors <v1> And nothing, the array [Vk] (K = 1). The scalar coefficient α1(<D> <v1To the array [Ak] (K = 1).
[0085]
In step S31, the residual vector <d> is approximated to the residual vector <d> by the first basis.1> = <D> -α1<V1Update with <>. In step S32, the square norm of the new residual vector e = ‖d12In step S33, it is determined whether or not e ≦ Z. If e ≦ Z, the AOT process is terminated at this stage. If e ≦ Z is not satisfied, the second base search process is performed.
[0086]
FIG. 5 shows the second base search process. Prior to the description of this process, a calculation device used to efficiently perform the process will be described. That is, normally, the second basis is the residual vector <d1The square norm of the difference from>iOrthogonal vector <uiAlthough it is calculated | required as'>, Formula (12) will be obtained if this relational expression is developed further.
[0087]
[Expression 12]
Figure 0003932244
[0088]
Here, the orthogonal vector <ui'> Is the second basis candidate vector <uiIs the first normalized basis vector <v1> Is orthogonalized.
[0089]
[Formula 13]
Figure 0003932244
[0090]
Similarly, ‖d in the first term on the right side of equation (12) above12Since> 0 is constant regardless of the basis candidates, an orthogonal vector <u that maximizes the second term on the right side of the samei'> Can be the second basis. The second term on the right side is hifar.
[0091]
[Expression 14]
Figure 0003932244
[0092]
hiMay be obtained as it is, but the denominator of the equation (14) is modified in order to efficiently use the calculation result of FIG. First, hiMolecular orthogonal vector <ui'> To base candidate vector <ui>iThe numerator can be expressed by equation (15).
[0093]
[Expression 15]
Figure 0003932244
[0094]
Furthermore, the residual vector <d1Is represented by the first residual vector <d>, hiThe molecule can be expressed by the formula (16).
[0095]
[Expression 16]
Figure 0003932244
[0096]
Therefore, hiFor the calculation of the numerator, the calculation result obtained by the first basis search <d · u1>, ‖U1You can use firewood. Similarly, hiWhen the denominator is deformed, it can be expressed by equation (17).
[0097]
[Expression 17]
Figure 0003932244
[0098]
Therefore, hiThe calculation result ‖u obtained by the first basis search is used for the denominator calculation.i2, ‖U1You can use firewood. The above is the h in equation (14)iSubstituting for, hiBecomes the equation (18-1) and can be finally expressed by the equation (18-2).
[0099]
[Expression 18]
Figure 0003932244
[0100]
Where Pi= <D · ui>, Li = ‖ui2Is the array [Pi], [Li] Can be used respectively, and Pk= P1= <D · u1>, √ (Lk) = √ (L1) = ‖U1‖ Can also use the previous calculation results. Therefore, the new calculation this time is <uk・ Ui> = <U1・ UiIt is a part of>.
[0101]
Assuming the above, the search for the second basis performs the following arithmetic processing. That is, in step S41, P = 1 because k = 1.1= <D · u1>, L1= ‖U12Hold. These can use the results obtained in steps S22 and S23. The subscript “1” is the first basis <u1Is the contents of the index counter i, which indicates the array [Ik]. In step S42, the calculation of equation (19) is performed, and the result is stored in the registers η and κ.
[0102]
[Equation 19]
Figure 0003932244
[0103]
In step S43, the inner product calculation <u1・ Ui<U>115-dimensional vector <w obtained by subtracting the 16th component of> from the values of the remaining components1> In step S44, the inner product <w for i = 0 to (N-1).k・ Ui> Η is obtained, and these are arranged in the array [Qi]. In step S45, for i = 0 to (N-1) (Pi-ΚQi) To obtain the array [Pi]. Where P on the right sideiIs the calculation result of step S22, and the calculation result of step S45 is further converted to the array [Pi] To overwrite the array [Pi] Are updated sequentially reflecting the past calculation results. In step S46, for i = 0 to (N-1) (Li-Qi 2) And these are arranged in the array [Li] (Overwrite). Where L on the right sideiIs the calculation result of step S23, and the calculation result of step S46 is further converted to the array [Li] To overwrite the array [Li] Is also updated sequentially reflecting the past calculation results. HiThe repetitive calculation of can be finally expressed by equation (20).
[0104]
[Expression 20]
Figure 0003932244
[0105]
In step S47, hiRegister E = 0 which holds the maximum value of the base candidate vector <uiThe index counter i is initialized to 0, and the base number counter k is incremented by one. At this point, k = 2.
[0106]
In step S48, hi= Pi 2/ LiAsk for. In step S49, hiIt is determined whether or not> E. hiIf> E, h in step S50iAnd the current i is updated to the array [Ik] (K = 2). HiIf not> E, the process of step S50 is skipped.
[0107]
In step S51, i is incremented by 1. In step S52, it is determined whether i ≧ N. If i ≧ N is not satisfied, the process returns to step S48, and the next hiThe maximum value search process similar to the above is performed. Thereafter, the process proceeds in the same manner. When i ≧ N, the search for all nested blocks is completed. At this time, the array [Ik] (K = 2) is hiThe second basis vector <u2> Index value i is held.
[0108]
In step S53, the second basis vector <u2> To <v1> Is normalized to a normalized basis vector <v2> And nothing, the array [Vk] (K = 2). The scalar coefficient α2(<D1<V2To the array [Ak] (K = 2). In this way, the basis vector <u2> Orthonormalization and scalar coefficient α2This calculation may be carried out once for the search result, thereby significantly reducing the weight and speed of the AOT process. The same applies to the following.
[0109]
In step S54, the residual vector <d1> Is a residual vector <d2> = <D1> -Α2<V2Update with <>. In step S55, the square norm of the new residual vector e = ‖d22In step S56, it is determined whether e ≦ Z. If e ≦ Z, the AOT process is terminated at this stage, and if e ≦ Z is not satisfied, the third base search process is performed.
[0110]
FIG. 6 shows the third basis search process. Prior to the description of this process, a calculation device used to efficiently perform the process will be described. That is, normally, the third basis is the residual vector <d2The square norm of the difference from>iOrthogonal vector <uiAlthough it is calculated | required as'>, Formula (21) will be obtained if this relational expression is developed further.
[0111]
[Expression 21]
Figure 0003932244
[0112]
Here, the orthogonal vector <ui'> Is the third basis candidate vector <uiFor the first and second normalized basis vectors <v1>, <V2> Is orthogonalized.
[0113]
[Expression 22]
Figure 0003932244
[0114]
Similarly, ‖d in the first term on the right side of equation (21) above22Since> 0 is constant regardless of the basis candidates, an orthogonal vector <u that maximizes the second term on the right side of the samei'> Can be the third basis. The second term on the right side is hifar.
[0115]
[Expression 23]
Figure 0003932244
[0116]
Furthermore hiMolecular orthogonal vector <ui'> To base candidate vector <ui>iThe molecule can be expressed by the formula (24).
[0117]
[Expression 24]
Figure 0003932244
[0118]
Furthermore, the residual vector <d in equation (24)2Is represented by the first residual vector <d>, hiThe molecule can be expressed by the formula (25).
[0119]
[Expression 25]
Figure 0003932244
[0120]
Similarly hiWhen the denominator is deformed, it can be expressed by equation (26).
[0121]
[Equation 26]
Figure 0003932244
[0122]
The above is the h in equation (23)i(27) is obtained by substituting for.
[0123]
[Expression 27]
Figure 0003932244
[0124]
By the way, each second term of the numerator / denominator (27) has already been calculated, and there is a relationship of the expression (28).
[0125]
[Expression 28]
Figure 0003932244
[0126]
Therefore, hiThis calculation can be finally expressed by equation (29) following the equation (18-2).
[0127]
[Expression 29]
Figure 0003932244
[0128]
(29) is the inner product <uk・ Ui> Is <vk・ UiIt has the same shape as the above equation (18-2) except that it is>. Therefore, the subsequent bases can be obtained efficiently by recursively using the same routine as in FIG.
[0129]
Based on the above, the search after the third basis performs the following arithmetic processing. That is, in step S61, P = 2 with k = 2.2= <D1・ U2>, L2= ‖U22Hold. In step S62, the calculation of equation (30) is performed, and the result is stored in the registers η and κ.
[0130]
[30]
Figure 0003932244
[0131]
In step S63, the inner product calculation <v2・ UiAs a pre-processing of215-dimensional vector <w obtained by subtracting the 16th component of> from the values of the remaining components2> However, <v2Since each component of> is not an integer value, it is necessary to perform an inner product operation in a real number type as it is. In order to avoid this, <v2> (Ie <w2>) Is multiplied by a constant a to make an integer.
[0132]
In step S64, the inner product (<w2・ Ui> Η / a), and these are arranged in the array [Qi] (Overwrite). At this time, the result is divided by dividing each operation result by a constant a. In step S65, for i = 0 to (N-1) (Pi-ΚQi) To obtain the array [Pi] (Overwrite). In step S66, for i = 0 to (N-1), (Li-Qi 2) And these are arranged in the array [Li] (Overwrite). As described above, the calculation of the equation (29) can be expressed by the equation (31).
[0133]
[31]
Figure 0003932244
[0134]
In step S67, hiRegister E = 0 which holds the maximum value of the base candidate vector <uiThe index counter i is initialized to 0, and the base number counter k is incremented by one. At this point, k = 3.
[0135]
In step S68, hi= Pi 2/ LiAsk for. In step S69, hiIt is determined whether or not> E. hiIf> E, h in step S70iAnd the current i is updated to the array [Ik] (K = 3). HiIf not> E, the process of step S70 is skipped.
[0136]
In step S71, i is incremented by 1, and in step S72, it is determined whether i ≧ N. If i ≧ N is not satisfied, the process returns to step S68, and the next hiThe maximum value search process similar to the above is performed. Thereafter, the process proceeds in the same manner. When i ≧ N, the search for all nested blocks is completed. At this time, the array [Ik] (K = 3) is hiThe third basis vector <uThree> Index value i is held.
[0137]
In step S73, the third basis vector <uThree> To <v1>, <V2> Is normalized and normalized to a normalized basis vector <vThree> And nothing, the array [Vk]. The scalar coefficient αThree(<D2<VThreeTo the array [Ak].
[0138]
In step S74, the residual vector <d2> Is a residual vector <dThree> = <D2> -ΑThree<VThreeUpdate with <>. In step S75, the square norm of the new residual vector e = ‖dThree2In step S76, it is determined whether or not e ≦ Z. If e ≦ Z, the AOT process is terminated at this stage. If e ≦ Z is not satisfied, the process returns to step S61 to perform preprocessing and search processing for the fourth and subsequent bases. Although not shown, preferably, for example, a determination process for determining whether or not k ≧ 4 is provided after step S76, and when A ≧ 4, the AOT process is skipped.
[0139]
As described above, the AOT process can be significantly reduced in weight and speeded up, and the calculation time is shortened to 1/3 to 1/10 of the conventional measurement ratio.
[0140]
Referring to FIG. 2, from AOT32, αk, <Vk> (K = 1 to m) are obtained, and the residual vector <dj> Can be approximated within an allowable error Z. Furthermore, the coefficient conversion unit 33k, <Vk> (K = 1 to m)k, <Uk> In order to convert into a set of (k = 1 to m), the expansion coefficient βkAsk for. That is, now the basis candidate vector <uk>, Expansion coefficient βk, Normalized basis vector <vk>, Scalar coefficient αkWhen each matrix is set to (32),
[0141]
[Expression 32]
Figure 0003932244
[0142]
These are related by the equation (33).
[0143]
[Expression 33]
Figure 0003932244
[0144]
In order to solve this for the matrix B, first, in order to convert the matrix U to a square matrix, the transposed matrix U of the matrix U on both sides.THung from the left side.
[0145]
[Expression 34]
Figure 0003932244
[0146]
This matrix (UTU) is expanded as shown in equation (35),
[0147]
[Expression 35]
Figure 0003932244
[0148]
Where <ui・ Uj> Represents the inner product, and <ui・ Uj> = <Uj・ Ui>, A square matrix symmetric with respect to the diagonal element is obtained, and <ui> And <ujSince> is different, there is an inverse matrix. Therefore, the matrix (UTU) inverse matrix (UTU)-1Is multiplied by (36) to obtain βkIs obtained.
[0149]
[Expression 36]
Figure 0003932244
[0150]
The orthonormal basis set αk, <Vk> (K = 1 to m)k, <Uk> (K = 1 to m) to convert each base candidate vector <uk> Do not need to be orthogonalized, and βkThe residual vector <dj> Can be approximated. Therefore, the decoding process can be performed easily and at high speed. Next, the expansion coefficient βkThe compression code processing will be described.
[0151]
FIG. 9 is an image diagram of expansion coefficient code processing according to the embodiment. In FIG. 9A, the generated β1~ ΒFourExtract the norm (size) from. In FIG. 9B, the norm is set in ascending order (βThree, Β2, ΒFour, Β1), And the difference (Δβ in order from the front (initially 0)Three, △ β2, △ βFour, △ β1) In FIG. 9C, the coefficient residual (ΔβThree, △ β2, △ βFour, △ β1) Is divided into the lower 2 bits and the upper bits, and the upper bits are Huffman encoded.
[0152]
In this example, △ βThreeAnd (△ β2= △ βFour= △ β1)), And the Huffman code has a high frequency of occurrence (Δβ).2, △ βFour, △ β1) Is assigned a code with a small number of bits, and △ β is less frequentThreeA code having a large number of bits is assigned to. Therefore, the expansion coefficient βkCan be compressed and encoded. Moreover, coefficient residual ΔβkBy the Huffman coding of the higher-order bits, the fraction of the lower-order bits is cut off.2= △ βFour= △ β1Is likely to be.
[0153]
Also, residual △ βkThe lower two bits of the corresponding base vector <ukThe index information (13 bits = 0 to 8191) is packed into a 2-byte fixed-length code area and output as a fixed-length code. The output order of these codes is △ βThree, △ β2, △ βFour, △ β1(Ie uThree, U2, UFour, U1) In that order.
[0154]
In FIG. 9D, each code is represented by u on the decoding side.Three, U2, UFour, U1Are entered in the order ofThree, △ β2, △ βFour, △ β1Isolate. The first △ βThreeTo βThreeAnd the βThree△ β2Plus β2And the β2△ βFourPlus βFourAnd the βFour△ β1Plus β1Is decrypted. βk<UkSince> functions by taking the sum (primary combination) of these, the order of these does not matter.
[0155]
The norms are rearranged in ascending order, and the difference is obtained in order from the front (initially 0). Conversely, the norms are rearranged in descending order, and the difference may be obtained in order from the rear (initially 0).
[0156]
Hereinafter, the encoding process by the encoding unit 34 will be described. DPCM prediction residual ΔDCJ, IIs quantized with a quantization coefficient Q (Z) and ΔDCJ, IOnly when = 0, the run length is considered and the prediction residual ΔDCJ, IAnd the run length are independently Huffman coded. The basis number k considers the run length only when k = 0, and the basis number k And the run length are independently Huffman coded. Coefficient residual △ βkThe higher-order bits are Huffman-encoded for the quotient quantized with a constant Q (for example, 8). The basis vector <uk> In the code information i (= 13 bits)kSign bit and coefficient residual ΔβkThe lower 2 bits are packed into a fixed-length code of 16 bits in total, and these are the residual ΔβkIn ascending (or descending) order. As a whole, a code string is formed by packing the pixel blocks in the order of appearance. If necessary, a code EOB for indicating switching of the pixel block is written.
[0157]
FIG. 10 is a block diagram of the image decoding apparatus according to the embodiment and corresponds to the image encoding apparatus of FIG. In the figure, 41 is a decoding unit such as Huffman, 42 is a pixel of interest DCJAmbient DC value including DCJTarget block containing AC components from Rj>, An AC component prediction unit 43 for decoding basis set βk<Uk> (K = 1 to m) based on the approximate residual vector <djThe residual vector reproduction unit 44 reproduces the decoded block <Rj> Based on the target block <RjR to playjA playback unit, 45 is a playback image memory for storing playback images, 46 is an IDPCM unit for IDPCM decoding of decoded DC values, 47 is a DC image memory for storing decoded DC images, 48 is a DC nest generation unit similar to FIG. 49 is a DC nest memory for storing DC nests, and 50 is a selection block <Uk> Is a selected block buffer 51 for holding <Uk> Βk, 52 and 53 are βk<Uk> (K = 1 to m) cumulative adder, 54 is the block average value A of the cumulative addition resultjThe averager 55 calculates the block average value A from the cumulative addition result.j, 56 is a reproduction approximate residual vector <dj> Is an approximate vector buffer, 57 is a target block <Rj> Reproduction DC value DCJReproduction approximate residual vector <dj> Is added.
[0158]
FIG. 11 is a flowchart of image decoding processing according to the embodiment. In step S101, image code data is read. In step S102, the Y, U, and V DC values are decompressed (decoded) by the IDPCM method similar to that in FIG. 2, and the DC image is reproduced. In step S103, a DC nest is generated from the DC image of the Y component. At this time, as shown in FIG.JAre masked (= 0), and each DC nest pixel value NjIt becomes. Note that information such as the cutout position of the DC image is received separately. In step S104, the index counters j and J for the original image memory 45 and the DC image memory 47 are both initialized to zero.
[0159]
In step S105, code data for one block image is input. In step S106, it is determined whether or not the basis number k = 0. If k = 0, the target block <R is determined by the AC component prediction method described later in step S114.jPlay>. If k ≠ 0, it is further determined in step S107 whether 1 ≦ k ≦ 4.
[0160]
If 1 ≦ k ≦ 4, the residual vector <d in step S112j> Is inversely quantized. In this embodiment, since the lower 4 bits of the DC nest are masked (= 0) in advance, each selected block <Uk> Directly into βkMultiply these values and add them up to the block average value AjTo separate the residual vector <dj> Is obtained at once. Therefore, the decoding process is speeded up. In step S113, the obtained residual vector <djDC value corresponding toJIs added.
[0161]
If 1 ≦ k ≦ 4 is not satisfied, the target block <R in step S108.jFrom the decoded data of <>, the target block <Rj<> Is played directly. Thus, the target block of 4 × 4 pixels <Rj> Has been played back. In step S109, the reproduced target block <RjIs stored in the reproduced image memory 45.
[0162]
In step S110, the counters j and J are incremented by 1, respectively, and in step S111, it is determined whether i ≧ M (total number of pixel blocks). If i ≧ M is not true, the process returns to step S105, and the same decoding / reproduction processing is performed for the next block image code data. Thereafter, the process proceeds in the same manner. When j ≧ M is determined in step S111, the decoding process for one image is terminated.
[0163]
FIG. 12 is an image diagram of AC component prediction in the embodiment, and a known prediction method can be adopted. FIG. 12 (A) shows a stepwise AC component prediction method, which will be outlined below. In the first stage, each sub-block S on the target block S1~ SFourIs estimated from the DC values of the surrounding four blocks (U, R, B, L) including S by the following equation.
[0164]
S1= S + (U + L-B-R) / 8
S2= S + (U + R−B−L) / 8
SThree= S + (B + L−U−R) / 8
SFour= S + (B + R−UL) / 8
Similarly, in this first stage, U1~ UFour, L1~ LFour, R1~ RFour, B1~ BFourEtc. are estimated. Furthermore, in the second stage, the above method is used recursively, so that S1Upper 4 pixels P1~ PFourIs estimated by the following equation.
[0165]
P1= S1+ (UThree+ L2-SThree-S2) / 8
P2= S1+ (UThree+ S2-SThree-L2) / 8
PThree= S1+ (SThree+ L2-UThree-S2) / 8
PFour= S1+ (SThree+ S2-UThree-L2) / 8
S2~ SFourEach 4 pixels P above1~ PFourThe same applies to. The target block <R by such a two-step process.j> Is played back.
[0166]
FIG. 13B shows a non-stepped AC component prediction method proposed by the applicant of the present application. From each DC value of four surrounding blocks (U, R, B, L) including the block of interest S, each sub-block is shown. S1~ SFourEach 4 pixels P1~ PFourIs estimated at once. The contents are outlined below. First S1Upper 4 pixels P1~ PFourS2≒ SThree≒ S, UThree≒ U, L2Each approximation of ≈L is performed. This approximation can be expressed as S1P above1Applied to the expression
P1= S1+ (UThree+ L2-SThree-S2) / 8
= S1+ (U + LS-S) / 8
Is obtained. Furthermore, the above S1The formula of S1= S + (U + L−B−R) / 8 is substituted, S1P above1Finally
P1= S + (2U + 2L-2S-BR) / 8
It can be expressed as The above S1P above2about,
P2= S1+ (UThree+ S2-SThree-L2) / 8
= S1+ (U + S−S−L) / 8
Is obtained. Furthermore, the above S1The formula of S1= S + (U + L−B−R) / 8 is substituted, S1P above2Finally
P2= S + (2U-BR) / 8
It can be expressed as The above S1P aboveThreeabout,
PThree= S1+ (SThree+ L2-UThree-S2) / 8
= S1+ (S + L−U−S) / 8
Is obtained. Furthermore, the above S1The formula of S1= S + (U + L−B−R) / 8 is substituted, S1P aboveThreeFinally
PThree= S + (2L-BR) / 8
It can be expressed as The above S1P aboveFourabout,
PFour= S1+ (SThree+ S2-UThree-L2) / 8
= S1+ (S + S−UL) / 8
Is obtained. Furthermore, the above S1The formula of S1= S + (U + L−B−R) / 8 is substituted, S1P aboveFourFinally
PFour= S + (2S-BR) / 8
It can be expressed as Therefore, S1Upper 4 pixels P1~ PFourIs
P1= S + (2U + 2L-2S-BR) / 8
P2= S + (2U-BR) / 8
PThree= S + (2L-BR) / 8
PFour= S + (2S-BR) / 8
Is determined in a step by step. S2~ SFourEach 4 pixels P above1~ PFourThe same applies to.
[0167]
Although the above embodiment has been described with specific numerical examples, it is obvious that the present invention is not limited thereto.
[0168]
Further, although the preferred embodiment of the present invention has been described, it goes without saying that various changes in the configuration, control, processing, and combination of each part can be made without departing from the spirit of the present invention.
[0169]
【The invention's effect】
As described above, according to the present invention, high image quality can be obtained by improving the DC nest, and high-speed coding can be obtained by devising the AOT calculation. Therefore, it greatly contributes to high image quality and high-speed encoding in the HVQ method.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating the principle of the present invention.
FIG. 2 is a block diagram of an image encoding device according to an embodiment.
FIG. 3 is a flowchart of image code (main) processing according to the embodiment.
FIG. 4 is a flowchart (1) of adaptive orthogonal transform processing according to the embodiment.
FIG. 5 is a flowchart (2) of the adaptive orthogonal transform process according to the embodiment.
FIG. 6 is a flowchart (3) of adaptive orthogonal transform processing according to the embodiment.
FIG. 7 is an explanatory diagram (1) of a DC nest according to an embodiment.
FIG. 8 is an explanatory diagram (2) of the DC nest according to the embodiment.
FIG. 9 is an image diagram of expansion coefficient code processing according to the embodiment.
FIG. 10 is a block diagram of an image decoding apparatus according to an embodiment.
FIG. 11 is a flowchart of image decoding processing according to the embodiment.
FIG. 12 is an image diagram of AC component prediction in the embodiment.
FIG. 13 is a block diagram of a conventional image encoding device.
FIG. 14 is a flowchart of a conventional adaptive orthogonal transform process.
FIG. 15 is an image diagram of conventional adaptive orthogonal transform processing.
FIG. 16 is a conceptual diagram of a conventional average value separation process.
[Explanation of symbols]
11 Original image memory
12 DC value generator
13 Differential PCM code part (DPCM)
14 Inverse DPCM code part (IDPCM)
15 DC image memory
16 DC nest generator
17 DC Nest Memory
18 Subtractor
19 Residual vector buffer
20 Extractor block buffer
21 Average device
22 Subtractor
23 Candidate vector buffer
24 Adaptive Orthogonal Transform Processing Unit (AOT)
25 Coefficient converter
26 Code part
31 DC nest generator
32 Adaptive Orthogonal Transform Processing Unit (AOT)
33 Coefficient converter
34 Code part

Claims (14)

画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成し、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストとするステップと、
符号対象の画素ブロックからそのブロック平均値を分離した後の残差ベクトルの大きさが所定の許容値を超えると判定した場合に、前記DCネストより順次基底候補ブロックを抽出し、該ブロックからブロック平均値を分離して基底候補ベクトルを生成し、該基底候補ベクトルを使用した適応的直交変換処理により前記残差ベクトルを許容値以下に近似するための1又は2以上の基底ベクトルを求めるステップと、
を備えることを特徴とする画像符号方法。
The image data is divided into blocks for each B pixel to generate a DC image consisting of each block average value, and the lower n (n = log 2 B) bits of each DC pixel from which a part of the DC image is extracted is set to 0. DC nesting step;
If the magnitude of the residual vector after separating the block mean value from the code target pixel block is determined to exceed a predetermined allowable value, then extracted sequentially base candidate block from the DC nest, the block from the block Separating average values to generate basis candidate vectors, and obtaining one or more basis vectors for approximating the residual vector to an allowable value or less by an adaptive orthogonal transformation process using the basis candidate vectors; ,
An image encoding method comprising:
画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成し、その一部をDCネストとするステップと、
符号対象の画素ブロックからそのブロック平均値を分離した後の残差ベクトルの大きさが所定の許容値を超えると判定した場合に、前記DCネストより順次基底候補ブロックを抽出し、該ブロックを構成する各DC画素の下位n(n=log2B)ビットを0にしてからそのブロック平均値を分離して基底候補ベクトルを生成し、該基底候補ベクトルを使用した適応的直交変換処理により前記残差ベクトルを許容値以下に近似するための1又は2以上の基底ベクトルを求めるステップと、
を備えることを特徴とする画像符号方法。
Dividing the image data into blocks for each B pixel to generate a DC image consisting of each block average value, and making a part of the DC image a DC nest;
If the magnitude of the residual vector after separating the block mean value from the code target pixel block is determined to exceed a predetermined allowable value, then extracted sequentially base candidate block from the DC nest, constituting the block The lower n (n = log 2 B) bits of each DC pixel to be set are set to 0, the block average value is separated to generate a base candidate vector, and the remaining is obtained by adaptive orthogonal transform processing using the base candidate vector. Obtaining one or more basis vectors for approximating the difference vector below an allowable value;
An image encoding method comprising:
適応的直交変換処理は DCネストを使用して最初の残差ベクトル〈d〉との差の大きさを最小とするための第1基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトル〈u〉とするときに、
i=〈d・ui2/‖ui2
を最大とする前記基底候補ベクトル〈u〉を第1基底ベクトル〈u〉として抽出するステップと、
該第1基底ベクトル〈u1〉をその大きさで正規化して第1正規化基底ベクトル〈v1〉となし、これを保持するステップと、
第1スカラー係数α1を残差ベクトル〈d〉の第1正規化基底ベクトル〈v1〉への射影分として求め、これを保持するステップと、
を備えることを特徴とする請求項1又は2に記載の画像符号方法。
The adaptive orthogonal transform process includes a process of searching for a first basis vector <u 1 > for minimizing the difference from the first residual vector <d> using a DC nest, , When the base candidate vector sequentially extracted from the DC nest is <u i >
h i = <d · u i > 2 / ‖u i2
Extracting the basis candidate vector <u i > that maximizes as a first basis vector <u 1 >;
Normalizing the first basis vector <u 1 > with its magnitude to form a first normalized basis vector <v 1 > and holding it;
Obtaining a first scalar coefficient α 1 as a projection of the residual vector <d> to the first normalized basis vector <v 1 > and holding it;
The image encoding method according to claim 1, further comprising:
適応的直交変換処理は 最初の残差ベクトル〈d〉を第1スカラー係数α1と第1正規化基底ベクトル〈v1〉とのスカラー積α〈v〉により近似した後の
第1残差ベクトル〈d〉が所定の許容値を超えると判定した場合に、DCネストを使用して第1残差ベクトル〈d〉との差の大きさを最小とするための第2基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトル〈u〉とするときに、
i={〈d・ui〉−(〈d・u1〉〈u1・ui〉)/‖u122
/{‖ui2−(〈u1・ui〉)/‖u1‖)2
を最大とする前記基底候補ベクトル〈u〉を第2基底ベクトル〈u〉として抽出するステップと、
該第2基底ベクトル〈u〉を正規化及び第1正規化基底ベクトル〈v1〉に直交化して第2正規化基底ベクトル〈v〉となし、これを保持するステップと、
第2スカラー係数αを第1残差ベクトル〈d〉の第2正規化基底ベクトル〈v〉への射影分として求め、これを保持するステップと、
を備えることを特徴とする請求項3に記載の画像符号方法。
The adaptive orthogonal transformation process is performed by approximating the first residual vector <d> by the scalar product α 1 <v 1 > of the first scalar coefficient α 1 and the first normalized basis vector <v 1 >. A second basis vector for minimizing the magnitude of the difference from the first residual vector <d 1 > using the DC nest when it is determined that the difference vector <d 1 > exceeds a predetermined allowable value <U 2 > is searched for, and when the base candidate vector sequentially extracted from the DC nest is <u i >,
h i = {<d · u i> - (<d · u 1><u 1 · u i>) / ‖u 1 ‖ 2} 2
/ {‖U i2 − (<u 1 · u i >) / ‖u 1 ‖) 2 }
Extracting the basis candidate vector <u i > that maximizes as a second basis vector <u 2 >;
Normalizing and orthogonalizing the second basis vector <u 2 > to a first normalized basis vector <v 1 > to form a second normalized basis vector <v 2 >, and holding this;
Obtaining a second scalar coefficient α 2 as a projection of the first residual vector <d 1 > to the second normalized basis vector <v 2 > and holding it;
The image encoding method according to claim 3, further comprising:
適応的直交変換処理は 第1残差ベクトル〈d〉を第2スカラー係数αと第2正規化基底ベクトル〈v〉とのスカラー積α2〈v2〉により近似した後の第2残差ベクトル〈d〉が所定の許容値を超えると判定した場合に、DCネストを使用して第2残差ベクトル〈d〉との差の大きさを最小とするための第3基底ベクトル〈u〉を探査する処理を含み、該処理は、DCネストから順次抽出した基底候補ベクトルを〈u〉とするときに、
i
(〈d・ui〉−d・v1〉〈v1・ui〉−〈d・v2〉〈v2・ui〉)2
/{‖ui2−〈v1・ui2−〈v2・ui2
を最大とする前記基底候補ベクトル〈u〉を第3基底ベクトル〈u〉として抽出するステップと、
該第3基底ベクトル〈u〉を正規化及び第1正規化基底ベクトル〈v1〉と第2正規化基底ベクトル〈v〉とに直交化して第3正規化基底ベクトル〈v〉となし、これを保持するステップと、
第3スカラー係数αを第2残差ベクトル〈d〉の第3正規化基底ベクトル〈v〉への射影分として求め、これを保存するステップと、
を備えることを特徴とする請求項4に記載の画像符号方法。
The adaptive orthogonal transform processing is performed by approximating the first residual vector <d 1 > by the scalar product α 2 <v 2 > of the second scalar coefficient α 2 and the second normalized basis vector <v 2 >. A third basis for minimizing the magnitude of the difference from the second residual vector <d 2 > using the DC nest when it is determined that the residual vector <d 2 > exceeds a predetermined allowable value Including a process of searching for a vector <u 3 >, and when the base candidate vector sequentially extracted from the DC nest is <u i >,
h i =
(<D · u i > − < d · v 1 ><v 1 · u i > − <d · v 2 ><v 2 · u i >) 2
/ {‖U i2 − <v 1 · u i > 2 − <v 2 · u i > 2 }
Extracting the basis candidate vector <u i > that maximizes as a third basis vector <u 3 >;
The third basis vector <u 3 > is normalized and orthogonalized to a first normalized basis vector <v 1 > and a second normalized basis vector <v 2 > to obtain a third normalized basis vector <v 3 > None, a step to hold this,
Determining a third scalar coefficient α 3 as a projection of the second residual vector <d 2 > to the third normalized basis vector <v 3 > and storing it;
The image encoding method according to claim 4, further comprising:
適応的直交変換処理は 最初の残差ベクトル〈d〉=(d,d…,d)との差の大きさを最小とする基底候補ベクトル〈ui〉=(u,u,…,u)を探査すべく両者の内積〈d・ui〉を求める演算を含み、該演算は、基底候補ベクトル〈ui〉の任意要素(例えば )を残りの要素の一次結合で置き換えると共に、残差ベクトル〈d〉と基底候補ベクトル〈ui〉との内積〈d・ui〉を、
〈d・ui〉=(d1 )u1+(d2 )u2+,
…,+(
但し、(d −d )u の項を除く
の積和演算により求めることを特徴とする請求項3乃至5の何れか一つに記載の画像符号方法。
The first residual vector is adaptively orthogonal transform processing <d> = (d 1, d 2 ..., d n) basis candidate vectors which minimize the magnitude of the difference between <u i> = (u 1 , u 2 ,..., U n ) to find the inner product <d · u i > of the two, and this operation takes an arbitrary element (eg, u q ) of the basis candidate vector <u i > And replacing the inner product <d · u i > between the residual vector <d> and the base candidate vector <u i >
<D · u i > = (d 1 −d q ) u 1 + (d 2 −d q ) u 2 +,
..., + (d n - d q) u n
However, (d q -d q) image encoding method according to any one of claims 3 to 5, wherein the determination by <br/> sum of products, except the term of u q.
m個のスカラー係数αk(k=1〜m)とm個の正規化基底ベクトル〈vk〉(k=1〜m)とからなる正規直交基底系の組をm個のスカラー展開計数βk(k=1〜m)と前記各正規化基底ベクトルの元となったm個の基底候補ベクトル〈uk〉(k=1〜m)とからなる非直交基底系の組に変換するステップと、
該変換したm個のスカラー展開計数βkと、DCネストからm個の基底候補ベクトル〈uk〉を抽出するための抽出情報とからなる組と、DC画像とをそれぞれ符号化して符号データを出力するステップと、
を更に備えることを特徴とする請求項3乃至5の何れか一つに記載の画像符号方法。
A set of orthonormal basis sets consisting of m scalar coefficients α k (k = 1 to m) and m normalized basis vectors <v k > (k = 1 to m) is expressed as m scalar expansion coefficients β. k (k = 1~m) and the step of converting the to the set of original and became the m base candidate vectors <u k> (k = 1~m ) consisting a non-orthogonal basis set of the normalized basis vectors When,
The encoded data is obtained by encoding the set of the m scalar expansion counts β k thus converted and the extraction information for extracting m basis candidate vectors <u k > from the DC nest and the DC image. Output step;
The image encoding method according to claim 3, further comprising:
m個のスカラー展開係数β1〜βのノルムをその大きさ順に並べ替え、0を含む隣接ノルム間の各差分を求め、得られた各差分につき所定ビット数の下位ビットを除く残りの上位ビットにハフマン符号化を適用することを特徴とする請求項7に記載の画像符号方法。Sort the norm of the m scalar development coefficients β 1m to the order of magnitude, the remaining upper excluding the low-order bits of each difference of the calculated, predetermined number of bits for each obtained difference between adjacent norm containing 0 8. The image coding method according to claim 7 , wherein Huffman coding is applied to the bits . 適応的直交変換処理で求めた基底ベクトルの数が所定以上の場合は、基底系の符号化に代えて、符号対象ブロックの画像データそのものを符号化することを特徴とする請求項1,2又は5に記載の画像符号方法。  The image data itself of the encoding target block is encoded instead of the encoding of the basis system when the number of basis vectors obtained by the adaptive orthogonal transform processing is equal to or greater than a predetermined number. 6. The image encoding method according to 5. 請求項7に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生し、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストとするステップと、
前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号するステップと、
ターゲットブロックに対するm個のスカラー展開計数と、m個の抽出情報によりDCネストから抽出した各基底候補ブロックとのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生するステップと、
を備えることを特徴とする画像復号方法。
A DC image corresponding to each block average value for each B pixel is reproduced from the code data according to claim 7, and the lower n (n = log 2 B) bits of each DC pixel from which a part of the DC image is extracted Zeroing to DC nest,
Decoding a set of m scalar expansion counts and m pieces of extracted information from the code data;
Generate a scalar product β k <U k > (k = 1 to m) of m scalar expansion counts for the target block and each base candidate block extracted from the DC nest using m pieces of extraction information, and block these Accumulating each time, separating the block average value from the addition result to generate a residual vector <d j >, combining this with the DC value of the target block, and reproducing the image data;
An image decoding method comprising:
請求項7に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生し、その一部をDCネストとするステップと、
前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号するステップと、
ターゲットブロックに対するm個のスカラー展開計数βk(k=1〜m)と、m個の抽出情報によりDCネストから抽出した各基底候補ブロック〈Uk〉(k=1〜m)につき各DC画素の下位n(n=log2B)ビットを0にしたもの、とのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生するステップと、
を備えることを特徴とする画像復号方法。
Regenerating a DC image corresponding to each block average value for each B pixel from the code data according to claim 7, and making a part thereof a DC nest;
Decoding a set of m scalar expansion counts and m pieces of extracted information from the code data;
Each DC pixel for each base candidate block <U k > (k = 1 to m) extracted from the DC nest by m pieces of scalar expansion counts β k (k = 1 to m) for the target block and m pieces of extraction information. A scalar product β k <U k > (k = 1 to m) of the lower n (n = log 2 B) bits of 0 is generated, and these are cumulatively added for each block. Separating the block average value from the result to generate a residual vector <d j > and combining it with the DC value of the target block to reproduce the image data;
An image decoding method comprising:
画像データをB画素毎にブロック分割して各ブロック平均値からなるDC画像を生成すると共に、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストを生成し、メモリに記憶するDCネスト生成手段と、
符号対象の画素ブロックからそのブロック平均値を分離した後の残差ベクトルの大きさが所定の許容値を超えると判定した場合に、前記DCネストより順次基底候補ブロックを抽出し、該ブロックからブロック平均値を分離して基底候補ベクトルを生成し、該基底候補ベクトルを使用した適応的直交変換処理により前記残差ベクトルを許容値以下に近似するための1又は2以上の基底ベクトルを求める演算手段と、
を備えることを特徴とする画像符号装置。
The image data is divided into blocks for each B pixel to generate a DC image consisting of each block average value, and the lower n (n = log 2 B) bits of each DC pixel from which a part of the DC image is extracted is set to 0. DC nest generating means for generating a DC nest and storing it in a memory;
If the magnitude of the residual vector after separating the block mean value from the code target pixel block is determined to exceed a predetermined allowable value, then extracted sequentially base candidate block from the DC nest, the block from the block Arithmetic means for generating one or more base vectors for generating a base candidate vector by separating an average value and approximating the residual vector to an allowable value or less by an adaptive orthogonal transform process using the base candidate vector When,
An image encoding device comprising:
請求項7に記載の符号データからB画素毎の各ブロック平均値に相当するDC画像を再生すると共に、該DC画像の一部を抽出した各DC画素の下位n(n=log2B)ビットを0にしてDCネストを再生し、メモリに記憶するDCネスト再生手段と、
前記符号データからm個のスカラー展開計数と、m個の抽出情報とからなる組を復号する復号手段と、
ターゲットブロックに対するm個のスカラー展開計数と、m個の抽出情報によりDCネストから抽出した各基底候補ブロックとのスカラー積βk〈Uk〉(k=1〜m)を生成してこれらをブロック毎に累積加算すると共に、該加算結果からそのブロック平均値を分離して残差ベクトル〈d〉を生成し、これをターゲットブロックのDC値に合成して画像データを再生する画像再生手段と、
を備えることを特徴とする画像復号装置。
The DC image corresponding to each block average value for each B pixel is reproduced from the code data according to claim 7, and the lower n (n = log 2 B) bits of each DC pixel from which a part of the DC image is extracted DC nest reproducing means for reproducing DC nest with 0 and storing it in memory;
Decoding means for decoding a set of m scalar expansion counts and m pieces of extracted information from the code data;
Generate a scalar product β k <U k > (k = 1 to m) of m scalar expansion counts for the target block and each base candidate block extracted from the DC nest using m pieces of extraction information, and block these Image reproducing means for accumulating each time and generating a residual vector <d j > by separating the block average value from the addition result and combining it with the DC value of the target block to reproduce the image data; ,
An image decoding apparatus comprising:
請求項1乃至11の何れか一つに記載の処理をコンピュータに実行させるためのプログラムを記録したコンピュータ読取り可能な記録媒体。  A computer-readable recording medium having recorded thereon a program for causing a computer to execute the processing according to claim 1.
JP2000141675A 2000-05-15 2000-05-15 Image encoding / decoding method and apparatus, and recording medium recording the program Expired - Fee Related JP3932244B2 (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP2000141675A JP3932244B2 (en) 2000-05-15 2000-05-15 Image encoding / decoding method and apparatus, and recording medium recording the program
CA 2328037 CA2328037A1 (en) 2000-05-15 2000-12-08 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded
US09/731,484 US6714687B2 (en) 2000-05-15 2000-12-08 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded
KR1020000076886A KR100741553B1 (en) 2000-05-15 2000-12-15 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded
TW89127438A TW503666B (en) 2000-05-15 2000-12-20 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded
MXPA01001104 MXPA01001104A (en) 2000-05-15 2001-01-30 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded.
EP20010301069 EP1156679A3 (en) 2000-05-15 2001-02-07 Image encoding and decoding method and apparatus, and recording medium in which program therefor is recorded
CN01104592A CN1324060A (en) 2000-05-15 2001-02-17 Image coding/decoding method and its device, and recording medium for recording programme
US10/760,291 US7231089B2 (en) 2000-05-15 2004-01-21 Image encoding/decoding method, apparatus thereof and recording medium in which program therefor is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000141675A JP3932244B2 (en) 2000-05-15 2000-05-15 Image encoding / decoding method and apparatus, and recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2001326935A JP2001326935A (en) 2001-11-22
JP3932244B2 true JP3932244B2 (en) 2007-06-20

Family

ID=18648758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000141675A Expired - Fee Related JP3932244B2 (en) 2000-05-15 2000-05-15 Image encoding / decoding method and apparatus, and recording medium recording the program

Country Status (8)

Country Link
US (2) US6714687B2 (en)
EP (1) EP1156679A3 (en)
JP (1) JP3932244B2 (en)
KR (1) KR100741553B1 (en)
CN (1) CN1324060A (en)
CA (1) CA2328037A1 (en)
MX (1) MXPA01001104A (en)
TW (1) TW503666B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7310598B1 (en) * 2002-04-12 2007-12-18 University Of Central Florida Research Foundation, Inc. Energy based split vector quantizer employing signal representation in multiple transform domains
US7343039B2 (en) * 2003-06-13 2008-03-11 Microsoft Corporation System and process for generating representations of objects using a directional histogram model and matrix descriptor
KR100612669B1 (en) 2003-10-29 2006-08-14 에스케이 텔레콤주식회사 Method for Displaying High-Resolution JPEG Pictures in Mobile Communication Terminal and Mobile Communication Terminal therefor
JP3833224B2 (en) * 2004-01-30 2006-10-11 キヤノン株式会社 Encoding method and apparatus, computer program, and computer-readable storage medium
US8014558B2 (en) * 2004-10-18 2011-09-06 Thomson Licensing Methods, apparatus and system for film grain simulation
US7864864B2 (en) * 2005-06-27 2011-01-04 Intel Corporation Context buffer address determination using a plurality of modular indexes
US8968080B1 (en) 2010-11-05 2015-03-03 Wms Gaming, Inc. Display of third party content on a wagering game machine
US8515179B1 (en) * 2012-02-10 2013-08-20 Raytheon Company System and method for hyperspectral image compression
EP3657793A4 (en) * 2017-12-06 2021-03-17 Fujitsu Limited Mode information encoding and decoding method, device, and electronic apparatus

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06253281A (en) * 1993-02-24 1994-09-09 Nippon Telegr & Teleph Corp <Ntt> Picture signal orthogonal transformation method
JPH0738760A (en) * 1993-06-28 1995-02-07 Nec Corp Orthogonal transformation base generating system
KR0139164B1 (en) * 1994-12-19 1998-06-01 김광호 Adapted orthogonal transform coding apparatus
US5937098A (en) * 1995-02-06 1999-08-10 Asahi Kogaku Kogyo Kabushiki Kaisha Adaptive quantization of orthogonal transform coefficients for setting a target amount of compression
KR0174453B1 (en) * 1995-02-28 1999-03-20 배순훈 Method for decoding digital image
KR0174452B1 (en) * 1995-02-28 1999-03-20 배순훈 Digital image decoder
JP3170193B2 (en) * 1995-03-16 2001-05-28 松下電器産業株式会社 Image signal encoding apparatus and decoding apparatus
JPH0951504A (en) * 1995-08-03 1997-02-18 Matsushita Electric Ind Co Ltd Image encoding device and image decoding device
JP3355964B2 (en) * 1996-10-29 2002-12-09 ケイディーディーアイ株式会社 Adaptive orthogonal transform mode determination method
JPH11196262A (en) * 1997-11-07 1999-07-21 Matsushita Electric Ind Co Ltd Digital information imbedding extracting device/method, and medium recording program to execute the method
CN1168322C (en) 1998-07-03 2004-09-22 株式会社哈德森 Image coding/decoding method and recorded medium on which program is recorded

Also Published As

Publication number Publication date
MXPA01001104A (en) 2004-08-12
US20040151389A1 (en) 2004-08-05
CN1324060A (en) 2001-11-28
US6714687B2 (en) 2004-03-30
KR100741553B1 (en) 2007-07-20
EP1156679A2 (en) 2001-11-21
EP1156679A3 (en) 2003-10-08
JP2001326935A (en) 2001-11-22
KR20010104610A (en) 2001-11-26
US7231089B2 (en) 2007-06-12
US20010051005A1 (en) 2001-12-13
CA2328037A1 (en) 2001-11-15
TW503666B (en) 2002-09-21

Similar Documents

Publication Publication Date Title
JP4966669B2 (en) Data compression using matching tracking
JP3681386B2 (en) Pre- and post-processing for improved vector quantization
JP5258664B2 (en) Image coding apparatus, method and program, and image decoding apparatus, method and program
KR100574702B1 (en) Image coding/decoding method and recorded medium on which program is recorded
JP3932244B2 (en) Image encoding / decoding method and apparatus, and recording medium recording the program
KR100378339B1 (en) Method and apparatus for coding moving image and medium for recording program of coding moving image
EP0457362B1 (en) Vector quantizer
JP5453399B2 (en) Method and apparatus for encoding and decoding data with unique numerical values
JP4232496B2 (en) Image processing method, image processing apparatus, and image processing program
JP3953411B2 (en) Coordinate interpolator key value data encoding / decoding method and apparatus
JPH0621828A (en) Vector quantizing decoder
JP2003284073A (en) Method and apparatus for coding and decoding image, its program, and recording medium
JPH07123276A (en) Digital compression coding method for picture signal
JP2002232293A (en) Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method
JP3977753B2 (en) Information source encoding method, information source encoding device, information source encoding program, and recording medium on which information source encoding program is recorded
JP2633683B2 (en) Vector quantizer
JP3857820B2 (en) Image compression apparatus and image expansion apparatus
WO1999055093A1 (en) Data compressing device and method, data expanding device and method, data compressing/expanding system and method, code book making method, and vector quantizing device and method
JPH11272843A (en) Device and method for encoding color image, and device and method for decoding color image
JP2002271635A (en) Image coding method and program therefor
JP2005012823A (en) Data compressing device and method, data expanding device and method, data compressing/expanding system and method, code book making method, and recording medium
JPH01277300A (en) Learning type vector quantizer
WO1998059495A1 (en) Device and method for iterative conversion encoding of images, device and method for iterative conversion decoding of images, and providing medium
JPH1118088A (en) Image repetitive conversion coder, its method and decoder
JPH11122614A (en) Repetitive conversion coder and its method, decoder and its method for image and recording medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050323

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061227

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: 20070306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070312

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees