JP3990949B2 - Image coding apparatus and image coding method - Google Patents

Image coding apparatus and image coding method Download PDF

Info

Publication number
JP3990949B2
JP3990949B2 JP2002193296A JP2002193296A JP3990949B2 JP 3990949 B2 JP3990949 B2 JP 3990949B2 JP 2002193296 A JP2002193296 A JP 2002193296A JP 2002193296 A JP2002193296 A JP 2002193296A JP 3990949 B2 JP3990949 B2 JP 3990949B2
Authority
JP
Japan
Prior art keywords
context
bit plane
encoding
value data
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002193296A
Other languages
Japanese (ja)
Other versions
JP2004040372A (en
Inventor
浩 梶原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002193296A priority Critical patent/JP3990949B2/en
Publication of JP2004040372A publication Critical patent/JP2004040372A/en
Application granted granted Critical
Publication of JP3990949B2 publication Critical patent/JP3990949B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像データを好適に符号化する画像符号化装置及び画像符号化方法に関する。
【0002】
【従来の技術】
画像符号化の一手法として、ウェーブレット変換とビットプレーン符号化とを組み合わせた方法が知られている。この方式による画像符号化は、ウェーブレット変換におけるサブバンド分解の仕組みを利用して空間解像度を段階的に変えた復号が可能であること、また、復号ビットプレーン数を変えることにより復号画素精度を段階的に変更できること等から注目を集めている。
【0003】
ISO/IEC JTC1/SC29/WG1で標準化作業が進められている静止画像符号化方式JPEG2000(ISO/IEC 15444-1)もウェーブレット変換とビットプレーン符号化との組み合わせによって構成されている。図14は、ウェーブレット変換とビットプレーン符号化とを組み合わせた符号化方式を使用した従来の画像符号化装置の構成を示すブロック図である。図14を用いて、従来の画像符号化処理の流れについて簡単に述べる。
【0004】
図14に示される従来の画像符号化装置は、画像入力部201、離散ウェーブレット変換部202、係数量子化部203、ビットプレーン符号化部204、符号列形成部205及び符号出力部206から構成される。
【0005】
まず、符号化対象となる画像データが画像入力部201より入力される。画像入力部201より入力された符号化対象画像は、離散ウェーブレット変換部202で複数の周波数帯域(サブバンド)に分割される。図15は、ウェーブレット変換によって符号化対象画像が複数のサブバンドへ分割される様子を説明するための図である。図15(a)、(b)、(c)にその分割過程を示すように、画像のウェーブレット変換では、まず、1次元のウェーブレット変換処理を水平及び垂直方向にそれぞれに適用して4つのサブバンドに分割する方法が用いられる。さらに、低周波サブバンド(サブバンドLL)のみを繰り返して水平・垂直方向に分割する方法が一般的である。図16は、2次元のウェーブレット変換処理を2回繰り返して画像のサブバンド分割を行った場合のサブバンドの例を示す図である。
【0006】
そして、係数量子化部203では、各サブバンドの係数をサブバンド毎に定めた量子化ステップで量子化する。さらに、ビットプレーン符号化部204では、量子化された各サブバンドの変換係数を矩形の小領域(以下、「コードブロック」と称す。)に分割し、コードブロック毎に変換係数の上位ビットから下位ビットへとビットプレーン方向を優先して符号化を行う。尚、ビットプレーン中の各ビットを符号化する際には、符号化済みの情報からいくつかの状態(コンテクスト)に分類し、それぞれ異なる出現確率予測モデルで符号化する。
【0007】
また、符号列形成部205では、ビットプレーン符号化部204で生成されたコードブロック符号化データを所定の順序で並べて符号列を生成する。生成された符号列は、符号出力部206から画像符号化装置外部へと出力される。
【0008】
離散ウェーブレット変換部202でウェーブレット変換を施して図16に示すようなサブバンドに分割し、低周波サブバンドLLから高周波サブバンドHH1へと順々に各サブバンドの係数を符号化・伝送した場合、復号側ではサブバンドLLの係数を受信した段階で、1/4の解像度の復元画像を復号することができる。また、サブバンドLL、LH1、HL1、HH1を受信した段階で、1/2の解像度の復元画像を、さらにサブバンドLH2、HL2、HH2までを受信した場合には元の解像度の復元画像をといった具合に、徐々に解像度を上げて画像を復号することができる。
【0009】
また、ビットプレーン符号化部204で得られる各コードブロックのビットプレーン符号化データを上位のビットから下位のビットへと伝送した場合も、復号側では徐々に精度を上げて各サブバンドの変換係数を復元することができる。これによって、伝送の初期状態では粗い画質の画像を復号することが可能であり、伝送が進むにつれて画質を改善した画像を復号することが可能である。
【0010】
【発明が解決しようとする課題】
しかしながら、ビットプレーン符号化において各ビットの符号化の度にコンテクストの生成処理を行うことは効率的な処理とはいえない。例えば、N個の多値信号をM枚のビットプレーンに分解して符号化する場合を考える。この場合、N×M個の二値情報源シンボルの符号化を行うことになる。従って、このN×M個の二値シンボルのそれぞれに対してコンテクストを生成し、確率推定の上で二値符号化処理を行う場合、処理負荷が高く、符号化処理及び復号処理にかかる時間が長くなるといった問題が発生する。
【0011】
また、コンテクストの生成手段として、符号化済みのビット、あるいは、符号化済みのビットから定まる事象を元にテーブルを参照してコンテクストを決定する場合も多い。このような場合においては、参照するビット、あるいは事象が多くなればなるほど、テーブルのエントリ数も増えて、これを格納するためのメモリ領域を多く要するという問題が発生する。
【0012】
本発明は、このような事情を考慮してなされたものであり、コンテクスト生成の負荷を軽減することにより多値信号のビットプレーン符号化処理の高効率化を図ることができるとともに、コンテクスト生成におけるメモリ容量を削減することができる画像符号化装置及び画像符号化方法を提供することを目的とする。
【0013】
上述課題を解決するため、本発明は、複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化装置であって、複数の位置(x、y)に対応する多値データM(x、y)ビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査手段と、前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)を格納するコンテクスト格納手段と、前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化手段と、前記符号化手段において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新手段と、を備えたことを特徴とする。
【0014】
上述課題を解決するため、本発明は、複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化方法であって、複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新工程と、を含むことを特徴とする画像符号化方法。
【0015】
上述課題を解決するため、本発明は、複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化プログラムであって、複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新工程と、をコンピュータに実行させることを特徴とする。
【0016】
上述課題を解決するため、本発明は、複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化プログラムを格納した記憶媒体であって、複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新工程と、をコンピュータに実行させる画像符号化プログラムを格納したことを特徴とする。
【0017】
【発明の実施の形態】
以下、図面を参照して、本発明の一実施形態による画像符号化装置及び画像符号化方法について説明する。
【0018】
<第1の実施形態>
図1は、本発明に係る第1の実施形態による画像符号化装置の構成を示すブロック図である。図1に示す画像符号化装置は、多値信号入力部101、符号・絶対値変換部102、多値信号格納部103、ビットプレーン走査部104、コンテクスト格納部105、二値算術符号化部106、コンテクスト更新部107、符号出力部108及び有効ビット数判定部109から構成される。
【0019】
図2は、本発明に係る第1の実施形態による画像符号化装置の動作手順を説明するためのフローチャートである。以下、図1及び図2を参照して、本実施形態における画像符号化装置の各部の動作について詳細に説明する。尚、本実施形態の画像符号化装置は、水平方向サンプル数H、垂直方向サンプル数Vの矩形をなすH×V個の多値信号を符号化対象とする。多値信号は、それぞれ所定のビット幅b(例えば、16ビット)で2の補数表現された符号付きの整数であるとする。また、本実施形態の画像符号化装置は、符号化対象の多値信号の絶対値をビットプレーンに分解し、上位のビットプレーンから下位のビットプレーンへと順々に符号化するものとする。
【0020】
多値信号格納部103は、このH×V個の多値信号を格納する領域を有し、コンテクスト格納部105は(H+2)×(V+2)個のコンテクストを格納する領域を有する。そして、符号化処理に先立って、コンテクスト格納部105の格納領域は全て0に初期化しておく。
【0021】
まず、本実施形態の画像符号化装置の符号化対象となる多値信号が矩形内のラスタースキャン順に多値信号入力部101から入力される(ステップS1)。図3は、入力される符号化対象の多値信号を説明するための図である。図3に示すように、以下、矩形内の水平方向サンプル位置をx、垂直方向サンプル位置をy、位置(x,y)の多値信号をB(x,y)と表す。
【0022】
符号・絶対値変換部102は、多値信号入力部101から入力された2の補数表現された多値信号B(x,y)を符号・絶対値表現に変換し、多値信号格納部103に格納する(ステップS2)。多値信号B(x,y)の符号・絶対値表現をM(x,y)とし、どちらも16ビット幅で表現すると、
B(x,y)≧0の場合
M(x,y)=B(x,y)
B(x,y)<0の場合
M(x,y)=(−B(x,y))| 0x8000
のように変換させる。
【0023】
有効ビット数判定部109は、まず、多値信号格納部103に格納された全ての多値信号M(x,y)について論理和Nを求める。次に、論理和Nの絶対値Nabsを求める。さらに、次式を用いてM(x,y)の絶対値を2進数で表現するために最小限必要となる桁数NBPを求める。
【0024】
NBP=ceil{log2(Nabs+1)}
ここで、ceil{R}は、実数Rに等しいか、あるいはそれ以上の最小の整数値を表すものとする。論理和Nを求める方法としては、全ての多値信号M(x,y)が多値信号格納部103に格納された後、多値信号格納部103に格納された全多値信号を走査して論理和を求めてもよいし、変数Nを0に初期化しておき、変数Nと符号・絶対値変換部102の出力するM(x,y)との論理和を求める処理を繰り返し行ってもよい。
【0025】
ビットプレーン走査部104は、多値信号格納部103に格納された多値信号の絶対値部をNBP枚のビットプレーンに分割して、最上位ビットプレーン(NBP−1ビットプレーン)から下位ビットプレーン(0ビットプレーン)の順に、また、同一ビットプレーン内においては、ラスタースキャン順に、二値シンボルを取り出して出力する(ステップS3)。以下、多値信号M(x,y)を構成するビットのn桁目(最下位ビットを0桁目とする)をMn(x,y)として表す。
【0026】
ここで、ビットプレーン走査部104は、個々の多値信号について最初に符号化される「1」の直後に、その多値信号の正負符号を0、1で表し、出力する。多値信号M(x,y)の正負符号をS(x,y)とし、正であれば0、負であれば1とする。例えば、M(x,y)=−5、有効ビット数判定部109により求められる有効桁数NBP=6とした場合、M(x,y)の絶対値は2進数000101で表され、各ビットプレーンの符号化により上位桁から下位桁へと順に出力される。2ビットプレーンの処理時(この場合、上から4桁目)に最初の「1」が出力され、この直後に正負符号「1」が出力される。
【0027】
ビットプレーン走査部104が出力する二値シンボルは、二値算術符号化部106で算術符号化される(ステップS4)。着目する二値シンボルMn(x,y)の算術符号化では、Mn(x,y)の属する多値信号M(x,y)の周囲8近傍の多値信号を参照して状態(コンテクスト)を判別し、コンテクスト毎に異なる確率推定モデルにより着目ビットを符号化する。図4は、M(x,y)とその周囲8近傍の多値信号M(x−1,y−1)、M(x,y−1)、M(x+1,y−1)、M(x−1,y)、M(x+1,y)、M(x−1,y+1)、M(x,y+1)、M(x+1,y+1)の位置関係を説明するための図である。
【0028】
ここで、本実施形態の画像符号化装置におけるコンテクストの決定方法について述べる。本実施形態では、符号化対象の信号M(x,y)と周囲8近傍の信号の「有意」、「非有意」に基づいて、12種類(サインビット用のコンテクストを除く)のコンテクストに分別して符号化する。
【0029】
図5は、本実施形態における「有意」及び「非有意」の状態の例を説明するための図である。ある多値信号M(x,y)がMn(x,y)まで符号化済みの時点で「有意」であるとは、図5(a)に例示するように、符号化済みのビット、すなわちMn(x,y)及びその上位ビットに少なくとも1つの「1」が含まれる状態をいう。また、ある多値信号M(x,y)が非有意であるとは、図5(b)に例示するように、符号化済みのビットが全て「0」である状態をいう。
【0030】
従って、「有意」又は「非有意」の状態は、上位ビットから下位ビットへと順々に符号化していくにつれて変化し、例えば、図5(b)の場合では、Mn−1(x,y)まで符号化済みの状態では非有意な状態にあり、Mn−2(x,y)まで符号化すると非有意状態から有意状態へと変化するようになる。尚、図5(b)のMn−2(x,y)のように、そのビットの符号化により有意から非有意へと状態を遷移するビットを「状態遷移ビット」と呼ぶ。また、状態遷移ビットよりも下位ビット、例えば、図5(b)のMn−3(x,y)からM0(x,y)を「更新ビット」と呼ぶ。
【0031】
図6は、本実施形態で用いられる12種類のコンテクストを示す図である。図6において、「ΣH」は、着目する多値信号の左右の信号、すなわち、M(x−1,y)とM(x+1,y)のうちの有意状態にある信号の個数を表す。尚、ΣHは、0、1、2のいずれかの値をとる。すなわち、M(x−1,y)とM(x+1,y)が共に非有意であれば0、いずれか一方のみが有意であれば1、共に有意であれば2となる。
【0032】
同様に、「ΣV」は、着目する多値信号の上下の信号、すなわち、M(x,y−1)とM(x,y+1)のうちの有意状態にある信号の個数を表す。また、「ΣD」は、斜め方向の近傍多値信号、すなわち、M(x−1,y−1)、M(x+1,y−1)、M(x−1,y+1)、M(x+1,y+1)のうちの有意状態にある信号の個数を表す。図6において、斜線部分は参照しない部分を表し、例えば、着目する多値信号が非有意な状態にあって、かつ、ΣH=2である場合には、ΣV、ΣDにかかわらず、コンテクスト8に分別される。
【0033】
コンテクスト格納部105には、多値信号M(x,y)の各ビットMn(x,y)(0≦n<NBP)を二値算術符号化する際に使用するコンテクストC(x,y)が格納される。コンテクスト格納部105には矩形の境界部分での例外処理を避けるため、−1≦x≦H、−1≦y≦VのC(x,y)を格納することができるように、周囲に1サンプルずつの余裕を設けておく。そして、コンテクスト格納部105からは、ビットプレーン走査部104からの二値シンボルMn(x,y)の出力に対応してC(x,y)が出力される。尚、コンテクスト格納部105に格納されるC(x,y)は、符号化開始時の初期状態では全て0に設定しておく。
【0034】
二値算術符号化部106は、ビットプレーン走査部104の出力する二値シンボルMn(x,y)及びS(x,y)をコンテクスト格納部105から読み出されるコンテクストC(x,y)を用いて二値算術符号化し、符号出力部108に生成した符号を順次出力する。本実施形態においては、算術符号としてMQ-Coderを用いることとする。このMQ-Coderを用いて、あるコンテクストで発生した2値シンボルを符号化する手順、或いは、算術符号化処理のための初期化手順、終端手順については、静止画像の国際標準ITU-T Recommendation T.88 | ISO/IEC14492勧告等に詳細に説明されているのでここでは説明を省略する。
【0035】
尚、本実施形態では、符号化の開始時に算術符号化器を初期化し、終了時に算術符号化器の終端処理を行うようにする。また、正負符号S(x,y)の符号化にはコンテクスト格納部105からのコンテクスト読み出しは行わず、Mn(x,y)の符号化に用いるコンテクストとは異なる正負符号の符号化専用の単一コンテクストによって算術符号化を行う。本実施形態による画像符号化装置では、絶対値の各ビットの符号化にコンテクスト0〜11を使用しているので、正負符号の符号化専用のコンテクストには、例えば、コンテクスト12等を用いればよい。
【0036】
コンテクスト更新部107は、多値信号M(x,y)の遷移ビット(最初の「1」)が符号化された場合に、M(x,y)の周囲の8つのコンテクストC(x−1,y−1)、C(x,y−1)、C(x+1,y−1)、C(x−1,y)、C(x+1,y)、C(x−1,y+1)、C(x,y+1)、C(x+1,y+1)及びM(x,y)のコンテクストC(x,y)の更新処理を行う(ステップS5)。
【0037】
図7は、コンテクスト更新部107の内部に保持されている状態遷移表を示す図である。コンテクスト更新部107は、図7に示される状態遷移表を参照して、周辺のコンテクストを更新する。図7に示される状態遷移表は、ある着目するコンテクストC(x,y)について、その水平方向の近傍、垂直方向の近傍、斜め方向の近傍で非有意から有意への状態遷移が起こった場合に、それぞれの更新後のコンテクストを格納している。
【0038】
図7において、水平方向の近傍での状態遷移の場合には「H」の列を参照する。また、垂直方向の近傍での状態遷移の場合には「V」の列を参照する。さらに、斜め方向の近傍での状態遷移の場合は「D」の列を参照する。例えば、着目する多値信号M(x,y)の現在のコンテクストC(x,y)が5であり、直前の信号M(x−1,y)において遷移ビットの符号化が行われた場合には、コンテクスト5に対応する行のHの列を参照し、更新後のコンテクスト8を得る。また、着目する多値信号自身が非有意から有意に切り替わった場合には図7のMの列を参照し、更新後のコンテクストを得る。
【0039】
現在のコンテクストをc、非有意から有意へと状態が変化した信号の位置(縦(V)、横(H)、斜め(D)、または着目信号自身(M)のいずれか)をdとして、図7から得られる更新後のコンテクストをST(c,d)と表すと、M(x,y)の周囲8つのコンテクスト及びM(x,y)のコンテクストの更新は、以下のように表現することができる。
【0040】
C(x−1,y−1)=ST(C(x−1,y−1),D)
C(x+1,y−1)=ST(C(x+1,y−1),D)
C(x−1,y+1)=ST(C(x−1,y+1),D)
C(x+1,y+1)=ST(C(x+1,y+1),D)
C(x−1,y) =ST(C(x−1,y) ,H)
C(x+1,y) =ST(C(x+1,y) ,H)
C(x ,y−1)=ST(C(x ,y−1),V)
C(x ,y+1)=ST(C(x ,y+1),V)
C(x ,y) =ST(C(x ,y) ,M)
コンテクスト更新部107では、上述の更新処理に加えて、多値信号M(x,y)の最初の更新ビットが符号化された場合に、M(x,y)のコンテクストC(x,y)を11に更新する処理を行う。図7において、現在のコンテクスト9及び10に対応する行で、Mの列に括弧付きで更新後のコンテクスト番号を示している部分がこの処理に相当する。
【0041】
ビットプレーン符号化部104の出力する全ての二値シンボルMn(x,y)について上述した処理を行うことにより(ステップS6でYesの場合)、多値信号のビットプレーン符号化が行われ、符号出力部108に算術符号化データが渡される。一方、すべての二値シンボルの符号化がまだの場合(ステップS6でNoの場合)、ステップS3の二値シンボルの取り出しから上述の処理が行われる。
【0042】
符号出力部108は、二値算術符号化部106で生成された符号列を装置外部へと出力する(ステップS7)。この符号出力部108は、例えば、ハードディスクやメモリといった記憶装置やネットワーク回線のインタフェース等で実現される。
【0043】
すなわち、本発明は、画像データから生成された二値シンボルを、それぞれの二値シンボルの状態を示すコンテクストを用いて符号化する画像符号化に関し、多値信号入力部101から入力された画像データ内の所定領域の多値信号を符号・絶対値変換部102で二値シンボルに変換する。次に、変換された二値シンボルに係るコンテクストをコンテクスト格納部105から読み出す。そして、読み出されたコンテクストを用いて、二値算術符号化部106は二値シンボルを符号化する。符号化された二値シンボルを用いて、コンテクスト格納部105に格納されたコンテクスト情報がコンテクスト更新部107で更新される。
【0044】
さらにまた、本発明は、二値シンボルに隣接する二値シンボルであって、符号化済みのビットに少なくとも1つの1が含まれる状態にある二値シンボル数の和を左右、上下又は斜め方向ごとに算出し、算出された方向ごとの二値シンボル数の和に基づいて二値シンボルに係るコンテクストが決定される。
【0045】
以上述べたように、多値信号のそれぞれに対応付けられるコンテクストを格納する領域と、更新後のコンテクストを得るための状態遷移表を備え、コンテクストが変更されるような事象の発生した時に随時更新することにより、コンテクスト生成のためのメモリ容量を低減することができるとともに、コンテクスト生成処理の負荷軽減による高速化を期待することができる。
【0046】
<第2の実施形態>
図8は、本発明の第2の実施形態に係る画像符号化装置の構成を示すブロック図である。第1の実施形態で用いた図1に示されるブロック図と共通する部分については同じ符号で示し、それらの説明は省略する。尚、図8において、符号901はコンテクスト更新部、902はコンテクスト更新部、903はセレクタ及び904は信号線を示す。
【0047】
本実施形態による画像符号化装置は、図15に示すようなウェーブレット変換とビットプレーン符号化の組み合わせにより構成される従来の画像符号化システムにおいて、ウェーブレット変換係数、あるいはその量子化値をビットプレーン符号化するビットプレーン符号化部として使用することを想定したものである。そして、第1の実施形態による画像符号化装置において符号化対象の係数の属するサブバンドごとにコンテクストの更新方法を変更するように拡張したものである。
【0048】
本実施形態で多値信号入力部101からは、ウェーブレット変換により生成されたあるサブバンドを矩形に分割した領域(コードブロック)に含まれる変換係数、あるいはその量子化値が入力される。
【0049】
また、信号線904からは、符号化対象であるコードブロックがどのサブバンドに属するかを表す4値(0〜3)のサブバンド識別信号が入力される。サブバンド識別信号0、1、2、3は、それぞれLLサブバンド、LHサブバンド、HLサブバンド、HHサブバンドを表すものとする。
【0050】
第1の実施形態と動作が異なる部分は、コンテクストの更新部分のみであるので、以下ではこの部分の動作について説明する。
【0051】
セレクタ903は、信号線904から入力されるサブバンド識別信号に応じてコンテクスト更新部107、コンテクスト更新部901及びコンテクスト更新部902を切り替えて、コンテクスト格納部105に格納されるコンテクストの更新を行う。サブバンド識別信号が0又は1の場合、すなわち、符号化対象のコードブロックがLLサブバンド又はLHサブバンドに属する場合には、第1の実施形態と同じコンテクスト更新部107を選択する。また、サブバンド識別信号が2である場合にはコンテクスト更新部901を選択し、サブバンド識別信号が3である場合にはコンテクスト更新部902を選択する。
【0052】
一方、符号化対象のコードブロックがHLサブバンドに属する場合には、図9に示すコンテクストを使用する。図9は、本実施形態でHLサブバンドの係数に適用するコンテクストを決定するための図である。すなわち、図9は、第1の実施形態で使用され、かつ、第2の実施形態においてもLLサブバンド及びLHサブバンドのコードブロック符号化時に使用される図5のコンテクストのHとVの意味付けが入れ替わったものである。
【0053】
コンテクスト更新部901では、図9に対応するコンテクストを得るための状態遷移表として図10の表を格納しておく。図10は、コンテクスト更新部901で使用される状態遷移表を示す図である。図10の状態遷移表に基づいて、コンテクスト更新部107と同様にして、多値信号M(x,y)の遷移ビット(最初の「1」)が符号化された場合に、M(x,y)の周囲の8つのコンテクストC(x−1,y−1)、C(x,y−1)、C(x+1,y−1)、C(x−1,y)、C(x+1,y)、C(x−1,y+1)、C(x,y+1)、C(x+1,y+1)及びM(x,y)のコンテクストC(x,y)の更新処理を行い、多値信号M(x,y)の最初の更新ビットが符号化された場合にM(x,y)のコンテクストC(x,y)を11に更新する。
【0054】
符号化対象のコードブロックがHHサブバンドに属する場合には、図11に示すコンテクストを使用する。図11は、HHサブバンドの係数に適用するコンテクストを決定するための図である。コンテクスト更新部902では、図11に対応するコンテクストを得るための状態遷移表として図12に示される表を格納しておく。
【0055】
図12は、コンテクスト更新部902で使用する状態遷移表を示す図である。図12に示すように、コンテクスト更新部107と同様にして、多値信号M(x,y)の遷移ビット(最初の「1」)が符号化された場合に、M(x,y)の周囲の8つのコンテクストC(x−1,y−1)、C(x,y−1)、C(x+1,y−1)、C(x−1,y)、C(x+1,y)、C(x−1,y+1)、C(x,y+1)、C(x+1,y+1)及びM(x,y)のコンテクストC(x,y)の更新処理を行い、多値信号M(x,y)の最初の更新ビットビットが符号化された場合にM(x,y)のコンテクストC(x,y)を11に更新する。
【0056】
尚、図12において、水平方向の近傍係数で非有意から有意へと状態遷移した場合に参照されるHの列と、垂直方向の近傍係数で状態遷移した場合に参照されるVの列は同一であるので、コンテクスト更新部107にはどちらか一方を格納しておき、水平方向、垂直方向を区別しないで使用してもよい。
【0057】
すなわち、本発明に係る画像符号化装置は、符号化された二値シンボルを用いて、コンテクスト格納105部に格納されたコンテクスト情報を更新する複数のコンテクスト更新部107、901、902と、多値信号のタイプに応じて一のコンテクスト更新部を選択するセレクタ903とをさらに備える。また、本発明は、多値信号が、画像データをウェーブレット変換したときの所定サブバンド内の所定領域に含まれるウェーブレット変換係数であって、多値信号のタイプが、ウェーブレット変換係数の属するサブバンドの種類を示すサブバンド識別信号であることを特徴とする。
【0058】
以上に述べたように、サブバンドごとに異なるコンテクスト生成方法を用いることにより、ウェーブレット変換係数の符号化に好適なビットプレーン符号化方式を実現することができる。本実施形態においても、コンテクストを格納する領域と、更新後のコンテクストを得るための状態遷移表を備え、コンテクストが変更されるような事象の発生した時に随時更新することにより、コンテクスト生成のためのメモリ容量を低減することができるとともに、コンテクスト生成処理の負荷軽減による高速化を期待することができる。
【0059】
<第3の実施形態>
図13は、本発明の第3の実施形態に係る画像符号化装置の構成を示すブロック図である。尚、図13においては、第1及び第2の実施形態で用いた図1及び図7と共通する部分については同じ符号で示しており、それらの説明を省略する。図13において、符号1201は複数パスビットプレーン走査部を示す。
【0060】
本実施形態による画像符号化装置は、第2の実施形態の画像符号化装置におけるビットプレーン走査部104を複数パスビットプレーン走査部1401に置き換えたものであり、その他の動作については第2の実施形態における画像符号化装置と同様である。また、第1及び第2の実施形態の画像符号化装置では、1枚のビットプレーンを1パスで走査していたのに対して、本実施形態による画像符号化装置においては、最上位のビットプレーンを除き、各ビットプレーンを3パスで走査する。以下、複数パスビットプレーン走査部1401の動作について説明する。
【0061】
複数パスビットプレーン走査部1401は、多値信号格納部103に格納される多値信号をNBP枚のビットプレーンに分割して、最上位ビットプレーン(NBP−1ビットプレーン)から下位ビットプレーン(0ビットプレーン)へ、また、同一ビットプレーン内においては3回のパスで二値シンボルを取り出して出力する。ビットプレーン中の一つの二値シンボルは3回のパスのうちのいずれか一つのパスにより取り出され、同一ビットプレーンの複数のパスで取り出すことはない。
【0062】
個々の多値信号について最初に符号化される「1」の直後には、ビットプレーン走査部104と同様にその多値信号の正負符号S(x,y)を出力する。ビットプレーン中の各ビットが3つのパスのどのパスに含まれるかは、コンテクスト格納部105に格納されるコンテクストC(x,y)を参照して定める。
【0063】
第1のパスでは、ビットプレーン内をラスタースキャン順に走査して、コンテクスト番号C(x,y)が1〜8であるMn(x,y)を取り出して出力する。この第1パスでは、着目する多値信号の周囲8近傍に有意状態にある多値信号がすくなくとも一つ存在する多値信号のビットを取り出して出力している。
【0064】
第2のパスでは、同じくビットプレーン内をラスタースキャン順に走査して、第1のパスに該当しなかったビットのうち、コンテクスト番号C(x,y)が9〜11であるMn(x,y)を取り出して出力する。この第2パスでは、着目する多値信号が有意状態にある多値信号のビットを取り出して出力している。
【0065】
第3のパスでは、ビットプレーン内をラスタースキャン順に走査して第1及び第2のパスに該当しなかったビットを取り出して出力する。最上位のビットプレーン(NBP−1ビットプレーン)では、第1及び第2のパスに該当するビットは存在しないため、第3のパスのみで走査される。
【0066】
本実施形態に係る画像符号化装置によれば、1つのビットプレーンを複数のパスで符号化することにより、上位ビットから下位ビットへと符号伝送する過程で、伝送符号量に対する復号精度を向上することができる。また、最終符号列を構成する際にビットプレーン単位での符号の並び替えからパス単位の符号並び替えにすることで符号構成の自由度を上げ、より高効率な段階的伝送が可能である。
<その他の実施形態>
本発明は、上述した実施形態に限定されるものではない。例えば、上述した第1〜第3の実施形態においては、ビットプレーン内の走査をラスタースキャン順としたが、垂直方向に連続する複数信号をひとまとまりとし、このまとまりを単位にラスタースキャンを行い、一つの信号のまとまりにおいては上から下へと信号を走査するような方法を取ってもよい。また、ビットプレーン内の各ビットの符号化としてそれぞれのビット毎にコンテクストを生成して二値算術符号化する方式について述べたが、ランレングス符号化等の複数ビットをひとまとめに符号化する方式と組み合わせてもよい。
【0067】
また、二値算術符号化の方法としてMQ-Coderを用いる例について述べたが、上述した実施形態に限定されるものではなく、例えば、QM-Coder等、MQ-Coder以外の算術符号化方法を適用してもよい。また、マルチコンテクストの情報源を符号化するに適する方式であればその他の二値符号化方式を適用してもよい。
【0068】
尚、本発明は、複数の機器(例えば、ホストコンピュータ、インタフェース機器、リーダ、プリンタ等)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置等)に適用してもよい。
【0069】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体(または記憶媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記録媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記録した記録媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0070】
さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0071】
本発明を上記記録媒体に適用する場合、その記録媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。
【0072】
【発明の効果】
以上説明したように、本発明によれば、コンテクスト生成の負荷を軽減することにより多値信号のビットプレーン符号化処理の高効率化を図ることができるとともに、コンテクスト生成におけるメモリ容量を削減することができるという効果が得られる。
【図面の簡単な説明】
【図1】本発明に係る第1の実施形態による画像符号化装置の構成を示すブロック図である。
【図2】本発明に係る第1の実施形態による画像符号化装置の動作手順を説明するためのフローチャートである。
【図3】入力される符号化対象の多値信号を説明するための図である。
【図4】M(x,y)とその周囲8近傍の多値信号M(x−1,y−1)、M(x,y−1)、M(x+1,y−1)、M(x−1,y)、M(x+1,y)、M(x−1,y+1)、M(x,y+1)、M(x+1,y+1)の位置関係を説明するための図である。
【図5】第1の実施形態における「有意」及び「非有意」の状態の例を説明するための図である。
【図6】第1の実施形態で用いられる12種類のコンテクストを示す図である。
【図7】コンテクスト更新部107の内部に保持されている状態遷移表を示す図である。
【図8】本発明の第2の実施形態に係る画像符号化装置の構成を示すブロック図である。
【図9】第2の実施形態でHLサブバンドの係数に適用するコンテクストを決定するための図である。
【図10】コンテクスト更新部901で使用される状態遷移表を示す図である。
【図11】HHサブバンドの係数に適用するコンテクストを決定するための図である。
【図12】コンテクスト更新部902で使用する状態遷移表を示す図である。
【図13】本発明の第3の実施形態に係る画像符号化装置の構成を示すブロック図である。
【図14】ウェーブレット変換とビットプレーン符号化とを組み合わせた符号化方式を使用した従来の画像符号化装置の構成を示すブロック図である。
【図15】ウェーブレット変換によって符号化対象画像が複数のサブバンドへ分割される様子を説明するための図である。
【図16】2次元のウェーブレット変換処理を2回繰り返して画像のサブバンド分割を行った場合のサブバンドの例を示す図である。
【符号の説明】
101 多値信号入力部
102 符号・絶対値変換部
103 多値信号格納部
104 ビットプレーン走査部
105 コンテクスト格納部
106 二値算術符号化部
107、901、902 コンテクスト更新部
108 符号出力部
109 有効ビット数判定部
903 セレクタ
904 信号線
1401 複数パスビットプレーン走査部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding apparatus and an image encoding method for encoding image data suitably.
[0002]
[Prior art]
As a method of image encoding, a method combining wavelet transform and bit plane encoding is known. Image coding by this method can be performed by changing the spatial resolution stepwise using the subband decomposition mechanism in the wavelet transform, and the decoding pixel accuracy can be increased by changing the number of decoding bitplanes. It is attracting attention because it can be changed automatically.
[0003]
Still image coding method JPEG2000 (ISO / IEC 15444-1), which is being standardized by ISO / IEC JTC1 / SC29 / WG1, is also configured by a combination of wavelet transform and bit-plane coding. FIG. 14 is a block diagram showing a configuration of a conventional image encoding apparatus using an encoding method in which wavelet transform and bit plane encoding are combined. The flow of the conventional image encoding process will be briefly described with reference to FIG.
[0004]
The conventional image encoding device shown in FIG. 14 includes an image input unit 201, a discrete wavelet transform unit 202, a coefficient quantization unit 203, a bit plane encoding unit 204, a code string forming unit 205, and a code output unit 206. The
[0005]
First, image data to be encoded is input from the image input unit 201. The encoding target image input from the image input unit 201 is divided into a plurality of frequency bands (subbands) by the discrete wavelet transform unit 202. FIG. 15 is a diagram for explaining how an encoding target image is divided into a plurality of subbands by wavelet transform. As shown in FIGS. 15 (a), 15 (b), and 15 (c), in the wavelet transform of an image, first, one-dimensional wavelet transform processing is applied in the horizontal and vertical directions respectively to obtain four sub-processes. A method of dividing into bands is used. Furthermore, a method of dividing only the low frequency subband (subband LL) in the horizontal and vertical directions is common. FIG. 16 is a diagram illustrating an example of subbands when the subband division of an image is performed by repeating the two-dimensional wavelet transform process twice.
[0006]
Then, the coefficient quantization unit 203 quantizes the coefficient of each subband in a quantization step determined for each subband. Further, the bit plane encoding unit 204 divides the quantized transform coefficient of each subband into rectangular small regions (hereinafter referred to as “code blocks”), and from the upper bits of the transform coefficients for each code block. Encoding is performed with priority on the bit plane direction to the lower bits. When each bit in the bit plane is encoded, it is classified into several states (contexts) from the encoded information, and encoded with different appearance probability prediction models.
[0007]
Further, the code string forming unit 205 generates a code string by arranging the code block encoded data generated by the bit plane encoding unit 204 in a predetermined order. The generated code string is output from the code output unit 206 to the outside of the image encoding device.
[0008]
When the discrete wavelet transform unit 202 performs wavelet transform to divide into subbands as shown in FIG. 16, and encodes and transmits the coefficients of each subband in order from the low frequency subband LL to the high frequency subband HH1. On the decoding side, a restored image having a resolution of 1/4 can be decoded at the stage where the coefficient of the subband LL is received. In addition, when the subbands LL, LH1, HL1, and HH1 are received, a restored image having a resolution of ½, and when subbands LH2, HL2, and HH2 are received, the restored image having the original resolution is used In particular, the image can be decoded with gradually increasing resolution.
[0009]
Also, even when the bit plane encoded data of each code block obtained by the bit plane encoding unit 204 is transmitted from the upper bit to the lower bit, the decoding side gradually increases the accuracy and the conversion coefficient of each subband. Can be restored. Thus, it is possible to decode a coarse image quality image in the initial state of transmission, and it is possible to decode an image image with improved image quality as the transmission proceeds.
[0010]
[Problems to be solved by the invention]
However, it is not an efficient process to generate a context each time each bit is encoded in bit-plane encoding. For example, consider a case where N multilevel signals are decomposed into M bit planes and encoded. In this case, N × M binary information source symbols are encoded. Therefore, when a context is generated for each of the N × M binary symbols and the binary encoding process is performed based on the probability estimation, the processing load is high, and the time required for the encoding process and the decoding process is high. Problems such as lengthening occur.
[0011]
In many cases, the context is determined by referring to a table based on an encoded bit or an event determined from the encoded bit. In such a case, as the number of bits or events to be referred to increases, the number of entries in the table increases, and there is a problem that a large memory area is required to store them.
[0012]
The present invention has been made in view of such circumstances, and by reducing the load of context generation, it is possible to improve the efficiency of bit-plane encoding processing of multilevel signals, and in context generation. An object of the present invention is to provide an image encoding device and an image encoding method capable of reducing the memory capacity.
[0013]
  In order to solve the above problems, the present invention provides:Multiple multivaluedataRepresents each multi-valued dataBinary symbolEveryAn image encoding device for encoding,Corresponding to multiple positions (x, y)Multi-valueData M (x, y)TheDivide into bit planes, and move the nth bit plane from the upper bit plane to the lower bit plane.Binary symbolBit-plane scanning that sequentially outputs Mn (x, y)Means,A plurality of multi-value data M (X, Y) in a region including the position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1, y, determined based on the state of y + 1),contextC (x, y)Context storage means for storing the context, and the context stored in the context storage meansC (x, y)The binary symbolMn (x, y)TheSequentially from upper bitplane to lower bitplaneEncoding means for encoding;While the encoding means sequentially encodes the binary symbol Mn (x, y) for the multi-value data M (x, y) to be encoded, the multi-value data M (x, y) When transitioning from a non-significant state to a significant state, each value of the context C (X, Y) stored in the context storage means, a relative position from the position to be encoded, and an updated context Referring to the state transition table that defines the relationship with each value of C (X, Y), update the context C (X, Y) for each of the multivalued data M (X, Y), and again And updating means for storing in the context storing means.It is characterized by.
[0014]
  In order to solve the above-mentioned problem, the present invention is an image encoding method for encoding a plurality of multi-value data for each binary symbol representing each multi-value data, and corresponds to a plurality of positions (x, y). Bit plane scanning that divides multi-valued data M (x, y) to be divided into bit planes and sequentially outputs binary symbols Mn (x, y) of the nth bit plane from the upper bit plane to the lower bit plane A plurality of multi-value data M (X, Y) in a region including a process and a position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1). , Y, y + 1) using the context storing step for storing the context C (x, y) in the context storing means, and the context C (x, y) stored in the context storing means. The binary symbol M Encoding step (x, y) sequentially from the upper bit plane to the lower bit plane, and the multi-value data M (x, y) to be encoded in the encoding step, When the multilevel data M (x, y) transitions from the insignificant state to the significant state while sequentially encoding the binary symbol Mn (x, y), the context C stored in the context storage means is stored. Refer to the state transition table that defines the relationship between each value of (X, Y), the relative position from the position to be encoded, and each value of the updated context C (X, Y). And an updating step of updating the context C (X, Y) for each of the plurality of multi-valued data M (X, Y) and storing it again in the context storage means. .
[0015]
  In order to solve the above-described problem, the present invention is an image encoding program that encodes a plurality of multi-value data for each binary symbol representing each multi-value data, and corresponds to a plurality of positions (x, y). Bit plane scanning that divides multi-valued data M (x, y) to be divided into bit planes and sequentially outputs binary symbols Mn (x, y) of the nth bit plane from the upper bit plane to the lower bit plane A plurality of multi-value data M (X, Y) in a region including a process and a position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1). , Y, y + 1) using the context storing step for storing the context C (x, y) in the context storing means, and the context C (x, y) stored in the context storing means. The binary thin Encoding Mn (x, y) sequentially from the upper bit plane to the lower bit plane, and the multi-value data M (x, y) to be encoded in the encoding step Is stored in the context storage means when the multi-value data M (x, y) transitions from a non-significant state to a significant state while sequentially encoding the binary symbol Mn (x, y). Refer to the state transition table that defines the relationship between each value of context C (X, Y), the relative position from the position to be encoded, and each value of updated context C (X, Y) And updating the context C (X, Y) for each of the multi-value data M (X, Y) and storing the same in the context storage means again. To do.
[0016]
  In order to solve the above-described problems, the present invention is a storage medium storing an image encoding program that encodes a plurality of multi-value data for each binary symbol representing each multi-value data. , Y) is divided into bit planes, and binary symbols Mn (x, y) of the nth bit plane are sequentially transmitted from the upper bit plane to the lower bit plane. A bit plane scanning step to be output and a plurality of multi-value data M (X, Y) in a region including a position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is determined based on the state of y-1, y, y + 1), and the context storing step of storing the context C (x, y) in the context storing means, and the context C (x, y) stored in the context storing means. ) For The binary symbol Mn (x, y) is sequentially encoded from the upper bit plane to the lower bit plane, and the multi-value data M to be encoded in the encoding step. Context storage means when multi-valued data M (x, y) transitions from a non-significant state to a significant state while sequentially encoding binary symbols Mn (x, y) for (x, y). The relationship between each value of the context C (X, Y) stored in, the relative position from the position to be encoded, and each value of the updated context C (X, Y) is defined Referring to the transition table, update the context C (X, Y) for each of the plurality of multi-valued data M (X, Y), and store the same in the context storage means again. image And characterized by storing the Goka program.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an image encoding device and an image encoding method according to an embodiment of the present invention will be described with reference to the drawings.
[0018]
<First Embodiment>
FIG. 1 is a block diagram showing a configuration of an image encoding device according to the first embodiment of the present invention. 1 includes a multilevel signal input unit 101, a code / absolute value conversion unit 102, a multilevel signal storage unit 103, a bit plane scanning unit 104, a context storage unit 105, and a binary arithmetic encoding unit 106. , A context update unit 107, a code output unit 108, and a valid bit number determination unit 109.
[0019]
FIG. 2 is a flowchart for explaining an operation procedure of the image coding apparatus according to the first embodiment of the present invention. Hereinafter, with reference to FIG. 1 and FIG. 2, the operation of each unit of the image coding apparatus according to the present embodiment will be described in detail. Note that the image encoding apparatus according to the present embodiment uses H × V multilevel signals forming a rectangle with the number H of samples in the horizontal direction and the number V of samples in the vertical direction as encoding targets. The multi-level signal is a signed integer expressed in two's complement with a predetermined bit width b (for example, 16 bits). In addition, the image encoding apparatus according to the present embodiment divides the absolute value of the multilevel signal to be encoded into bit planes, and sequentially encodes from the upper bit plane to the lower bit plane.
[0020]
The multilevel signal storage unit 103 has an area for storing the H × V multilevel signals, and the context storage unit 105 has an area for storing (H + 2) × (V + 2) contexts. Prior to the encoding process, all storage areas of the context storage unit 105 are initialized to zero.
[0021]
First, multilevel signals to be encoded by the image encoding apparatus of the present embodiment are input from the multilevel signal input unit 101 in the raster scan order within a rectangle (step S1). FIG. 3 is a diagram for explaining the input multilevel signal to be encoded. As shown in FIG. 3, hereinafter, the horizontal sample position in the rectangle is represented by x, the vertical sample position is represented by y, and the multilevel signal at the position (x, y) is represented by B (x, y).
[0022]
The sign / absolute value conversion unit 102 converts the multi-value signal B (x, y) expressed in two's complement input from the multi-value signal input unit 101 into a sign / absolute value representation, and a multi-value signal storage unit 103. (Step S2). If the sign / absolute value representation of the multilevel signal B (x, y) is M (x, y), both are expressed in 16-bit width,
When B (x, y) ≧ 0
M (x, y) = B (x, y)
When B (x, y) <0
M (x, y) = (− B (x, y)) | 0x8000
Let's convert as follows.
[0023]
First, the valid bit number determination unit 109 obtains a logical sum N for all the multilevel signals M (x, y) stored in the multilevel signal storage unit 103. Next, the absolute value Nabs of the logical sum N is obtained. Further, the minimum number of digits NBP required to express the absolute value of M (x, y) in binary is obtained using the following equation.
[0024]
NBP = ceil {log2 (Nabs + 1)}
Here, ceil {R} represents a minimum integer value equal to or greater than the real number R. As a method of obtaining the logical sum N, after all the multi-value signals M (x, y) are stored in the multi-value signal storage unit 103, all the multi-value signals stored in the multi-value signal storage unit 103 are scanned. The logical sum may be obtained, or the variable N is initialized to 0, and the process of obtaining the logical sum of the variable N and M (x, y) output from the sign / absolute value conversion unit 102 is repeatedly performed. Also good.
[0025]
The bit plane scanning unit 104 divides the absolute value part of the multi-level signal stored in the multi-level signal storage unit 103 into NBP bit planes, from the most significant bit plane (NBP-1 bit plane) to the lower bit plane. Binary symbols are extracted and output in the order of (0 bit plane) and in the raster scan order within the same bit plane (step S3). Hereinafter, the n-th digit (the least significant bit is the 0th digit) of the bits constituting the multi-level signal M (x, y) is represented as Mn (x, y).
[0026]
Here, immediately after “1” that is first encoded for each multilevel signal, the bit plane scanning unit 104 represents the positive and negative signs of the multilevel signal as 0 and 1 and outputs the result. The sign of the multilevel signal M (x, y) is S (x, y), 0 if positive, and 1 if negative. For example, when M (x, y) = − 5 and the effective digit number NBP obtained by the effective bit number determination unit 109 = 6, the absolute value of M (x, y) is represented by the binary number 00101, and each bit The data is output in order from the upper digit to the lower digit by plane encoding. When processing a 2-bit plane (in this case, the fourth digit from the top), the first “1” is output, and immediately after this, the plus / minus sign “1” is output.
[0027]
The binary symbol output from the bit plane scanning unit 104 is arithmetically encoded by the binary arithmetic encoding unit 106 (step S4). In the arithmetic coding of the binary symbol Mn (x, y) of interest, the state (context) is referred to by referring to the multi-level signal near 8 around the multi-level signal M (x, y) to which Mn (x, y) belongs. And the bit of interest is encoded by a probability estimation model that is different for each context. FIG. 4 shows M (x, y) and multilevel signals M (x-1, y-1), M (x, y-1), M (x + 1, y-1), M (x It is a figure for demonstrating the positional relationship of x (1, y), M (x + 1, y), M (x-1, y + 1), M (x, y + 1), M (x + 1, y + 1).
[0028]
Here, a method for determining a context in the image coding apparatus according to the present embodiment will be described. In this embodiment, based on the “significant” and “insignificant” of the signal M (x, y) to be encoded and the signals in the vicinity of the surrounding eight, the context is divided into 12 types (excluding the context for sign bits). Separately encode.
[0029]
FIG. 5 is a diagram for explaining an example of “significant” and “insignificant” states in the present embodiment. When a certain multi-level signal M (x, y) is encoded up to Mn (x, y), “significant” means that, as illustrated in FIG. A state in which at least one “1” is included in Mn (x, y) and its upper bits. Further, the fact that a certain multilevel signal M (x, y) is insignificant means a state in which all encoded bits are “0”, as illustrated in FIG. 5B.
[0030]
Therefore, the state of “significant” or “insignificant” changes as encoding is performed sequentially from the upper bit to the lower bit. For example, in the case of FIG. 5B, Mn−1 (x, y ) Is insignificant in the already encoded state, and if it is encoded up to Mn−2 (x, y), it changes from the insignificant state to the significant state. Note that, as Mn-2 (x, y) in FIG. 5B, a bit that changes state from significant to insignificant by coding the bit is referred to as a “state transition bit”. Also, lower bits than the state transition bits, for example, Mn-3 (x, y) to M0 (x, y) in FIG. 5B are referred to as “update bits”.
[0031]
FIG. 6 is a diagram showing 12 types of contexts used in the present embodiment. In FIG. 6, “ΣH” represents the number of signals in the significant state of M (x−1, y) and M (x + 1, y), that is, the left and right signals of the target multilevel signal. Note that ΣH takes one of 0, 1, and 2. That is, it is 0 if both M (x-1, y) and M (x + 1, y) are insignificant, 1 if only one is significant, and 2 if both are significant.
[0032]
Similarly, “ΣV” represents the number of signals in the significant state of M (x, y−1) and M (x, y + 1) above and below the target multilevel signal. “ΣD” is a diagonal multi-level signal, that is, M (x−1, y−1), M (x + 1, y−1), M (x−1, y + 1), M (x + 1, y + 1) represents the number of signals in a significant state. In FIG. 6, the hatched portion represents a portion that is not referred to. For example, when the target multi-level signal is insignificant and ΣH = 2, the context 8 is displayed regardless of ΣV and ΣD. Sorted.
[0033]
The context storage unit 105 includes a context C (x, y) used when binary arithmetic coding each bit Mn (x, y) (0 ≦ n <NBP) of the multilevel signal M (x, y). Is stored. In the context storage unit 105, in order to avoid exception processing at the boundary of the rectangle, C (x, y) of −1 ≦ x ≦ H and −1 ≦ y ≦ V can be stored in the surrounding area. Leave room for each sample. The context storage unit 105 outputs C (x, y) corresponding to the output of the binary symbol Mn (x, y) from the bit plane scanning unit 104. Note that C (x, y) stored in the context storage unit 105 is all set to 0 in the initial state at the start of encoding.
[0034]
The binary arithmetic encoding unit 106 uses a context C (x, y) in which the binary symbols Mn (x, y) and S (x, y) output from the bit plane scanning unit 104 are read from the context storage unit 105. The binary arithmetic coding is performed, and the generated codes are sequentially output to the code output unit 108. In the present embodiment, MQ-Coder is used as an arithmetic code. For the procedure for coding binary symbols generated in a context using this MQ-Coder, or for the initialization procedure and termination procedure for arithmetic coding processing, the international standard ITU-T Recommendation T for still images .88 | Details are described in the ISO / IEC14492 recommendation, etc., so the explanation is omitted here.
[0035]
In this embodiment, the arithmetic encoder is initialized at the start of encoding, and the termination process of the arithmetic encoder is performed at the end. In addition, in the encoding of the positive / negative code S (x, y), context reading from the context storage unit 105 is not performed, and a single code dedicated to encoding a positive / negative code different from the context used for encoding Mn (x, y) is used. Perform arithmetic coding in one context. In the image encoding apparatus according to the present embodiment, the contexts 0 to 11 are used for encoding each bit of the absolute value. Therefore, for example, the context 12 or the like may be used as the context dedicated to encoding the positive and negative codes. .
[0036]
When the transition bit (first “1”) of the multilevel signal M (x, y) is encoded, the context update unit 107 has eight contexts C (x−1) around M (x, y). , Y-1), C (x, y-1), C (x + 1, y-1), C (x-1, y), C (x + 1, y), C (x-1, y + 1), C Update processing of the context C (x, y) of (x, y + 1), C (x + 1, y + 1) and M (x, y) is performed (step S5).
[0037]
FIG. 7 is a diagram showing a state transition table held in the context update unit 107. The context update unit 107 updates the surrounding context with reference to the state transition table shown in FIG. The state transition table shown in FIG. 7 shows a case where a state transition from non-significant to significant occurs in the vicinity in the horizontal direction, the vicinity in the vertical direction, and the vicinity in the oblique direction for a certain context C (x, y). The context after each update is stored.
[0038]
In FIG. 7, in the case of state transition in the vicinity in the horizontal direction, the column “H” is referred to. In the case of state transition in the vicinity in the vertical direction, the column “V” is referred to. Further, in the case of state transition in the vicinity in the oblique direction, the column “D” is referred to. For example, when the current context C (x, y) of the multilevel signal M (x, y) of interest is 5, and the transition bit is encoded in the immediately preceding signal M (x-1, y) For example, the H column in the row corresponding to the context 5 is referred to, and the updated context 8 is obtained. Further, when the target multi-level signal itself switches from insignificant to significant, the updated context is obtained by referring to the column M in FIG.
[0039]
Let c be the current context, and d be the position of the signal whose state has changed from insignificant to significant (either vertical (V), horizontal (H), diagonal (D), or the signal of interest itself (M)). When the updated context obtained from FIG. 7 is expressed as ST (c, d), the update of the eight contexts around M (x, y) and the context of M (x, y) is expressed as follows. be able to.
[0040]
C (x-1, y-1) = ST (C (x-1, y-1), D)
C (x + 1, y-1) = ST (C (x + 1, y-1), D)
C (x-1, y + 1) = ST (C (x-1, y + 1), D)
C (x + 1, y + 1) = ST (C (x + 1, y + 1), D)
C (x-1, y) = ST (C (x-1, y), H)
C (x + 1, y) = ST (C (x + 1, y), H)
C (x, y-1) = ST (C (x, y-1), V)
C (x, y + 1) = ST (C (x, y + 1), V)
C (x, y) = ST (C (x, y), M)
In the context update unit 107, in addition to the above update process, when the first update bit of the multilevel signal M (x, y) is encoded, the context C (x, y) of M (x, y) Is updated to 11. In FIG. 7, in the row corresponding to the current contexts 9 and 10, the part indicating the updated context number in parentheses in the M column corresponds to this processing.
[0041]
By performing the above-described processing on all the binary symbols Mn (x, y) output from the bit plane encoding unit 104 (Yes in step S6), the bit plane encoding of the multilevel signal is performed. Arithmetic encoded data is passed to the output unit 108. On the other hand, when all the binary symbols have not been encoded (No in step S6), the above-described processing is performed from the extraction of the binary symbols in step S3.
[0042]
The code output unit 108 outputs the code string generated by the binary arithmetic encoding unit 106 to the outside of the apparatus (step S7). The code output unit 108 is realized by, for example, a storage device such as a hard disk or a memory, a network line interface, or the like.
[0043]
That is, the present invention relates to image coding in which a binary symbol generated from image data is encoded using a context indicating the state of each binary symbol, and image data input from the multilevel signal input unit 101. A multi-level signal in a predetermined area is converted into a binary symbol by the code / absolute value conversion unit 102. Next, the context related to the converted binary symbol is read from the context storage unit 105. Then, using the read context, the binary arithmetic encoding unit 106 encodes the binary symbol. The context update unit 107 updates the context information stored in the context storage unit 105 using the encoded binary symbol.
[0044]
Furthermore, the present invention is a binary symbol adjacent to a binary symbol, and the sum of the number of binary symbols in a state in which at least one 1 is included in the encoded bits is calculated for each of left, right, up, down, or diagonal directions. And the context related to the binary symbol is determined based on the sum of the calculated binary symbols for each direction.
[0045]
As described above, it has an area for storing the context associated with each of the multilevel signals and a state transition table for obtaining the updated context, and is updated as needed when an event that changes the context occurs. By doing so, it is possible to reduce the memory capacity for context generation, and to expect an increase in speed by reducing the load of the context generation processing.
[0046]
<Second Embodiment>
FIG. 8 is a block diagram showing a configuration of an image encoding device according to the second embodiment of the present invention. Portions common to the block diagram shown in FIG. 1 used in the first embodiment are denoted by the same reference numerals, and description thereof is omitted. In FIG. 8, reference numeral 901 denotes a context update unit, 902 denotes a context update unit, 903 denotes a selector, and 904 denotes a signal line.
[0047]
The image coding apparatus according to the present embodiment is a conventional image coding system configured by combining wavelet transform and bit plane coding as shown in FIG. It is assumed to be used as a bit plane encoding unit to be converted. In the image encoding device according to the first embodiment, the context update method is extended for each subband to which the coefficient to be encoded belongs.
[0048]
In the present embodiment, the multi-value signal input unit 101 inputs a transform coefficient included in a region (code block) obtained by dividing a certain subband generated by wavelet transform into rectangles, or a quantized value thereof.
[0049]
Also, a quaternary (0 to 3) subband identification signal indicating to which subband the code block to be encoded belongs is input from the signal line 904. The subband identification signals 0, 1, 2, and 3 represent the LL subband, the LH subband, the HL subband, and the HH subband, respectively.
[0050]
Since the only part that differs in operation from the first embodiment is the context update part, the operation of this part will be described below.
[0051]
The selector 903 switches the context update unit 107, the context update unit 901, and the context update unit 902 according to the subband identification signal input from the signal line 904, and updates the context stored in the context storage unit 105. When the subband identification signal is 0 or 1, that is, when the code block to be encoded belongs to the LL subband or the LH subband, the same context update unit 107 as that of the first embodiment is selected. When the subband identification signal is 2, the context update unit 901 is selected, and when the subband identification signal is 3, the context update unit 902 is selected.
[0052]
On the other hand, when the code block to be encoded belongs to the HL subband, the context shown in FIG. 9 is used. FIG. 9 is a diagram for determining a context to be applied to the coefficients of the HL subband in the present embodiment. That is, FIG. 9 is used in the first embodiment, and in the second embodiment, the meanings of H and V in the context of FIG. 5 used when code block coding of the LL subband and the LH subband is used. The date has been changed.
[0053]
The context update unit 901 stores the table of FIG. 10 as a state transition table for obtaining the context corresponding to FIG. FIG. 10 is a diagram showing a state transition table used in the context update unit 901. Based on the state transition table of FIG. 10, when the transition bit (first “1”) of the multilevel signal M (x, y) is encoded in the same manner as the context update unit 107, M (x, 8 contexts around Y) C (x-1, y-1), C (x, y-1), C (x + 1, y-1), C (x-1, y), C (x + 1, y), C (x-1, y + 1), C (x, y + 1), C (x + 1, y + 1) and M (x, y) context C (x, y) are updated, and the multi-value signal M When the first update bit of (x, y) is encoded, the context C (x, y) of M (x, y) is updated to 11.
[0054]
When the code block to be encoded belongs to the HH subband, the context shown in FIG. 11 is used. FIG. 11 is a diagram for determining a context to be applied to the coefficients of the HH subband. The context update unit 902 stores the table shown in FIG. 12 as a state transition table for obtaining a context corresponding to FIG.
[0055]
FIG. 12 is a diagram showing a state transition table used in the context update unit 902. As shown in FIG. 12, when the transition bit (first “1”) of the multilevel signal M (x, y) is encoded in the same manner as the context update unit 107, the M (x, y) Eight surrounding contexts C (x-1, y-1), C (x, y-1), C (x + 1, y-1), C (x-1, y), C (x + 1, y), The context C (x, y) of C (x-1, y + 1), C (x, y + 1), C (x + 1, y + 1), and M (x, y) is updated, and the multilevel signal M (x, y, When the first update bit bit of y) is encoded, the context C (x, y) of M (x, y) is updated to 11.
[0056]
In FIG. 12, the column of H that is referred to when the state transition is made from insignificant to significant in the neighborhood coefficient in the horizontal direction and the column of V that is referenced when the state transition is made in the neighborhood coefficient in the vertical direction are the same. Therefore, either one may be stored in the context update unit 107 and used without distinguishing between the horizontal direction and the vertical direction.
[0057]
That is, the image encoding device according to the present invention uses a plurality of context update units 107, 901, and 902 that update the context information stored in the context storage unit 105 using the encoded binary symbols, And a selector 903 that selects one context update unit according to the signal type. The present invention also relates to a wavelet transform coefficient included in a predetermined region in a predetermined subband when the multilevel signal is wavelet transformed image data, and the type of the multilevel signal is a subband to which the wavelet transform coefficient belongs. It is a subband identification signal indicating the type of
[0058]
As described above, by using a different context generation method for each subband, a bit plane encoding scheme suitable for encoding wavelet transform coefficients can be realized. Also in the present embodiment, an area for storing a context and a state transition table for obtaining an updated context are provided, and updated at any time when an event that changes the context occurs, to generate a context. It is possible to reduce the memory capacity and increase the speed by reducing the load of the context generation process.
[0059]
<Third Embodiment>
FIG. 13 is a block diagram showing a configuration of an image encoding device according to the third embodiment of the present invention. In FIG. 13, portions common to FIGS. 1 and 7 used in the first and second embodiments are denoted by the same reference numerals, and description thereof is omitted. In FIG. 13, reference numeral 1201 denotes a multi-pass bit plane scanning unit.
[0060]
The image coding apparatus according to the present embodiment is obtained by replacing the bit plane scanning unit 104 in the image coding apparatus according to the second embodiment with a multi-pass bit plane scanning unit 1401, and other operations are performed in the second embodiment. It is the same as that of the image coding apparatus in a form. Further, in the image encoding devices of the first and second embodiments, one bit plane is scanned in one pass, whereas in the image encoding device according to the present embodiment, the most significant bit is scanned. Except for the plane, each bit plane is scanned in three passes. Hereinafter, the operation of the multi-pass bit plane scanning unit 1401 will be described.
[0061]
The multi-pass bit plane scanning unit 1401 divides the multi-level signal stored in the multi-level signal storage unit 103 into NBP bit planes from the most significant bit plane (NBP-1 bit plane) to the lower bit plane (0). In the same bit plane, binary symbols are extracted and output in three passes. One binary symbol in the bit plane is extracted by any one of the three passes, and is not extracted by a plurality of passes of the same bit plane.
[0062]
Immediately after “1” that is first encoded for each multilevel signal, the positive / negative code S (x, y) of the multilevel signal is output in the same manner as the bit plane scanning unit 104. Which path of the three paths each bit in the bit plane is included in is determined with reference to the context C (x, y) stored in the context storage unit 105.
[0063]
In the first pass, the inside of the bit plane is scanned in raster scan order, and Mn (x, y) whose context numbers C (x, y) are 1 to 8 are extracted and output. In this first pass, at least one bit of the multi-level signal in which there is at least one multi-level signal in a significant state exists in the vicinity of the surrounding 8 of the multi-level signal of interest is extracted and output.
[0064]
In the second pass, Mn (x, y) whose context numbers C (x, y) are 9 to 11 among the bits that do not correspond to the first pass are similarly scanned in the bit plane in the raster scan order. ) Is output. In this second pass, the bits of the multilevel signal in which the target multilevel signal is in a significant state are extracted and output.
[0065]
In the third pass, the bit plane is scanned in the raster scan order, and bits that do not correspond to the first and second passes are extracted and output. In the most significant bit plane (NBP-1 bit plane), since there is no bit corresponding to the first and second passes, scanning is performed only in the third pass.
[0066]
According to the image coding apparatus according to the present embodiment, decoding accuracy with respect to the transmission code amount is improved in the process of code transmission from upper bits to lower bits by encoding one bit plane with a plurality of passes. be able to. Further, when the final code string is formed, the code rearrangement is changed from the code rearrangement in units of bit planes to the rearrangement of codes in units of paths, so that the degree of freedom of the code configuration is increased and more efficient stepwise transmission is possible.
<Other embodiments>
The present invention is not limited to the embodiment described above. For example, in the first to third embodiments described above, the scan in the bit plane is in the raster scan order, but a plurality of signals that are continuous in the vertical direction are grouped, and the raster scan is performed in units of this group. A method of scanning a signal from the top to the bottom may be adopted in one signal group. In addition, as a method of encoding each bit in the bit plane, a method of generating a context for each bit and performing binary arithmetic coding has been described, but a method of collectively encoding a plurality of bits such as run length coding and the like You may combine.
[0067]
In addition, although an example using MQ-Coder as a binary arithmetic encoding method has been described, the present invention is not limited to the above-described embodiment, and an arithmetic encoding method other than MQ-Coder, such as QM-Coder, is used. You may apply. In addition, other binary coding schemes may be applied as long as the scheme is suitable for coding a multi-context information source.
[0068]
Note that the present invention can be applied to a system composed of a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but a device (for example, a copier, a facsimile machine, etc.) composed of a single device. You may apply to.
[0069]
Also, an object of the present invention is to supply a recording medium (or storage medium) in which a program code of software that realizes the functions of the above-described embodiments is recorded to a system or apparatus, and the computer (or CPU or Needless to say, this can also be achieved when the MPU) reads and executes the program code stored in the recording medium. In this case, the program code itself read from the recording medium realizes the functions of the above-described embodiment, and the recording medium on which the program code is recorded constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0070]
Furthermore, after the program code read from the recording medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0071]
When the present invention is applied to the recording medium, program code corresponding to the flowchart described above is stored in the recording medium.
[0072]
【The invention's effect】
As described above, according to the present invention, it is possible to improve the efficiency of bit-plane encoding processing of multilevel signals by reducing the load of context generation, and to reduce the memory capacity in context generation. The effect of being able to be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image encoding device according to a first embodiment of the present invention.
FIG. 2 is a flowchart for explaining an operation procedure of the image coding apparatus according to the first embodiment of the present invention.
FIG. 3 is a diagram for explaining a multi-value signal to be encoded that is input.
FIG. 4 shows M (x, y) and multi-level signals M (x−1, y−1), M (x, y−1), M (x + 1, y−1), M (x It is a figure for demonstrating the positional relationship of x (1, y), M (x + 1, y), M (x-1, y + 1), M (x, y + 1), M (x + 1, y + 1).
FIG. 5 is a diagram for explaining an example of “significant” and “insignificant” states in the first embodiment;
FIG. 6 is a diagram showing 12 types of contexts used in the first embodiment.
FIG. 7 is a diagram showing a state transition table held in the context update unit 107;
FIG. 8 is a block diagram illustrating a configuration of an image encoding device according to a second embodiment of the present invention.
FIG. 9 is a diagram for determining a context to be applied to a coefficient of an HL subband in the second embodiment.
FIG. 10 is a diagram showing a state transition table used in the context update unit 901;
FIG. 11 is a diagram for determining a context to be applied to coefficients of an HH subband.
FIG. 12 is a diagram showing a state transition table used in the context update unit 902;
FIG. 13 is a block diagram illustrating a configuration of an image encoding device according to a third embodiment of the present invention.
FIG. 14 is a block diagram showing a configuration of a conventional image encoding apparatus using an encoding method combining wavelet transform and bit-plane encoding.
FIG. 15 is a diagram for explaining a state in which an encoding target image is divided into a plurality of subbands by wavelet transform.
FIG. 16 is a diagram illustrating an example of subbands when the subband division of an image is performed by repeating two-dimensional wavelet transform processing twice.
[Explanation of symbols]
101 Multi-value signal input section
102 Sign / absolute value converter
103 Multi-level signal storage
104 bit plane scanning unit
105 Context storage
106 Binary arithmetic coding unit
107, 901, 902 Context update unit
108 Code output unit
109 Effective bit number determination unit
903 selector
904 signal line
1401 Multi-pass bit plane scanning unit

Claims (7)

複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化装置であって、
複数の位置(x、y)に対応する多値データM(x、y)ビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査手段と、
前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)を格納するコンテクスト格納手段と、
前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化手段と、
前記符号化手段において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、
前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、
複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新手段と、
を備えたことを特徴とする画像符号化装置。
A plurality of multi-value data, an image encoding device for encoding each binary symbol representing each multi-value data,
Multi-level data M (x, y) corresponding to a plurality of positions (x, y) is divided into bit planes, and the binary symbol Mn (x of the nth bit plane from the upper bit plane toward the lower bit plane , Y) sequentially outputting bit plane scanning means;
A plurality of multi-value data M (X, Y) in a region including the position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1, y, a context storage means for storing the context C (x, y) determined based on the state of y + 1) ;
Coding means for sequentially coding the binary symbol Mn (x, y) from the upper bit plane to the lower bit plane using the context C (x, y) stored in the context storage means; ,
While the encoding means sequentially encodes the binary symbol Mn (x, y) for the multi-value data M (x, y) to be encoded, the multi-value data M (x, y) When transitioning from a non-significant state to a significant state,
Relationship between each value of the context C (X, Y) stored in the context storage means, a relative position from the position to be encoded, and each value of the updated context C (X, Y) Refer to the state transition table that defines
Updating means for updating the context C (X, Y) for each of the plurality of multi-valued data M (X, Y) and storing it again in the context storing means;
Image encoding apparatus comprising the.
多値データM(X、Y)は、M(x−1、y−1)、M(x、y−1)、M(x+1、y−1)、M(x−1、y)、M(x+1、y)、M(x−1、y+1)、M(x、y+1)、M(x+1、y+1)、M(x、y)であり、コンテクストC(X、Y)は、コンテクストC(x−1、y−1)、C(x、y−1)、C(x+1、y−1)、C(x−1、y)、C(x+1、y)、C(x−1、y+1)、C(x、y+1)、C(x+1、y+1)、C(x、y)であることを特徴とする請求項1に記載の画像符号化装置。Multi-valued data M (X, Y) includes M (x-1, y-1), M (x, y-1), M (x + 1, y-1), M (x-1, y), M (X + 1, y), M (x-1, y + 1), M (x, y + 1), M (x + 1, y + 1), M (x, y), and context C (X, Y) is context C ( x-1, y-1), C (x, y-1), C (x + 1, y-1), C (x-1, y), C (x + 1, y), C (x-1, y + 1) 2), C (x, y + 1), C (x + 1, y + 1), and C (x, y). 前記多値データが、前記画像データをウェーブレット変換したときの所定サブバンド内の所定領域に含まれるウェーブレット変換係数であることを特徴とする請求項1に記載の画像符号化装置。2. The image coding apparatus according to claim 1, wherein the multi-value data is a wavelet transform coefficient included in a predetermined region in a predetermined subband when the image data is wavelet transformed. 複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化方法であって、
複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、
前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、
前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、
前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、
前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれ の値との関係を定めた状態遷移表を参照して、
複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、コンテクスト格納手段に格納する更新工程と、
を含むことを特徴とする画像符号化方法。
An image encoding method for encoding a plurality of multi-value data for each binary symbol representing each multi-value data,
Multi-level data M (x, y) corresponding to a plurality of positions (x, y) is divided into bit planes, and the binary symbol Mn (x of the nth bit plane from the upper bit plane toward the lower bit plane , Y) sequentially outputting a bit plane scanning process;
A plurality of multi-value data M (X, Y) in a region including the position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1, y, a context storing step of storing the context C (x, y) in the context storing means, which is determined based on the state of y + 1);
An encoding step of sequentially encoding the binary symbol Mn (x, y) from the upper bit plane to the lower bit plane using the context C (x, y) stored in the context storage means; ,
In the encoding step, while the binary symbol Mn (x, y) is sequentially encoded for the multi-value data M (x, y) to be encoded, the multi-value data M (x, y) When transitioning from a non-significant state to a significant state,
Relationship between each value of the context C (X, Y) stored in the context storage means, a relative position from the position to be encoded, and each value of the updated context C (X, Y) Refer to the state transition table that defines
An update step of updating the context C (X, Y) for each of the plurality of multi-valued data M (X, Y) and storing it again in the context storage means;
Image coding method, which comprises a.
前記多値データが、前記画像データをウェーブレット変換したときの所定サブバンド内の所定領域に含まれるウェーブレット変換係数であることを特徴とする請求項4に記載の画像符号化方法。5. The image encoding method according to claim 4, wherein the multi-value data is a wavelet transform coefficient included in a predetermined region within a predetermined subband when the image data is wavelet transformed. 複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化プログラムであって、An image encoding program for encoding a plurality of multilevel data for each binary symbol representing each multilevel data,
複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、Multi-level data M (x, y) corresponding to a plurality of positions (x, y) is divided into bit planes, and the binary symbol Mn (x of the nth bit plane from the upper bit plane toward the lower bit plane , Y) sequentially outputting a bit plane scanning process;
前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、A plurality of multi-value data M (X, Y) in a region including the position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1, y, a context storing step of storing the context C (x, y) in the context storing means, which is determined based on the state of y + 1);
格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、An encoding step of sequentially encoding the binary symbol Mn (x, y) from the upper bit plane to the lower bit plane using the stored context C (x, y);
前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、In the encoding step, while the binary symbol Mn (x, y) is sequentially encoded for the multi-value data M (x, y) to be encoded, the multi-value data M (x, y) When transitioning from a non-significant state to a significant state,
前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、Relationship between each value of the context C (X, Y) stored in the context storage means, a relative position from the position to be encoded, and each value of the updated context C (X, Y) Refer to the state transition table that defines
複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、コンテクスト格納手段に格納する更新工程と、Updating the context C (X, Y) for each of a plurality of multi-value data M (X, Y) and storing it again in the context storage means;
をコンピュータに実行させることを特徴とする画像符号化プログラム。An image encoding program that causes a computer to execute the above.
複数の多値データを、各多値データを表す二値シンボル毎に符号化する画像符号化プログラムを格納した記憶媒体であって、A storage medium storing an image encoding program for encoding a plurality of multi-value data for each binary symbol representing each multi-value data,
複数の位置(x、y)に対応する多値データM(x、y)をビットプレーンに分割し、上位ビットプレーンから下位ビットプレーンに向けて、n番目のビットプレーンの二値シンボルMn(x、y)を順次出力するビットプレーン走査工程と、Multi-level data M (x, y) corresponding to a plurality of positions (x, y) is divided into bit planes, and the binary symbol Mn (x of the nth bit plane from the upper bit plane toward the lower bit plane , Y) sequentially outputting a bit plane scanning process;
前記多値データM(x、y)を持つ位置を含む領域の複数の多値データM(X、Y)(ここで、Xはx−1、x、x+1、Yはy−1、y、y+1)の状態に基づいて定まる、コンテクストC(x、y)をコンテクスト格納手段に格納するコンテクスト格納工程と、A plurality of multi-value data M (X, Y) in a region including the position having the multi-value data M (x, y) (where X is x-1, x, x + 1, Y is y-1, y, a context storing step of storing the context C (x, y) in the context storing means, which is determined based on the state of y + 1);
前記コンテクスト格納手段に格納されたコンテクストC(x、y)を用いて、前記二値シンボルMn(x、y)を、上位ビットプレーンから下位ビットプレーンに向けて、順次符号化する符号化工程と、An encoding step of sequentially encoding the binary symbol Mn (x, y) from the upper bit plane to the lower bit plane using the context C (x, y) stored in the context storage means; ,
前記符号化工程において、前記符号化対象となる多値データM(x、y)について、二値シンボルMn(x、y)を順次符号化する間に、多値データM(x、y)が非有意状態から有意状態へと遷移した場合に、In the encoding step, while the binary symbol Mn (x, y) is sequentially encoded for the multi-value data M (x, y) to be encoded, the multi-value data M (x, y) When transitioning from a non-significant state to a significant state,
前記コンテクスト格納手段に格納されたコンテクストC(X、Y)のそれぞれの値と、符号化対象となる位置からの相対位置と、更新後のコンテクストC(X、Y)のそれぞれの値との関係を定めた状態遷移表を参照して、Relationship between each value of the context C (X, Y) stored in the context storage means, a relative position from the position to be encoded, and each value of the updated context C (X, Y) Refer to the state transition table that defines
複数の多値データM(X、Y)についてのコンテクストC(X、Y)をそれぞれ更新し、再度、前記コンテクスト格納手段に格納する更新工程と、Updating the context C (X, Y) for each of a plurality of multi-valued data M (X, Y) and storing it again in the context storage means;
をコンピュータに実行させる画像符号化プログラムを格納したことを特徴とするコンピュータ読み取り可能な記憶媒体。A computer-readable storage medium storing an image encoding program for causing a computer to execute the above.
JP2002193296A 2002-07-02 2002-07-02 Image coding apparatus and image coding method Expired - Fee Related JP3990949B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002193296A JP3990949B2 (en) 2002-07-02 2002-07-02 Image coding apparatus and image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002193296A JP3990949B2 (en) 2002-07-02 2002-07-02 Image coding apparatus and image coding method

Publications (2)

Publication Number Publication Date
JP2004040372A JP2004040372A (en) 2004-02-05
JP3990949B2 true JP3990949B2 (en) 2007-10-17

Family

ID=31702294

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002193296A Expired - Fee Related JP3990949B2 (en) 2002-07-02 2002-07-02 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP3990949B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101237413B1 (en) 2005-12-07 2013-02-26 삼성전자주식회사 Method and apparatus for encoding/decoding audio signal
GB2536026A (en) * 2015-03-05 2016-09-07 Nokia Technologies Oy Method and apparatus for encoding and decoding images

Also Published As

Publication number Publication date
JP2004040372A (en) 2004-02-05

Similar Documents

Publication Publication Date Title
JP4612782B2 (en) Image processing apparatus, method thereof, program, and storage medium
US6917716B2 (en) Image processing apparatus and method and storage medium
JP3814456B2 (en) Image processing apparatus and method
KR100524566B1 (en) Image processing apparatus and method
US20070242753A1 (en) Coding and decoding method and apparatus using plural scanning patterns
US7302105B2 (en) Moving image coding apparatus, moving image decoding apparatus, and methods therefor
US6337929B1 (en) Image processing apparatus and method and storing medium
EP1099351B1 (en) Method and apparatus for scalable shape coding
JP2007267384A (en) Compression apparatus and compression method
JP2004505520A (en) Video coding method using wavelet decomposition
JP2007129612A (en) Scanning method, inverse scanning method, scanner and inverse scanner of orthogonal conversion coefficient, its program, and computer-readable recording medium recording the program
JP2006014086A (en) Moving image encoding apparatus and moving image encoding method
JP3990949B2 (en) Image coding apparatus and image coding method
US7565024B2 (en) Run length coding and decoding
JP4678814B2 (en) Image processing method and apparatus
JP4412688B2 (en) Image processing apparatus and method
JP4054430B2 (en) Image processing apparatus and method, and storage medium
JPH09327018A (en) Picture encoding device and picture decoding device
JP2003204439A (en) Image coding apparatus and method therefor
JP2002290743A (en) Image information coding method, coding apparatus, digital copying machine, digital facsimile machine, and digital filing apparatus
JP4194311B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, and methods thereof
KR20030063850A (en) Document segmentation compression, reconstruction system and method
JP5078199B2 (en) Image encoding apparatus and method, program code, and storage medium
JPH11331612A (en) Picture processor, its method and storage medium
JP4526069B2 (en) Image information arithmetic coding apparatus and image information arithmetic decoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060901

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061030

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070723

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110727

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120727

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120727

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130727

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees