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

Image coding apparatus and image coding method Download PDF

Info

Publication number
JP4133357B2
JP4133357B2 JP2003007468A JP2003007468A JP4133357B2 JP 4133357 B2 JP4133357 B2 JP 4133357B2 JP 2003007468 A JP2003007468 A JP 2003007468A JP 2003007468 A JP2003007468 A JP 2003007468A JP 4133357 B2 JP4133357 B2 JP 4133357B2
Authority
JP
Japan
Prior art keywords
image data
data
pixel data
encoding
pixel
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
JP2003007468A
Other languages
Japanese (ja)
Other versions
JP2004221986A (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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2003007468A priority Critical patent/JP4133357B2/en
Publication of JP2004221986A publication Critical patent/JP2004221986A/en
Application granted granted Critical
Publication of JP4133357B2 publication Critical patent/JP4133357B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像符号化装置および画像符号化方法に関し、特に、段階的に縮小された解像度の異なる画像データを符号化する符号化装置およびその方法に関する。
【0002】
【従来の技術】
従来、画像符号化方法として、1つの画像データから複数の解像度の画像データを生成して、階層的に符号化する方法がある。この画像符号化方法は、画像データそのものを最下位階層とし、その階層より解像度の低い画像データを上位の階層の画像データとして生成する処理を繰返すことにより、上位の階層の画像データほど程解像度が低い、いわゆるピラミッド型の複数階層の画像データを生成する。そして、生成された各階層の画像データをそれぞれ圧縮するために符号化する(例えば、特許文献1参照)。
【0003】
【特許文献1】
特許第3337160号公報
【0004】
【発明が解決しようとする課題】
しかしながら、ピラミッド型の複数階層の画像データを符号化する画像符号化方法では、画像データから生成された複数の階層それぞれに対応する解像度の画像データのすべてについて符号化するため、符号化処理の対象となるデータ量が膨大となる。このため、最下位の階層の画像データのみを符号化する場合と比較して、符号化後のデータ量が大きくなるという問題がある。
【0005】
また、ピラミッド型の複数階層の画像データが符号化されたデータを復号する画像復号方法では、必要とする解像度に対応した階層を指定するだけで、その階層の符号化データだけを復号すれば、所望の解像度の画像データを得ることができる。しかしながら、指定した階層に対応する解像度の画像データのすべてを復号しなければならない。このため、画像の局所的な領域のみを必要とする場合には、不必要な部分まで復号しなければならず、復号に不要な時間を費やしてしまうといった問題がある。
【0006】
この発明は上述の問題点を解決するためになされたもので、この発明の目的の1つは、ピラミッド型の複数階層の画像データを効率的に符号化するとともに、圧縮率を向上させた画像符号化装置を提供することである。
【0008】
【課題を解決するための手段】
上述の目的を達成するためにこの発明のある局面によれば、画像符号化装置は、画像データに含まれる画素データの一部を間引いて画像データを縮小することにより解像度が低い、階層レベルが上位の画像データを生成する画像縮小手段と、
階層レベルが上位の画像データから順に処理対象とする処理画像データを選択する選択手段と、
処理対象となる処理画像データを、前記処理画像データより階層レベルが上位の画像データに含まれる画素データを少なくとも1つ含むブロックに分割する分割手段と、
前記分割手段により分割されたブロック毎に、該ブロックに含まれる画素データのうち階層レベルがより上位の画像データに含まれる画素データを除く画素データを符号化対象画素データとして復元可能に符号化するための符号化手段と
2次元に配列された前記符号化対象画素データを予め定められた所定の順序で1次元に配列された画素データに並替える並替手段とを備え
前記符号化手段は、参照部と符号化部とを備える適応型辞書法に基づく符号化方式を用いて符号化し、
前記並替手段は、前記符号化対象画素データを、2次元に配列された画素位置の横方向に隣接する順に横方向に配列し、該横方向に画素データがなくなると、次の行の画素データを横方向に配列する処理、または2次元に配列された画素位置の縦方向に隣接する順に縦方向に配列し、該縦方向に画素データがなくなると、次の列の画素データを縦方向に配列する処理を、ブロック内の前記符号化対象画素データがなくなるまで繰り返すことにより1次元に配列し、
前記分割手段は、前記並替手段が1次元に配列するブロックの横方向の1行内または縦方向の1列内に含まれる画素数と階調を表す画素データのビット数との積を、前記符号化方式の参照部に格納されるデータ数および前記符号化方式の符号化部に格納されるデータ数よりそれぞれ小さいブロックに分割する
【0009】
この発明に従えば、階層レベルが上位の画像データから順に処理対象とする処理画像データが選択され、処理画像データが、当該処理画像データより階層レベルが上位の画像データに含まれる画素データを少なくとも1つ含むブロックに分割され、分割されたブロック毎に、該ブロックに含まれる画素データのうち階層レベルがより上位の画像データに含まれる画素データを除く画素データが符号化対象画素データとして復元可能に符号化される。並替手段の働きにより、2次元に配列された符号化対象画素データが予め定められた所定の順序で1次元に配列された画素データに並替えられる。符号化手段には、参照部と符号化部とを備える適応型辞書法に基づく符号化方式が用いられて符号化される。並替手段の働きにより、符号化対象画素データが、2次元に配列された画素位置の横方向に隣接する順に横方向に配列され、該横方向に画素データがなくなると、次の行の画素データを横方向に配列される処理が、または2次元に配列された画素位置の縦方向に隣接する順に縦方向に配列され、該縦方向に画素データがなくなると、次の列の画素データを縦方向に配列される処理が、ブロック内の符号化対象画素データがなくなるまで繰り返されることにより1次元に配列される。分割手段の働きにより、並替手段が1次元に配列するブロックの横方向の1行内または縦方向の1列内に含まれる画素数と階調を表す画素データのビット数との積が、符号化方式の参照部に格納されるデータ数および符号化方式の符号化部に格納されるデータ数よりそれぞれ小さいブロックに分割される。階層レベルが下位の画像データを符号化する際には、より上位の画像データに含まれる画素データが除かれるので、符号化の対象となる画素データを少なくすることができ、圧縮率を向上させることができる。また、ブロック単位で符号化するため、復号する際に部分的に復号することができる。また、符号化の対象とされる画素データが、予め定められた所定の順序で並替えられるので、圧縮率をさらに向上させることができる。さらに、符号化方式の参照部にブロックの横方向の1行内または縦方向の1列内に隣接する画素データのすべてが格納されるので、圧縮率を向上させることができ、符号化方式の符号化部にブロックの横方向の1行内または縦方向の1列内に隣接する画素データのすべてが格納されるので、効率よく符号化することができる。その結果、画像データを効率的に符号化するとともに、圧縮率を向上させた画像符号化装置を提供することができる。
【0018】
この発明のさらに他の局面によれば、画像符号化方法は、画像データに含まれる画素データの一部を間引いて画像データを縮小することにより解像度が低い階層レベルが上位の画像データを生成するステップと、
階層レベルが上位の画像データから順に処理対象とする処理画像データを選択するステップと、
処理対象となる処理画像データを、前記処理画像データより階層レベルが上位の画像データに含まれる画素データを少なくとも1つ含むブロックに分割するステップと、
前記分割ステップにより分割されたブロック毎に、該ブロックに含まれる画素データのうち階層レベルがより上位の画像データに含まれる画素データを除く画素データを符号化対象画素データとして復元可能に符号化するステップと
2次元に配列された前記符号化対象画素データを予め定められた所定の順序で1次元に配列された画素データに並替えるステップとを含み、
前記符号化するステップは、参照部と符号化部とを備える適応型辞書法に基づく符号化方式を用いて符号化し、
前記並替えるステップは、前記符号化対象画素データを、2次元に配列された画素位置の横方向に隣接する順に横方向に配列し、該横方向に画素データがなくなると、次の行の画素データを横方向に配列する処理、または2次元に配列された画素位置の縦方向に隣接する順に縦方向に配列し、該縦方向に画素データがなくなると、次の列の画素データを縦方向に配列する処理を、ブロック内の前記符号化対象画素データがなくなるまで繰り返すことにより1次元に配列し、
前記分割するステップは、前記並替えるステップが1次元に配列するブロックの横方向の1行内または縦方向の1列内に含まれる画素数と階調を表す画素データのビット数との積を、前記符号化方式の参照部に格納されるデータ数および前記符号化方式の符号化部に格納されるデータ数よりそれぞれ小さいブロックに分割する
【0019】
この発明に従えば、階層レベルが下位の画像データを符号化する際には、より上位の画像データに含まれる画素データが除かれるので、符号化の対象となる画素データを少なくすることができる。また、ブロック単位で符号化するため、復号する際に部分的に復号することができる。また、符号化の対象とされる画素データが、予め定められた所定の順序で並替えられるので、圧縮率をさらに向上させることができる。さらに、符号化方式の参照部にブロックの横方向の1行内または縦方向の1列内に隣接する画素データのすべてが格納されるので、圧縮率を向上させることができ、符号化方式の符号化部にブロックの横方向の1行内または縦方向の1列内に隣接する画素データのすべてが格納されるので、効率よく符号化することができる。その結果、画像データを効率的に符号化する画像符号化方法を提供することができる。
【0022】
【発明の実施の形態】
以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがってそれらについての詳細な説明は繰返さない。
【0023】
図1は、本発明の実施の形態の1つにおける画像変換装置100の機能の概略を示すブロック図である。図1を参照して、画像変換装置100は、画像データを圧縮するために符号化する符号化処理部104と、符号化処理部104により符号化されたデータを復号するための復号処理部105と、符号化処理部104および復号処理部105で実行されるプログラムが入力されるプログラム入力部102と、処理対象となる画像データが入力される画像入力部103と、復号された画像データを出力するための画像出力部106と、プログラムやデータを記憶するための記憶部107と、ユーザからの操作の入力を受付けるための指示入力部101とを含む。
【0024】
また、画像変換装置100は、画像データを光学的に読取って電子データに変換して出力するスキャナ108と、画像データを出力するためのディスプレイ110およびプリンタ111と、外部記憶装置112と、ネットワークインターフェース109と接続されている。
【0025】
画像入力部103は、スキャナ108、ネットワークインターフェース109または外部記憶装置112と接続されており、これらから画像データが入力される。画像入力部103は、また、符号化処理部104と接続されており、入力された画像データを符号化処理部104に出力する。
【0026】
符号化処理部104は、プログラム入力部102と接続されており、プログラム入力部102から受信した符号化プログラムを実行することにより、画像入力部103から出力されてきた画像データを圧縮するために画像データを符号化する処理を実行する。この処理は、画像データからピラミッド型の階層をなす複数の解像度の画像データを生成する処理と、生成された複数の解像度の画像データを圧縮するための符号化処理とが含まれる。符号化処理部104は、記憶部107と接続されており、符号化されたデータを記憶部107に記憶する。符号化処理部104は、また、指示入力部101と接続されており、指示入力部101で受付けられたユーザの操作に基づいて、上述の処理を実行する。
【0027】
復号処理部105は、プログラム入力部102および記憶部107と接続されており、プログラム入力部102から受信した復号プログラムを実行することにより、符号化処理部104で復号化されたデータを記憶部107から読出し、復号する。なお、別の画像変換装置で符号化されたデータが、ネットワークインターフェース109を介して受信され、または、外部記憶装置112から読出されて記憶部107に記憶されている場合には、そのような符号化データを復号することも可能である。
【0028】
復号処理部105は、また、指示入力部101と接続されており、指示入力部101で受付けられたユーザの操作に基づいて、符号化データを復号する。
【0029】
外部記憶装置112は、フレキシブルディスク(FD)、コンパクトディスク(CD)、ミニディスク(MD)またはハードディスク(HD)等の記録媒体に対して、画像データ、符号化された画像データまたはプログラムの読出しまたは書込みする。外部記憶装置112は、画像出力部106、記憶部107、プログラム入力部102および画像入力部103と接続され、これらから送信されてきたデータまたはプログラムを記録媒体に書込む。また、記録媒体に記録された画像データまたは符号化された画像データを読出して、記憶部107または画像入力部103に送信する。さらに、記録媒体に記録されたプログラムを読出して、プログラム入力部102に送信する。
【0030】
ネットワークインターフェース109は、ローカルエリアネットワークやインターネット等の通信網と画像変換装置100とを接続するためのインターフェースである。画像変換装置100は、通信網に接続された他のコンピュータとの間で通信することが可能となり、画像データ、符号化された画像データまたはプログラムを、他のコンピュータとの間で送受信する。
【0031】
スキャナ108は、画像入力部103と接続されており、読取った画像データを画像入力部103に出力する。ディスプレイ110およびプリンタ111は、画像出力装置106と接続されており、画像出力装置106から出力される画像データを表示または印刷する。
【0032】
このように構成してなる画像変換装置100は、一般的に知られているコンピュータで実現することが可能である。コンピュータ自体のハード構成およびその動作は周知であるので、ここでは説明を繰返さない。
【0033】
次に、本実施の形態における画像変換装置100の符号化処理部104で実行される処理を説明する。符号化処理部104は、画像データからピラミッド型の階層をなす複数の解像度の画像データを生成する処理と、生成された複数の解像度の画像データを圧縮するための符号化処理とを実行する。まず、複数の解像度の画像データを生成する処理を説明する。
【0034】
符号化処理部104では、処理対象となる画像データに基づき、解像度が低い画像データを生成することにより、ピラミッド型の複数階層の画像データを生成する。画像データは、画素データが二次元に配列されたデータからなる。画素データは、2値であっても、多値であってもよい。図2は、画像データを画素の位置を示す符号を付して示した図である。図2を参照して、画素データは、図中X方向に8列、図中Y方向に8行の行列で表される。図中に示される2桁の数字は、画素の位置を示し、十の位が行を、一の位が列を示す。図では、X方向に0列〜7列、Y方向に0行〜7行の行列を示している。、例えば、「00」は0行0列の画素を示し、「13」は1行3列の画素を示し、「77」は7行7列の画素を示す。
【0035】
図3は、ピラミッド型の2階層の画素データを示す図である。図3に示す画像データは、図2に示した画像データに基づき生成される各階層の画素データを示す。従って、図3に示す画像データの画素の位置は、図2に示した画像データの各画素に付された位置で示している。
【0036】
図3(a)は、第2階層の画像データを示し、図3(b)は第1階層の画像データを示す。第1階層の画像データは図2に示した画像データと解像度が同じで、第2階層の画像データは第1階層の画像データに対してX方向およびY方向にそれぞれ1/2の解像度である。第2階層の画像データは、第1階層の画像データよりも解像度が低く、上位の階層の画像データである。
【0037】
第2階層の画像データは、図2に示した画像データの画素を間引く縮小処理を実行することにより生成される。間引く画素は、処理前の画像データと生成する画像データの解像度により定まる。解像度をX方向に1/2にする場合には、1つおきに間引けば良く、X方向に2/3にする場合には2つおきに間引けば良い。
【0038】
図4は、ピラミッド型の3階層の画素データを示す図である。図4に示す画像データは、図2に示した画像データに基づき生成される各階層の画素データを示す。従って、図4に示す画像データの画素の位置は、図2に示した画像データの各画素に付された位置で示している。
【0039】
図4(a)は、第3階層の画像データを示し、図4(b)は第2階層の画像データを示し、図4(c)は第1階層の画像データを示す。第1階層の画像データは図2に示した画像データと解像度が同じで、第2階層の画像データは第1階層の画像データに対してX方向およびY方向にそれぞれ1/2の解像度である。第3階層の画像データは第2階層の画像データに対してX方向およびY方向にそれぞれ1/2の解像度である。
【0040】
したがって、第2階層の画像データは、第1階層の画像データよりも解像度が低く上位の階層の画像データである。同様に、第3階層の画像データは、第2階層の画像データよりも解像度が低く上位の階層の画像データである。第1階層の画像データよりも上位の階層の画像データには、第2階層の画像データと第3階層の画像データが含まれる。
【0041】
第2階層の画像データは、図2に示した画像データの画素を間引く縮小処理を実行することにより生成され、第3階層の画像データは、第2階層の画像データの画素を間引く縮小処理を実行することにより生成される。
【0042】
次に符号化処理について説明する。符号化処理は、各階層の画像データをブロックに分割して、分割したブロックごとに符号化する。まず、ブロック分割について、図3および図4を用いて説明する。ブロック分割の条件は、ある階層の画像データのブロックそれぞが、より上位の階層の画像データの画素を少なくとも1つ含むことである。まず、図3を用いて説明する。図3(b)に示す第1階層の画像データを、X方向に4分割、Y方向に4分割し、ブロックA00〜A33が生成される。ブロックもまた行列で表すことができる。このため、ブロックに付された符号は、「A」が第1階層の画像データのブロックを示し、その後数字の十の位が列方向(X方向)の位置、一の位が行方向(Y方向)の位置を示している。例えば、ブロックA00は、第1階層の画像データの0行0列の位置を示す。ここでは、各ブロックは、X方向の画素数が2、Y方向の画素数が2のブロックとされる。
【0043】
図3(a)に示す第2階層の画像データを、X方向に2分割、Y方向に2分割し、ブロックB00〜B11が生成される。ブロックに付された符号は、「B」が第2階層の画像データのブロックを示し、その後数字の十の位が列方向(X方向)の位置、一の位が行方向(Y方向)の位置を示している。例えば、ブロックB00は、第2階層の画像データの0行0列の位置を示す。ここでは、各ブロックは、X方向の画素数が2、Y方向の画素数が2のブロックとされる。
【0044】
図3から明らかなように、、第2階層の画像データに含まれるブロックのそれぞれは、下位の第1階層の画像データのブロックをそれぞれ4つ含んでいる。第1階層の画像データの各ブロックA00〜A33それぞれは、第2階層の画像データの画素を1つ含んでいる。たとえば、ブロックA00には、第2階層の画像データの位置「00」の画素データが含まれ、ブロックA21には、第2階層の画像データの位置「42」の画素データが含まれ、ブロックA33には、第2階層の画像データの位置「66」の画素データが含まれる。
【0045】
図4に示した3階層の画像データにおいては、第1階層および第2階層の画像データは、上述した図3に示した2階層の画像データと同様である。図4(a)に示す第3階層の画像データは、画素数が少ないためブロックに分割されない。ブロックに付された符号は、「A」が第1階層の画像データのブロックを示し、「B」が第2階層の画像データのブロックを示し、「C」が第3階層の画像データのブロックを示し、それぞれの後の数字は十の位が列方向(X方向)の位置、一の位が行方向(Y方向)の位置を示している。例えば、ブロックA00は、第1階層の画像データの0行0列の位置を示す。ここでは、各ブロックは、X方向の画素数が2、Y方向の画素数が2のブロックとされる。
【0046】
図4から明らかなように、第3階層の画像データに含まれるブロックそれぞれは、第2階層の画像データのブロックを4つ含んでおり、第2階層の画像データに含まれるブロックそれぞれは、第1階層の画像データのブロックを4つ含んでいる。第1階層の画像データの各ブロックA00〜A33それぞれは、第2階層の画像データの画素を1つ含んでいる。第1階層の画像データのブロックと第2階層の画像データの画素との関係は、図3を用いて説明した2階層の画像データの場合と同様である。第2階層の画像データの各ブロックB00〜B11のそれぞれは、第3階層の画像データの画素を1つ含んでいる。ブロックB00には、第3階層の画像データの位置「00」の画素データが含まれ、ブロックB01には、第3階層の画像データの位置「04」の画素データが含まれ、ブロックB10には、第3階層の画像データの位置「40」の画素データが含まれ、ブロックB11には、第3階層の画像データの位置「44」の画素データが含まれる。
【0047】
なお、本実施形態では各階層におけるブロックサイズを2のべき乗としているが、上位階層におけるブロックが下位階層における複数のブロックを包含する構造であれば、本発明はこれに限ったものではない。
【0048】
このようにブロックに分割された画像データは、ブロック毎に符号化される。この符号化の際に、対象となる画素データは、より上位の階層の画像データに含まれる画素データを含まない。また、符号化は、辞書に基づく復元可能な符号化方式が用いられる。本実施の形態においては、LZ77符号化方式を用いている。さらに、辞書に基づく符号化方式では1次元に配列されたデータを符号化するため、2次元に配列された画素データを1次元に配列しなおす必要がある。このため、本実施の形態においては、2次元に配列された画素データをブロック毎に1次元に配列する。より具体的には、ブロックに含まれる画素データのうちより上位に含まれる画素データを除く画素データを、上位に含まれる画素データの近傍で連続するように配列する処理を、ブロック内の画素データが無くなるまで繰返すことにより1次元に配列する。
【0049】
画像データは、ある画素の周辺の画素が同じ値となることが多く、横方向および縦方向に同じ値の画素データで配列されることが多い。本実施の形態においては、画像データをブロックに分割するので、横方向(X方向)に連続する画素データの数が、ブロックに分割しない場合に比較して少なくなる。このため、1次元に配列された画素データは、縦方向(Y方向)に隣接する画素データが比較的近くに配列される。したがって、LZ77の符号化方式において、参照部にブロックの横方向に隣接する画素データのすべてが格納されるので、圧縮率を向上させることができる。ブロックの横方向の大きさは、参照部に格納されるデータ数より小さいことが望ましい。
【0050】
これについてさらに詳細に説明する。画像データの横方向(X方向)の画素数をW(ドット)、画素データのビット数(階調を表す)をk(ビット)、LZ77アルゴリズムにおける参照部の長さをN(ビット)、LZ77の符号化部の長さをF(ビット)とする。画像データ全体をライン単位で1次元に配列する従来のラスタ順(画素順)でLZ77アルゴリズムを適用すると、画像データの左上にある位置「00」の画素(以下「着目画素」という)に着目し、同じ列で次の行にある位置「10」の画素を符号化する場合に、着目画素が参照部にあるためにはk×W<Nが成立しなければならない。同様にして同じ列でさらに次の行にある位置「20」の画素を符号化する場合に、着目画素が参照部にあるためにはk×2W<nが成立しなければならない。これは、次の行の画素が縦方向(Y方向)の近傍にありながらも符号化を行う際に参照部に存在する確率は1画素離れただけで非常に小さくなることを意味する。
【0051】
本実施の形態におけるブロックの横方向の画素数はL(ドット)なので、L<Wが成立する。このようにすることで、縦方向の近傍にある画素が参照部に存在する確率が高くなる。画像データには2次元的な相関関係があるため、縦近傍の画素が参照部に存在する確率が高くなることで符号化部における最長一致がより長くなる確率が高くなるといえる。さらに近傍のL画素は同系列の記号列で一致する確率が高いといえる。よって、符号化を行う際にL画素分を参照部と比較できたほうがよい。したがって、符号化部の長さに収まること、すなわち、L×k<Fが成立すれば効率よく符号化することができる。また、L=1(ドット)の場合、ラスタ順を縦型としたものと同様となるため、折り返すことによる効果は得られない。したがって、ブロックの1辺の画素数Lは、次式を満たすことが望まれる。 k<L×k<F
1<L<F/k、L<W … (1)
また、LZ77アルゴリズムのような適応型辞書法では、初期状態で参照すべき辞書がないと圧縮よりも伸張が起こる可能性があり、十分に長い記号列に対して効果的な圧縮が得られる。十分に長い記号列に対して効果的な圧縮が得られる理由は参照すべき辞書が十分に得られるためだからである。すなわち、LZ77アルゴリズムの参照部の大きさを十分にうめるだけの記号列があれば、効果的な圧縮が得られる。したがって、符号化を行う1ブロック内の容量(画素数)が、参照部の大きさ以上となるようなブロックサイズを設定することで効果的な圧縮が得られる。例えば、最下位の階層について説明すると、ブロックサイズをS(ドット)、1画素をk(ビット)、LZ77アルゴリズムの参照部の大きさをN(ドット)、ブロックを正方形であるとすると、次の式からブロックサイズSを求めることができる。
【0052】
S×S×k×3/4>N
S>√(4×N/(3×k))…(2)
なお、1次元への配列は、画素データを縦方向(Y方向)に配列し、縦方向に画素データがなくなると、次の列の画素データを縦方向に配列する処理を、ブロック内の画素データがなくなるまで繰り返すことにより1次元に配列するようにしてもよい。この場合には、ブロックの縦方向の大きさは、参照部に格納されるデータ数より小さいことが望ましい。
【0053】
さらに、1次元への配列は、横に隣接する画素そして縦に隣接する画素の順、または、縦に隣接する画素、横に隣接する画素の順にジグザグに配列するようにしてもよい。いずれにしても、縦方向に隣接画素と横方向に隣接する画素が参照部に格納されるデータ数より小さくなる間隔で配列されればよく、そのような配列順を予め定めておけばよい。
【0054】
図5は、2階層の画像データにおいて符号化対象となる画素データを示す図である。図5では、図3に示した2階層の画像データについて示している。図5(a)を参照して、第2階層の画像データについては、そのすべての画素データが符号化の対象となる。上位の階層の画像データが存在しないからである。図5(b)を参照して、第1階層の画像データは、第2階層の画像データに含まれる画素データをのぞく画素データが符号化の対照となる。例えば、ブロックA00に含まれる画素データには、位置「00」、「01」、「10」、「11」があるが、位置「00」の画素データは第2階層の画像データに含まれるので、符号化の対象とはならない。このように、下位の階層において符号化のとなるデータ数を少なくすることにより、圧縮率を向上させることができる。
【0055】
図6は、3階層の画像データにおいて符号化対象となる画素データを示す図である。図6では、図4に示した3階層の画像データについて示している。図6(a)を参照して、第3階層の画像データについては、そのすべての画素データが符号化の対象となる。上位の階層の画像データが存在しないからである。図6(b)を参照して、第2階層の画像データは、第3階層の画像データに含まれる画素データを除く画素データが符号化の対照となる。例えば、ブロックB00に含まれる画素データには、位置「00」、「02」、「20」、「22」があるが、位置「00」の画素データは第3階層の画像データに含まれるので、符号化の対象とはならない。図6(c)を参照して、第1階層の画像データは、第2階層および第3階層の画像データに含まれる画素データを除く画素データが符号化の対照となる。例えば、ブロックA00に含まれる画素データには、位置「00」、「01」、「10」、「11」があるが、位置「00」の画素データは第2階層の画像データに含まれるので、符号化の対象とはならない。また、ブロックA01に含まれる画素データには、位置「02」、「03」、「12」、「13」があるが、位置「02」の画素データは第2階層の画像データに含まれるので、符号化の対象とはならない。このように、下位の階層(例えば第1の階層)の画像データにおいて、符号化の対象となる画素データは、より上位の階層(第2および第3の階層)の画像データに含まれる画素データを含まない。
【0056】
図7は、本実施の形態における画像変換装置100の符号化処理部104で実行される符号化処理の流れを示すフローチャートである。ここでは説明のため、図2に示した画像データを2階層の画像データで符号化する場合を例に説明する。図7を参照して、符号化処理では、まず、符号化する階層の指定が受付けられる(ステップS01)。階層の指定は、ユーザが指示入力部101を操作することにより入力される。ここでは、画像データを2階層で説明することとしたので、ステップS02で指定されるのは2階層である。
【0057】
そして、符号化するブロックサイズの指定が受付けられる(ステップS02)。ブロックサイズの指定は、ユーザが指示入力部101を操作することにより入力される。上述したように、ブロックの1辺の画素数は式(1)、ブロックサイズは式(2)を満たすことが望ましい。ここでは、縦×横が2×2のブロックサイズが指定されたとする。なお、ステップS01またはステップS02において指示がない場合は、プログラム入力部102に入力されたプログラムに記憶されている初期設定を用いることとなる。
【0058】
次に、符号化処理の対象となる画像データが画像入力部、または記憶部107から読込まれる(ステップS03)。そして、最上位レベルの階層が設定される(ステップS04)。ステップS04では、ステップS01で指定された階層(2階層)の数だけ、各階層の画像データを、ステップS03で入力された画像データを間引きによる縮小処理を実行することにより生成し、最上位の階層の画像データを処理対象の画像データに設定する。ここでは、ステップS03で入力された画像データが最下位の第1階層の画像データとされる。そして、指定された階層が2階層であるため、第2階層の画像データが生成される。さらに、最上位の第2階層の画像データが処理対象の画像データに設定される。 次に処理対象の画像データにおけるブロックサイズが設定される(ステップS05)。ステップS05では、ステップS02で指定されたブロックサイズに基づき、処理対象の画像データのブロックサイズが設定される。ここでは、図3(a)に示した、縦×横が2×2のブロックサイズが設定されることになる。そして、設定されたブロックサイズに基づいて、処理対象の画像データがブロックに分割される(ステップS06)。
【0059】
次に、分割されたブロックのうち符号化されていないブロックが設定される(ステップS07)。ここでは、図3(a)に示した4ブロックB00,B01,B10,B11のうちからブロックB00が設定されたとする。設定されたブロックの画素データが並替えられ(ステップS08)、並替えられた画素データがLZ77アルゴリズムに従って符号化される(ステップS09)。画素データの並替えは、図5(a)に示す矢印の順である。
【0060】
次のステップS10では、処理対象の画像データに含まれるすべてのブロックについて符号化が終了したかどうかが判定される(ステップS10)。すべてのブロックについての符号化が終了していない場合、それらのブロックのうちいずれかを処理対象のブロックに設定し、設定されたブロックに対してステップS07からステップS09の処理を繰り返し実行する。処理対の画像データのすべてのブロックについてステップS07からステップS09の処理が終了した場合、ステップS11に進む。
【0061】
ステップS11では、下位の階層の画像データが存在するか否かが判断される。下位の階層の画像データが存在する場合には、その下位の階層の画像データを処理対象の画像データに設定して(ステップS12)、ステップS05〜ステップS10の処理を実行する。下位の階層の画像データが存在しない場合、すなわち、第1階層の画像データについてステップS05〜ステップS10の処理が実行された場合には、処理を終了する。この際、符号化された符号化データは符号化処理部104から記憶部107へ入力され、記憶される。
【0062】
記憶部107へ記憶される際に、符号化されたデータは、階層毎およびブロック毎に分類されて記憶される。この分類するための情報は、符号化されたデータのヘッダ部分に含まれる。すなわち、このヘッダ部分には、どの階層のどのブロックがどの符号化データに該当するかの情報を含む。したがって、このヘッダ部分の情報を得ることにより、任意の階層の任意のブロックの符号化データのみを得ることができる。
【0063】
第1階層の画像データが処理対象とされた場合、ステップS05におけるブロックサイズは、縦×横が2×2となる。これは、ステップS02で指定されたブロックサイズである。また、ステップS09における符号化においては、第1階層の画像データに含まれる画素データは符号化の対象とされない。また、ステップS08における並替えは、図5(b)の矢印で示す順に並替えられる。
【0064】
画像データを3階層の画像データとして符号化する場合は、ステップS05からステップS11までの処理が、第3階層の画像データから第2階層、第1階層の画像データの順に、それぞれの階層の画像データに対して繰り返し実行される。
【0065】
第3階層の画像データが処理対象とされた場合、ステップS05におけるブロックサイズは、縦×横が2×2となる。そして、ステップS09における符号化においては、第3階層の画像データに含まれるすべての画素データが対象となる。また、ステップS08における並替えは、図6(c)の矢印で示す順に並替えられる。
【0066】
第2階層の画像データが処理対象とされた場合、ステップS05におけるブロックサイズは、縦×横が2×2となる。そして、ステップS09における符号化においては、第3階層の画像データに含まれる画素データは対象とならない。また、ステップS08における並替えは、図6(b)の矢印で示す順に並替えられる。
【0067】
第1階層の画像データが処理対象とされた場合、ステップS05におけるブロックサイズは、縦×横が2×2となる。そして、ステップS09における符号化においては、第2階層および3階層の画像データに含まれる画素データは対象とならない。また、ステップS08における並替えは、図6(a)の矢印で示す順に並替えられる。
【0068】
以上説明したように本実施の形態における画像変換装置100は、下位階層の画像データを符号化する際に、既に符号化された上位階層の画像データを重複して符号化することがない。このため、符号化する画素データは、入力された画像データ、すなわち最下位の画像データ(第1階層の画像データ)の画素数から増加することはない。より具体的には、図5(b)を参照して、最下位の第1階層の画像データは、元の画像データの4分の3の画素データからなる。このため、符号化の対象となる画素データ数を少なくすることで、圧縮容量を削減することができる。
【0069】
また、2次元に配列された画素データを1次元に並替える順番は、各階層の画像データにおいて隣接する画素の順番とするので、類似した系列の画素が連続するようになる。これにより、LZ77のような可変長の記号列を固定長もしくは可変長の符号語に変換する手法において、より長い可変長の記号列を固定長もしくは可変長の符号語に変換することができる。即ち、最長一致系列を検索するような辞書に基づく符号化方式によって効率良く符号化されるので、圧縮容量を削減することができる。
【0070】
図8は、本実施の形態における画像変換装置100の復号処理部105で実行される復号処理の流れを示すフローチャートである。復号処理部105は、復号処理プログラムがプログラム入力部102から復号処理部105へ入力される。復号処理プログラムは、外部記憶装置112、または、ネットワークインターフェース109から入力される。また、記憶部107に記憶しておくようにしても良い。
【0071】
図8を参照して、復号処理ははじめに復号したい階層レベルの指定が受付けられる(ステップS21)。階層レベルとは、復号の対象となる画像の解像度に対応する階層を示す。階層レベルと解像度との関係を、符号化データのヘッダ部に記憶しておくようにすれば、そのヘッダ部を読取り、画像出力部106からディスプレイ110に表示することにより、ユーザに知らせることができる。また、ユーザが解像度を指定することにより、ヘッダ部に記憶された情報を基にして階層レベルを決定するようにしてもよい。
【0072】
次に復号の対象となる領域の指定が受付けられる(ステップS22)。階層レベルの指定および復号対象領域の指定は、ユーザが指示入力部101を操作することにより入力される。復号対象領域は、符号化の際に処理単位とされたブロック単位でもよいし、複数のブロックを含んでもよい。
【0073】
次に指定された階層レベルおよび領域に対応する符号化データが読込まれる(ステップS23)。指定された階層レベルおよび領域に対応する符号化データは、符号化データのヘッダ部に含まれる情報から特定される。また、指定された階層レベルおよび領域に対応する符号化データは、指定された階層レベルの指定された領域に含まれるブロックに対応する符号化データに加えて、そのブロックを含む上位の階層の画像データのブロックに対応する符号化データも含まれる。より具体的には、3階層の画像データで符号化されたデータについて図6を用いて説明すると、指定された階層レベルが第1階層、指定された領域がブロックA00とすると、読出される符号化データは、ブロックA00の画素データを符号化した符号化データに加えて、ブロックA00を含む第2階層の画像データのブロックB00および第1階層の画像データのブロックC00の画素データを符号化した符号化データが含まれる。以下、これらの符号化データが読込まれた場合を例に説明する。
【0074】
次に、最上位の階層の符号化データが処理対象データに設定される(ステップS24)。
【0075】
次のステップS25では、設定された処理対象データのうち復号されていないブロックが設定される。そして、設定されたブロックの符号化データが復号される(ステップS26)。この符号化データは復号されることにより1次元に配列された画素データが得られる。ステップS26では、復号された画素データが、階層レベルが最下位の第1階層の画像データに含まれるブロックの画素位置にそれぞれ割当てらる。これにより、1次元に配列された画素データが2次元に配列されることになる。
【0076】
そして、ステップS27では、設定された処理対象データのすべてのブロックについて復号されたか否かが判断され、真の場合にはステップS28に進み、偽の場合にはステップS25に進む。すなわち、設定された処理対象データのすべてのブロックについて復号されるまで、ステップS25とステップS26とが繰返し実行される。
【0077】
次に、復号されたブロックの画像が結合される(ステップS28)。処理対象の符号化データが複数のブロックからなる場合に実行される処理である。ブロックを結合するための情報、すなわちブロックの位置情報は、符号化データのヘッダ部に記憶されているため、この情報を参照して結合される。位置情報は、例えば、A00、A01などの行列で表現することができる。
【0078】
そして、復号されたブロックの画像が結合された画像を、上位の階層の復号された画像で補間する。ステップS24では、最上位の階層の符号化データが、第3階層の画像データを符号化したデータが該当し、ステップS25〜ステップS28までの処理が実行されると、図6(a)に示した画像データが復号される。この場合に、ステップS29においては、第3階層の画像データより上位の階層が存在しないため、何も実行しない。
【0079】
次のステップS30では、指定された階層レベルまで復号されたか否かが判断され、真の場合には処理を終了し、偽の場合にはステップS31に進む。復号された画像データは復号処理部105から画像出力部106または、記憶部107に出力される。
【0080】
ステップS31では、処理対象の符号化データを次に下位の階層の符号化データに設定し、ステップS25に進む。第2階層の符号化データ、より具体的には、第2階層の画像データのブロックB00を符号化したデータが処理対象データとされ、ステップS27において、図6(b)に示したブロックB00の画素データが復号される。ブロックB00には、位置「00」の画素データが含まれないため、ステップS29において、上位の階層の画像データの位置「00」の画素データが補間される。これにより、補間された画像データは、位置「00」、「02」、「20」および「22」の画素データを含むことになる。
【0081】
さらに、ステップS31において、第3階層の符号化データ、より具体的には、第3階層の画像データのブロックA00を符号化したデータが処理対象データとされ、ステップS27において、図6(c)に示したブロックA00の画素データが復号される。ブロックA00には、位置「00」の画素データが含まれないため、ステップS29において、上位の階層の画像データの位置「00」の画素データが補間される。これにより、補間された画像データは、位置「00」、「01」、「10」「11」の画素データを含むことになる。なお、上述の処理で、位置「02」、「20」および「22」の画素データが復号されたが、指定された領域に含まれないため利用する必要はない。
【0082】
以上説明したように、本実施の形態における画像変換装置100では、符号化された画像データをブロック単位で復号するため、画像データの局所的な領域だけを復号することができる。また、不要な領域を復号することがないので、復号処理の処理速度を速くすることができる。
【0083】
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
【図面の簡単な説明】
【図1】 本発明の実施の形態の1つにおける画像変換装置の機能の概略を示す機能ブロック図である。
【図2】 画像データを画素の位置を示す符号を付して示した図である。
【図3】 ピラミッド型の2階層の画素データを示す図である。
【図4】 ピラミッド型の3階層の画素データを示す図である。
【図5】 2階層の画像データにおいて符号化対象となる画素データを示す図である。
【図6】 3階層の画像データにおいて符号化対象となる画素データを示す図である。
【図7】 本実施の形態における画像変換装置の符号化処理部で実行される符号化処理の流れを示すフローチャートである。
【図8】 本実施の形態における画像変換装置の復号処理部で実行される復号処理の流れを示すフローチャートである。
【符号の説明】
100 画像変換装置、101 指示入力部、102 プログラム入力部、103 画像入力部、104 符号化処理部、105 復号処理部、106 画像出力装置、106 画像出力部、107 記憶部、108 スキャナ、109 ネットワークインターフェース、110 ディスプレイ、111 プリンタ、112 外部記憶装置。
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to an image encoding apparatus.andImage coding methodTo the lawIn particular, an encoding apparatus for encoding image data with different resolutions reduced in stages and its methodTo the lawRelated.
[0002]
[Prior art]
Conventionally, as an image encoding method, there is a method of generating image data of a plurality of resolutions from one image data and encoding it hierarchically. In this image coding method, the image data itself is set to the lowest layer, and the process of generating image data having a lower resolution than that layer as the upper layer image data is repeated, so that the higher the layer image data, the higher the resolution. Low, so-called pyramid type multi-level image data is generated. Then, the generated image data of each layer is encoded for compression (see, for example, Patent Document 1).
[0003]
[Patent Document 1]
Japanese Patent No. 3337160
[0004]
[Problems to be solved by the invention]
However, in the image encoding method for encoding image data of a plurality of layers in a pyramid type, all of the image data having a resolution corresponding to each of the plurality of layers generated from the image data is encoded. The amount of data becomes enormous. For this reason, there is a problem that the amount of data after encoding becomes larger than when only the image data of the lowest hierarchy is encoded.
[0005]
In addition, in the image decoding method for decoding data in which image data of a plurality of layers of a pyramid type is encoded, if only a layer corresponding to a required resolution is specified and only the encoded data of that layer is decoded, Image data with a desired resolution can be obtained. However, all of the image data having the resolution corresponding to the designated hierarchy must be decoded. For this reason, when only a local region of an image is required, it is necessary to decode even an unnecessary part, and there is a problem that unnecessary time is consumed for decoding.
[0006]
The present invention has been made to solve the above-mentioned problems, and one of the objects of the present invention is to efficiently encode pyramid-type image data of a plurality of hierarchies and improve the compression rate. An encoding device is provided.
[0008]
[Means for Solving the Problems]
  In order to achieve the above-described object, according to one aspect of the present invention, an image encoding device reduces the image data by thinning out part of the pixel data included in the image data.Low resolution,Image reduction means for generating image data having a higher hierarchical level;
  Selecting means for selecting processing image data to be processed in order from image data having a higher hierarchical level;
  Processed image data to be processedAboveA dividing unit that divides the pixel data included in the image data having a higher hierarchical level than the processed image data into blocks including at least one;
  AboveFor each block divided by the dividing means, pixel data excluding pixel data included in image data having a higher hierarchical level among pixel data included in the block.As encoding target pixel dataEncoding means for encoding in a recoverable manner; and,
  Reordering means for reordering the encoding target pixel data arranged two-dimensionally into pixel data arranged one-dimensionally in a predetermined order;With,
  The encoding means is encoded using an encoding method based on an adaptive dictionary method including a reference unit and an encoding unit,
  The rearranging means arranges the encoding target pixel data in the horizontal direction in the order adjacent to the horizontal direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the horizontal direction, the pixel in the next row Processing to arrange data in the horizontal direction, or arrange in the vertical direction in the order adjacent to the vertical direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the vertical direction, the pixel data of the next column is Are arranged in a one-dimensional manner by repeating the processing to be arranged until the encoding target pixel data in the block is exhausted,
  The dividing means calculates the product of the number of pixels included in one row in the horizontal direction or one column in the vertical direction of the blocks arranged in one dimension by the rearranging means and the number of bits of pixel data representing gradation. Dividing into blocks each smaller than the number of data stored in the reference section of the encoding scheme and the number of data stored in the encoding section of the encoding scheme.
[0009]
  According to the present invention, processed image data to be processed is selected in order from image data having a higher hierarchical level, and the processed image data includes at least pixel data included in image data having a higher hierarchical level than the processed image data. The pixel data is divided into blocks including one, and for each divided block, pixel data excluding pixel data included in image data having a higher hierarchical level among pixel data included in the block is included.As encoding target pixel dataEncoded to be recoverable.By the function of the rearranging means, the encoding target pixel data arranged two-dimensionally is rearranged to the pixel data arranged one-dimensionally in a predetermined order. The encoding means is encoded using an encoding method based on an adaptive dictionary method including a reference unit and an encoding unit. By the function of the rearrangement means, the encoding target pixel data is arranged in the horizontal direction in the order adjacent to the horizontal direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the horizontal direction, the pixel in the next row When the processing for arranging the data in the horizontal direction or in the vertical direction of the pixel positions arranged in two dimensions is arranged in the vertical direction, and there is no pixel data in the vertical direction, the pixel data in the next column is The processing arranged in the vertical direction is repeated until the coding target pixel data in the block is exhausted, thereby arranging in one dimension. Due to the function of the dividing means, the product of the number of pixels included in one row in the horizontal direction or one column in the vertical direction of the block arranged in one dimension by the sorting means and the number of bits of the pixel data representing the gradation is Is divided into blocks smaller than the number of data stored in the reference unit of the encoding method and the number of data stored in the encoding unit of the encoding method.. When encoding image data with a lower hierarchical level, pixel data included in higher image data is removed, so that pixel data to be encoded can be reduced, and the compression rate is improved. be able to. Further, since encoding is performed in units of blocks, partial decoding can be performed when decoding.In addition, since the pixel data to be encoded is rearranged in a predetermined order, the compression rate can be further improved. Furthermore, since all of the adjacent pixel data is stored in one row in the horizontal direction or one column in the vertical direction of the block in the reference portion of the encoding method, the compression rate can be improved, and the code of the encoding method can be improved. Since all of the adjacent pixel data is stored in the conversion unit in one row in the horizontal direction or one column in the vertical direction, the encoding can be efficiently performed.As a result, it is possible to provide an image encoding device that efficiently encodes image data and improves the compression rate.
[0018]
  According to yet another aspect of the invention,imageThe encoding method has a low resolution by thinning out part of the pixel data included in the image data to reduce the image data.,Generating image data having a higher hierarchy level;
  Selecting processing image data to be processed in order from image data having a higher hierarchical level;
  Processed image data to be processedAboveDividing the pixel data included in the image data having a higher hierarchical level than the processed image data into blocks including at least one;
  AboveFor each block divided by the dividing step, pixel data excluding pixel data included in image data having a higher hierarchical level among pixel data included in the block.As encoding target pixel dataEncoding reversibly and,
  Rearranging the encoding target pixel data arranged two-dimensionally into pixel data arranged one-dimensionally in a predetermined order;IncludingSee
  The step of encoding is performed using an encoding method based on an adaptive dictionary method including a reference unit and an encoding unit,
  The rearranging step arranges the encoding target pixel data in the horizontal direction in the order adjacent to the horizontal direction of the two-dimensionally arranged pixel positions, and when there is no pixel data in the horizontal direction, the pixel in the next row Processing to arrange data in the horizontal direction, or arrange in the vertical direction in the order adjacent to the vertical direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the vertical direction, the pixel data of the next column is Are arranged in a one-dimensional manner by repeating the processing to be arranged until the encoding target pixel data in the block is exhausted,
  In the dividing step, a product of the number of pixels included in one row in the horizontal direction or one column in the vertical direction of the blocks arranged in one dimension in the rearrangement step and the number of bits of pixel data representing gradation is obtained. Dividing into blocks smaller than the number of data stored in the reference section of the encoding scheme and the number of data stored in the encoding section of the encoding scheme.
[0019]
  According to the present invention, when encoding image data with a lower hierarchical level, pixel data included in higher image data is removed, so that pixel data to be encoded can be reduced. . Further, since encoding is performed in units of blocks, partial decoding can be performed when decoding.In addition, since the pixel data to be encoded is rearranged in a predetermined order, the compression rate can be further improved. Furthermore, since all of the adjacent pixel data is stored in one row in the horizontal direction or one column in the vertical direction of the block in the reference portion of the encoding method, the compression rate can be improved, and the code of the encoding method can be improved. Since all of the adjacent pixel data is stored in the conversion unit in one row in the horizontal direction or one column in the vertical direction, the encoding can be efficiently performed.As a result, an image encoding method for efficiently encoding image data can be provided.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.
[0023]
FIG. 1 is a block diagram showing an outline of functions of an image conversion apparatus 100 according to one embodiment of the present invention. Referring to FIG. 1, an image conversion apparatus 100 includes an encoding processing unit 104 that encodes image data to compress it, and a decoding processing unit 105 that decodes data encoded by the encoding processing unit 104. A program input unit 102 to which programs executed by the encoding processing unit 104 and the decoding processing unit 105 are input, an image input unit 103 to which image data to be processed is input, and output decoded image data An image output unit 106 for storing an image, a storage unit 107 for storing a program and data, and an instruction input unit 101 for receiving an operation input from a user.
[0024]
The image conversion apparatus 100 also includes a scanner 108 that optically reads image data, converts it into electronic data, and outputs it, a display 110 and a printer 111 for outputting image data, an external storage device 112, and a network interface. 109 is connected.
[0025]
The image input unit 103 is connected to the scanner 108, the network interface 109, or the external storage device 112, from which image data is input. The image input unit 103 is also connected to the encoding processing unit 104 and outputs the input image data to the encoding processing unit 104.
[0026]
The encoding processing unit 104 is connected to the program input unit 102 and executes an encoding program received from the program input unit 102 to compress the image data output from the image input unit 103. A process for encoding data is executed. This process includes a process of generating image data having a plurality of resolutions forming a pyramid hierarchy from the image data, and an encoding process for compressing the generated image data having a plurality of resolutions. The encoding processing unit 104 is connected to the storage unit 107 and stores the encoded data in the storage unit 107. The encoding processing unit 104 is also connected to the instruction input unit 101, and executes the above-described processing based on a user operation received by the instruction input unit 101.
[0027]
The decoding processing unit 105 is connected to the program input unit 102 and the storage unit 107, and by executing the decoding program received from the program input unit 102, the data decoded by the encoding processing unit 104 is stored in the storage unit 107. Read from and decrypt. If data encoded by another image conversion device is received via the network interface 109 or read from the external storage device 112 and stored in the storage unit 107, such code is used. It is also possible to decrypt the digitized data.
[0028]
The decoding processing unit 105 is also connected to the instruction input unit 101, and decodes the encoded data based on a user operation accepted by the instruction input unit 101.
[0029]
The external storage device 112 reads or reads image data, encoded image data, or a program from a recording medium such as a flexible disk (FD), a compact disk (CD), a mini disk (MD), or a hard disk (HD). Write. The external storage device 112 is connected to the image output unit 106, the storage unit 107, the program input unit 102, and the image input unit 103, and writes data or programs transmitted from these to a recording medium. Further, the image data recorded on the recording medium or the encoded image data is read out and transmitted to the storage unit 107 or the image input unit 103. Further, the program recorded on the recording medium is read and transmitted to the program input unit 102.
[0030]
The network interface 109 is an interface for connecting the image conversion apparatus 100 and a communication network such as a local area network or the Internet. The image conversion apparatus 100 can communicate with another computer connected to a communication network, and transmits / receives image data, encoded image data, or a program to / from another computer.
[0031]
The scanner 108 is connected to the image input unit 103 and outputs the read image data to the image input unit 103. The display 110 and the printer 111 are connected to the image output device 106 and display or print image data output from the image output device 106.
[0032]
The image conversion apparatus 100 configured as described above can be realized by a generally known computer. Since the hardware configuration and operation of the computer itself are well known, description thereof will not be repeated here.
[0033]
Next, processing executed by the encoding processing unit 104 of the image conversion apparatus 100 in the present embodiment will be described. The encoding processing unit 104 executes processing for generating image data with a plurality of resolutions forming a pyramid hierarchy from image data, and encoding processing for compressing the generated image data with a plurality of resolutions. First, a process for generating image data having a plurality of resolutions will be described.
[0034]
The encoding processing unit 104 generates pyramid-type multi-level image data by generating image data with low resolution based on image data to be processed. Image data consists of data in which pixel data is two-dimensionally arranged. The pixel data may be binary or multi-valued. FIG. 2 is a diagram showing image data with reference numerals indicating pixel positions. Referring to FIG. 2, pixel data is represented by a matrix of 8 columns in the X direction in the figure and 8 rows in the Y direction in the figure. The two-digit number shown in the figure indicates the position of the pixel, the tens place indicates the row, and the first place indicates the column. In the figure, a matrix having 0 to 7 columns in the X direction and 0 to 7 rows in the Y direction is shown. For example, “00” indicates a pixel in 0 row and 0 column, “13” indicates a pixel in 1 row and 3 columns, and “77” indicates a pixel in 7 rows and 7 columns.
[0035]
FIG. 3 is a diagram showing two-layer pixel data of a pyramid type. The image data shown in FIG. 3 indicates pixel data of each layer generated based on the image data shown in FIG. Therefore, the position of the pixel of the image data shown in FIG. 3 is shown by the position attached to each pixel of the image data shown in FIG.
[0036]
FIG. 3A shows the image data of the second hierarchy, and FIG. 3B shows the image data of the first hierarchy. The image data of the first layer has the same resolution as the image data shown in FIG. 2, and the image data of the second layer has half the resolution in the X direction and the Y direction with respect to the image data of the first layer. . The image data of the second layer is lower in resolution than the image data of the first layer and is image data of the upper layer.
[0037]
The image data of the second hierarchy is generated by executing a reduction process for thinning out the pixels of the image data shown in FIG. The pixels to be thinned are determined by the resolution of the image data before processing and the image data to be generated. When the resolution is halved in the X direction, every other interval may be thinned out. When the resolution is 2/3 in the X direction, every other interval may be thinned out.
[0038]
FIG. 4 is a diagram showing pyramid-type three-layer pixel data. The image data shown in FIG. 4 indicates pixel data of each layer generated based on the image data shown in FIG. Therefore, the position of the pixel of the image data shown in FIG. 4 is shown by the position attached to each pixel of the image data shown in FIG.
[0039]
4A shows the image data of the third hierarchy, FIG. 4B shows the image data of the second hierarchy, and FIG. 4C shows the image data of the first hierarchy. The image data of the first layer has the same resolution as the image data shown in FIG. 2, and the image data of the second layer has half the resolution in the X direction and the Y direction with respect to the image data of the first layer. . The image data of the third layer has a resolution of 1/2 in the X direction and the Y direction with respect to the image data of the second layer.
[0040]
Therefore, the image data of the second hierarchy is lower-layer image data having a lower resolution than the image data of the first hierarchy. Similarly, the image data of the third layer is image data of an upper layer having a lower resolution than the image data of the second layer. The image data of the higher hierarchy than the image data of the first hierarchy includes the image data of the second hierarchy and the image data of the third hierarchy.
[0041]
The image data of the second hierarchy is generated by executing a reduction process for thinning out the pixels of the image data shown in FIG. 2, and the image data of the third hierarchy is subjected to a reduction process of thinning out the pixels of the image data of the second hierarchy. Generated by executing.
[0042]
Next, the encoding process will be described. In the encoding process, the image data of each layer is divided into blocks, and the divided blocks are encoded. First, block division will be described with reference to FIGS. 3 and 4. The condition for block division is that each block of image data in a certain layer includes at least one pixel of image data in a higher layer. First, it demonstrates using FIG. The image data of the first hierarchy shown in FIG. 3B is divided into four in the X direction and four in the Y direction, and blocks A00 to A33 are generated. Blocks can also be represented as matrices. For this reason, in the reference numerals attached to the blocks, “A” indicates a block of image data in the first layer, and then the tens place of the number is the position in the column direction (X direction), and the first place is the row direction (Y Direction). For example, the block A00 indicates the position of the 0th row and the 0th column of the first layer image data. Here, each block is a block having two pixels in the X direction and two pixels in the Y direction.
[0043]
The image data of the second hierarchy shown in FIG. 3A is divided into two in the X direction and two in the Y direction, and blocks B00 to B11 are generated. In the code attached to the block, “B” indicates a block of image data in the second layer, and then the tens place of the number is the position in the column direction (X direction), and the first place is the row direction (Y direction). Indicates the position. For example, the block B00 indicates the position of the 0th row and the 0th column of the second layer image data. Here, each block is a block having two pixels in the X direction and two pixels in the Y direction.
[0044]
As is apparent from FIG. 3, each of the blocks included in the second layer image data includes four blocks of the lower first layer image data. Each of the blocks A00 to A33 of the first layer image data includes one pixel of the second layer image data. For example, the block A00 includes the pixel data at the position “00” of the second layer image data, the block A21 includes the pixel data at the position “42” of the second layer image data, and the block A33. Includes pixel data at position “66” of the image data in the second layer.
[0045]
In the image data of the third hierarchy shown in FIG. 4, the image data of the first hierarchy and the second hierarchy are the same as the image data of the second hierarchy shown in FIG. The image data of the third hierarchy shown in FIG. 4A is not divided into blocks because the number of pixels is small. In the reference numerals attached to the blocks, “A” indicates a block of image data in the first layer, “B” indicates a block of image data in the second layer, and “C” indicates a block of image data in the third layer. In the figures after each, the tens place indicates the position in the column direction (X direction), and the first place indicates the position in the row direction (Y direction). For example, the block A00 indicates the position of the 0th row and the 0th column of the first layer image data. Here, each block is a block having two pixels in the X direction and two pixels in the Y direction.
[0046]
As is apparent from FIG. 4, each block included in the third layer image data includes four blocks of the second layer image data, and each block included in the second layer image data includes the second layer image data. Four blocks of image data in one layer are included. Each of the blocks A00 to A33 of the first layer image data includes one pixel of the second layer image data. The relationship between the blocks of the first layer image data and the pixels of the second layer image data is the same as in the case of the image data of the second layer described with reference to FIG. Each of the blocks B00 to B11 of the second layer image data includes one pixel of the third layer image data. The block B00 includes the pixel data at the position “00” of the third layer image data, the block B01 includes the pixel data at the position “04” of the third layer image data, and the block B10 includes the block B10. The pixel data at the position “40” of the image data of the third hierarchy is included, and the pixel data at the position “44” of the image data of the third hierarchy is included in the block B11.
[0047]
In this embodiment, the block size in each layer is a power of 2, but the present invention is not limited to this as long as the block in the upper layer includes a plurality of blocks in the lower layer.
[0048]
Thus, the image data divided | segmented into the block is encoded for every block. In this encoding, the target pixel data does not include the pixel data included in the higher-level image data. For the encoding, a recoverable encoding method based on a dictionary is used. In the present embodiment, the LZ77 encoding method is used. Furthermore, since the encoding method based on the dictionary encodes data arranged in one dimension, it is necessary to rearrange pixel data arranged in two dimensions in one dimension. For this reason, in the present embodiment, the pixel data arranged two-dimensionally is arranged one-dimensionally for each block. More specifically, the pixel data in the block is a process of arranging pixel data excluding pixel data included in the higher order among the pixel data included in the block so as to be continuous in the vicinity of the pixel data included in the higher order. It is arranged in one dimension by repeating until there is no more.
[0049]
In image data, pixels around a certain pixel often have the same value, and are often arranged with pixel data having the same value in the horizontal and vertical directions. In the present embodiment, since the image data is divided into blocks, the number of pixel data continuous in the horizontal direction (X direction) is smaller than in the case where the image data is not divided into blocks. For this reason, pixel data arranged one-dimensionally is arranged relatively close to pixel data adjacent in the vertical direction (Y direction). Therefore, in the LZ77 encoding method, all the pixel data adjacent in the horizontal direction of the block are stored in the reference unit, so that the compression rate can be improved. The horizontal size of the block is preferably smaller than the number of data stored in the reference unit.
[0050]
This will be described in more detail. The number of pixels in the horizontal direction (X direction) of image data is W (dots), the number of bits of pixel data (representing gradation) is k (bits), the length of the reference portion in the LZ77 algorithm is N (bits), and LZ77. Let F (bit) be the length of the encoding part. When the LZ77 algorithm is applied in the conventional raster order (pixel order) in which the entire image data is arranged one-dimensionally in line units, the pixel at the position “00” (hereinafter referred to as “target pixel”) at the upper left of the image data is focused. When the pixel at the position “10” in the next row in the same column is encoded, k × W <N must be satisfied in order for the pixel of interest to be in the reference portion. Similarly, when the pixel at the position “20” in the next row in the same column is encoded, k × 2W <n must be satisfied in order for the pixel of interest to be in the reference portion. This means that the probability that the pixel in the next row exists in the reference unit when encoding is very small just by one pixel away from the pixel in the vicinity of the vertical direction (Y direction).
[0051]
Since the number of pixels in the horizontal direction of the block in this embodiment is L (dots), L <W is established. By doing in this way, the probability that the pixel which exists in the vicinity of the vertical direction exists in a reference part becomes high. Since the image data has a two-dimensional correlation, it can be said that the probability that the longest match in the encoding unit becomes longer increases as the probability that pixels in the vertical vicinity exist in the reference unit increases. Furthermore, it can be said that L pixels in the vicinity have a high probability of matching in the same series of symbol strings. Therefore, it is better that the L pixels can be compared with the reference unit when encoding is performed. Therefore, encoding can be efficiently performed if the length is within the length of the encoding unit, that is, if L × k <F is satisfied. In addition, when L = 1 (dot), the raster order is the same as that of the vertical type, and thus the effect of folding is not obtained. Therefore, it is desirable that the number L of pixels on one side of the block satisfy the following expression. k <L × k <F
1 <L <F / k, L <W (1)
In addition, in an adaptive dictionary method such as the LZ77 algorithm, if there is no dictionary to be referred to in the initial state, expansion may occur rather than compression, and effective compression can be obtained for sufficiently long symbol strings. The reason why an effective compression can be obtained for a sufficiently long symbol string is that a dictionary to be referred to is sufficiently obtained. In other words, if there is a symbol string that can sufficiently accommodate the size of the reference portion of the LZ77 algorithm, effective compression can be obtained. Therefore, effective compression can be obtained by setting a block size such that the capacity (number of pixels) in one block to be encoded is equal to or larger than the size of the reference portion. For example, when describing the lowest hierarchy, if the block size is S (dot), one pixel is k (bit), the size of the reference part of the LZ77 algorithm is N (dot), and the block is a square, The block size S can be obtained from the equation.
[0052]
S × S × k × 3/4> N
S> √ (4 × N / (3 × k)) (2)
In the one-dimensional arrangement, the pixel data is arranged in the vertical direction (Y direction), and when there is no more pixel data in the vertical direction, the process of arranging the pixel data in the next column in the vertical direction is performed. You may make it arrange in one dimension by repeating until there is no data. In this case, it is desirable that the vertical size of the block is smaller than the number of data stored in the reference unit.
[0053]
Furthermore, the one-dimensional arrangement may be made in the order of horizontally adjacent pixels and vertically adjacent pixels, or in the order of vertically adjacent pixels and horizontally adjacent pixels. In any case, adjacent pixels in the vertical direction and adjacent pixels in the horizontal direction may be arranged at an interval smaller than the number of data stored in the reference unit, and such an arrangement order may be determined in advance.
[0054]
FIG. 5 is a diagram illustrating pixel data to be encoded in image data of two layers. FIG. 5 shows the two-layer image data shown in FIG. Referring to FIG. 5 (a), with respect to the image data of the second layer, all the pixel data are to be encoded. This is because there is no image data of a higher hierarchy. Referring to FIG. 5B, the image data of the first layer is a reference for encoding pixel data excluding the pixel data included in the image data of the second layer. For example, the pixel data included in the block A00 includes the positions “00”, “01”, “10”, and “11”, but the pixel data at the position “00” is included in the image data of the second hierarchy. It is not a target for encoding. Thus, the compression rate can be improved by reducing the number of data to be encoded in the lower layer.
[0055]
FIG. 6 is a diagram showing pixel data to be encoded in image data of three layers. FIG. 6 shows the three-layer image data shown in FIG. With reference to FIG. 6A, for the image data of the third layer, all the pixel data are to be encoded. This is because there is no image data of a higher hierarchy. Referring to FIG. 6 (b), the second layer image data is pixel data except for the pixel data included in the third layer image data. For example, the pixel data included in the block B00 includes the positions “00”, “02”, “20”, and “22”, but the pixel data at the position “00” is included in the image data of the third hierarchy. It is not a target for encoding. Referring to FIG. 6C, the image data of the first layer is pixel data except for the pixel data included in the image data of the second layer and the third layer. For example, the pixel data included in the block A00 includes the positions “00”, “01”, “10”, and “11”, but the pixel data at the position “00” is included in the image data of the second hierarchy. It is not a target for encoding. The pixel data included in the block A01 includes positions “02”, “03”, “12”, and “13”, but the pixel data at the position “02” is included in the image data of the second hierarchy. It is not a target for encoding. As described above, in the image data of the lower hierarchy (for example, the first hierarchy), the pixel data to be encoded is the pixel data included in the image data of the higher hierarchy (second and third hierarchy). Not included.
[0056]
FIG. 7 is a flowchart showing a flow of encoding processing executed by the encoding processing unit 104 of the image conversion apparatus 100 according to the present embodiment. Here, for the sake of explanation, an example will be described in which the image data shown in FIG. 2 is encoded with image data of two layers. Referring to FIG. 7, in the encoding process, first, designation of a hierarchy to be encoded is accepted (step S01). The designation of the hierarchy is input by the user operating the instruction input unit 101. Here, since image data is described in two layers, what is specified in step S02 is two layers.
[0057]
Then, designation of the block size to be encoded is accepted (step S02). The designation of the block size is input by the user operating the instruction input unit 101. As described above, it is desirable that the number of pixels on one side of the block satisfies the formula (1) and the block size satisfies the formula (2). Here, it is assumed that a block size of 2 × 2 in length × width is designated. When there is no instruction in step S01 or step S02, the initial setting stored in the program input to the program input unit 102 is used.
[0058]
Next, the image data to be encoded is read from the image input unit or storage unit 107 (step S03). Then, the highest level hierarchy is set (step S04). In step S04, image data of each layer is generated by executing the reduction process by thinning out the image data input in step S03 for the number of layers (two layers) specified in step S01. The image data of the hierarchy is set as the image data to be processed. Here, the image data input in step S03 is the image data of the lowest first layer. Since the designated hierarchy is two, image data of the second hierarchy is generated. Furthermore, the image data of the second highest hierarchy is set as the image data to be processed. Next, the block size in the image data to be processed is set (step S05). In step S05, the block size of the image data to be processed is set based on the block size specified in step S02. Here, the block size of 2 × 2 in length × width shown in FIG. 3A is set. Then, the image data to be processed is divided into blocks based on the set block size (step S06).
[0059]
Next, a non-encoded block among the divided blocks is set (step S07). Here, it is assumed that the block B00 is set from the four blocks B00, B01, B10, and B11 shown in FIG. The pixel data of the set block is rearranged (step S08), and the rearranged pixel data is encoded according to the LZ77 algorithm (step S09). The rearrangement of the pixel data is in the order of the arrows shown in FIG.
[0060]
In the next step S10, it is determined whether or not encoding has been completed for all blocks included in the image data to be processed (step S10). If encoding has not been completed for all blocks, one of those blocks is set as a processing target block, and the processing from step S07 to step S09 is repeatedly executed for the set block. When the processing from step S07 to step S09 is completed for all the blocks of the image data of the processing pair, the process proceeds to step S11.
[0061]
In step S11, it is determined whether or not lower level image data exists. If image data of a lower hierarchy exists, the image data of the lower hierarchy is set as image data to be processed (step S12), and the processes of steps S05 to S10 are executed. If there is no lower-layer image data, that is, if the processing in steps S05 to S10 is executed for the first-layer image data, the processing ends. At this time, the encoded data is input from the encoding processing unit 104 to the storage unit 107 and stored therein.
[0062]
When stored in the storage unit 107, the encoded data is classified and stored for each layer and each block. Information for this classification is included in the header portion of the encoded data. That is, this header portion includes information on which block in which hierarchy corresponds to which encoded data. Therefore, by obtaining the information of this header part, it is possible to obtain only encoded data of an arbitrary block of an arbitrary hierarchy.
[0063]
When the image data of the first layer is the processing target, the block size in step S05 is 2 × 2 in the vertical and horizontal directions. This is the block size specified in step S02. In addition, in the encoding in step S09, pixel data included in the first layer image data is not subjected to encoding. Further, the rearrangement in step S08 is performed in the order indicated by the arrows in FIG.
[0064]
When the image data is encoded as image data of three layers, the processes from step S05 to step S11 are performed in the order of the image data of the respective layers in the order of the image data of the third layer, the image data of the second layer, and the image data of the first layer. Repeatedly executed on data.
[0065]
When the image data of the third hierarchy is the processing target, the block size in step S05 is 2 × 2 in the vertical and horizontal directions. In the encoding in step S09, all pixel data included in the third-layer image data are targeted. Further, the rearrangement in step S08 is rearranged in the order indicated by the arrows in FIG.
[0066]
When the image data of the second hierarchy is the processing target, the block size in step S05 is 2 × 2 in the vertical and horizontal directions. In the encoding in step S09, the pixel data included in the third-layer image data is not a target. Further, the rearrangement in step S08 is performed in the order indicated by the arrows in FIG.
[0067]
When the image data of the first layer is the processing target, the block size in step S05 is 2 × 2 in the vertical and horizontal directions. In the encoding in step S09, pixel data included in the second and third layer image data is not a target. Further, the rearrangement in step S08 is rearranged in the order indicated by the arrows in FIG.
[0068]
As described above, the image conversion apparatus 100 according to the present embodiment does not redundantly encode the upper layer image data that has already been encoded, when encoding the lower layer image data. Therefore, the pixel data to be encoded does not increase from the number of pixels of the input image data, that is, the lowest-order image data (first layer image data). More specifically, referring to FIG. 5B, the lowest-order first-layer image data is composed of three-fourths of pixel data of the original image data. For this reason, the compression capacity can be reduced by reducing the number of pixel data to be encoded.
[0069]
Further, the order in which the pixel data arranged in two dimensions is rearranged in one dimension is the order of adjacent pixels in the image data of each layer, so that similar series of pixels become continuous. Thus, in a method of converting a variable-length symbol string such as LZ77 into a fixed-length or variable-length code word, a longer variable-length symbol string can be converted into a fixed-length or variable-length code word. In other words, since the encoding is efficiently performed by an encoding method based on a dictionary that searches for the longest matching sequence, the compression capacity can be reduced.
[0070]
FIG. 8 is a flowchart showing a flow of decoding processing executed by the decoding processing unit 105 of the image conversion apparatus 100 according to the present embodiment. In the decoding processing unit 105, a decoding processing program is input from the program input unit 102 to the decoding processing unit 105. The decryption processing program is input from the external storage device 112 or the network interface 109. Further, it may be stored in the storage unit 107.
[0071]
Referring to FIG. 8, in the decoding process, designation of a hierarchy level desired to be decoded is accepted (step S21). The hierarchy level indicates a hierarchy corresponding to the resolution of an image to be decoded. If the relationship between the hierarchical level and the resolution is stored in the header portion of the encoded data, the header portion can be read and displayed on the display 110 from the image output portion 106 to notify the user. . In addition, when the user designates the resolution, the hierarchy level may be determined based on the information stored in the header part.
[0072]
Next, designation of an area to be decoded is accepted (step S22). The designation of the hierarchy level and the designation of the decoding target area are input by the user operating the instruction input unit 101. The decoding target area may be a block unit that is a processing unit at the time of encoding, or may include a plurality of blocks.
[0073]
Next, encoded data corresponding to the designated hierarchical level and area is read (step S23). The encoded data corresponding to the designated hierarchical level and area is specified from information included in the header portion of the encoded data. The encoded data corresponding to the designated hierarchical level and area includes, in addition to the encoded data corresponding to the block included in the designated area at the designated hierarchical level, the image of the upper hierarchy including the block. Encoded data corresponding to a block of data is also included. More specifically, data encoded with three-layer image data will be described with reference to FIG. 6. If the designated hierarchy level is the first hierarchy and the designated area is block A00, the code to be read is read out. In addition to the encoded data obtained by encoding the pixel data of the block A00, the encoded data is obtained by encoding the pixel data of the block B00 of the second hierarchy image data including the block A00 and the block C00 of the image data of the first hierarchy. Encoded data is included. Hereinafter, a case where these encoded data are read will be described as an example.
[0074]
Next, the encoded data of the highest hierarchy is set as the processing target data (step S24).
[0075]
In the next step S25, an undecoded block is set among the set processing target data. Then, the encoded data of the set block is decoded (step S26). This encoded data is decoded to obtain pixel data arranged in a one-dimensional manner. In step S26, the decoded pixel data is assigned to the pixel positions of the blocks included in the image data of the first hierarchy having the lowest hierarchy level. Thereby, the pixel data arranged in one dimension is arranged in two dimensions.
[0076]
In step S27, it is determined whether or not all blocks of the set processing target data have been decoded. If true, the process proceeds to step S28, and if false, the process proceeds to step S25. That is, step S25 and step S26 are repeatedly executed until all the blocks of the set processing target data are decoded.
[0077]
Next, the decoded block images are combined (step S28). This process is executed when the encoded data to be processed is composed of a plurality of blocks. Information for combining blocks, that is, block position information is stored in the header portion of the encoded data, and is combined with reference to this information. The position information can be expressed by a matrix such as A00 and A01, for example.
[0078]
Then, the image obtained by combining the decoded block images is interpolated with the decoded image of the higher hierarchy. In step S24, the encoded data of the highest hierarchy corresponds to the data encoded from the image data of the third hierarchy, and when the processing from step S25 to step S28 is executed, the process shown in FIG. The decoded image data is decoded. In this case, nothing is executed in step S29 because there is no higher hierarchy than the image data of the third hierarchy.
[0079]
In the next step S30, it is determined whether or not decoding has been performed up to the designated hierarchy level. If true, the process is terminated, and if false, the process proceeds to step S31. The decoded image data is output from the decoding processing unit 105 to the image output unit 106 or the storage unit 107.
[0080]
In step S31, the encoded data to be processed is set to the encoded data of the next lower hierarchy, and the process proceeds to step S25. The encoded data of the second hierarchy, more specifically, the data obtained by encoding the block B00 of the image data of the second hierarchy is the processing target data. In step S27, the data of the block B00 shown in FIG. Pixel data is decoded. Since the pixel data at the position “00” is not included in the block B00, the pixel data at the position “00” of the higher-level image data is interpolated in step S29. As a result, the interpolated image data includes pixel data at positions “00”, “02”, “20”, and “22”.
[0081]
Further, in step S31, encoded data of the third hierarchy, more specifically, data obtained by encoding the block A00 of the image data of the third hierarchy is set as processing target data. In step S27, FIG. The pixel data of the block A00 shown in FIG. Since the pixel data at the position “00” is not included in the block A00, the pixel data at the position “00” of the image data of the higher hierarchy is interpolated in step S29. As a result, the interpolated image data includes pixel data at positions “00”, “01”, “10”, and “11”. In the above-described processing, the pixel data at the positions “02”, “20”, and “22” are decoded, but do not need to be used because they are not included in the designated area.
[0082]
As described above, since the image conversion apparatus 100 according to the present embodiment decodes encoded image data in units of blocks, only a local area of the image data can be decoded. In addition, since unnecessary areas are not decoded, the processing speed of the decoding process can be increased.
[0083]
The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
[Brief description of the drawings]
FIG. 1 is a functional block diagram illustrating an outline of functions of an image conversion apparatus according to one embodiment of the present invention.
FIG. 2 is a diagram showing image data with reference numerals indicating pixel positions.
FIG. 3 is a diagram showing two-layer pixel data of a pyramid type.
FIG. 4 is a diagram showing three-layer pixel data of a pyramid type.
FIG. 5 is a diagram illustrating pixel data to be encoded in image data of two layers.
FIG. 6 is a diagram illustrating pixel data to be encoded in image data of three layers.
FIG. 7 is a flowchart showing a flow of encoding processing executed by an encoding processing unit of the image conversion apparatus according to the present embodiment.
FIG. 8 is a flowchart showing a flow of decoding processing executed by a decoding processing unit of the image conversion apparatus according to the present embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 100 Image converter, 101 Instruction input part, 102 Program input part, 103 Image input part, 104 Coding process part, 105 Decoding process part, 106 Image output apparatus, 106 Image output part, 107 Storage part, 108 Scanner, 109 Network Interface, 110 display, 111 printer, 112 external storage device.

Claims (2)

画像データに含まれる画素データの一部を間引いて画像データを縮小することにより解像度が低い階層レベルが上位の画像データを生成する画像縮小手段と、
階層レベルが上位の画像データから順に処理対象とする処理画像データを選択する選択手段と、
処理対象となる処理画像データを、前記処理画像データより階層レベルが上位の画像データに含まれる画素データを少なくとも1つ含むブロックに分割する分割手段と、
前記分割手段により分割されたブロック毎に、該ブロックに含まれる画素データのうち階層レベルがより上位の画像データに含まれる画素データを除く画素データを符号化対象画素データとして復元可能に符号化するための符号化手段と
2次元に配列された前記符号化対象画素データを予め定められた所定の順序で1次元に配列された画素データに並替える並替手段とを備え
前記符号化手段は、参照部と符号化部とを備える適応型辞書法に基づく符号化方式を用いて符号化し、
前記並替手段は、前記符号化対象画素データを、2次元に配列された画素位置の横方向に隣接する順に横方向に配列し、該横方向に画素データがなくなると、次の行の画素データを横方向に配列する処理、または2次元に配列された画素位置の縦方向に隣接する順に縦方向に配列し、該縦方向に画素データがなくなると、次の列の画素データを縦方向に配列する処理を、ブロック内の前記符号化対象画素データがなくなるまで繰り返すことにより1次元に配列し、
前記分割手段は、前記並替手段が1次元に配列するブロックの横方向の1行内または縦方向の1列内に含まれる画素数と階調を表す画素データのビット数との積を、前記符号化方式の参照部に格納されるデータ数および前記符号化方式の符号化部に格納されるデータ数よりそれぞれ小さいブロックに分割する、画像符号化装置。
Low resolution by reducing image data by thinning out a part of the pixel data included in the image data, and image reduction means hierarchical level to generate image data of the upper,
Selection means for selecting processing image data to be processed in order from image data having a higher hierarchical level;
A dividing unit that divides processed image data to be processed into blocks including at least one pixel data included in image data having a higher hierarchical level than the processed image data;
For each block divided by the dividing unit, pixel data excluding pixel data included in image data having a higher hierarchical level among pixel data included in the block is encoded so as to be reconstructable as encoding target pixel data. Encoding means for ,
Rearrangement means for rearranging the encoding target pixel data arranged two-dimensionally into pixel data arranged one-dimensionally in a predetermined order ,
The encoding means is encoded using an encoding method based on an adaptive dictionary method including a reference unit and an encoding unit,
The rearranging means arranges the encoding target pixel data in the horizontal direction in the order adjacent to the horizontal direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the horizontal direction, the pixel in the next row Processing to arrange data in the horizontal direction, or arrange in the vertical direction in the order adjacent to the vertical direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the vertical direction, the pixel data of the next column is Are arranged in a one-dimensional manner by repeating the processing to be arranged until the encoding target pixel data in the block is exhausted,
The dividing means calculates the product of the number of pixels included in one row in the horizontal direction or one column in the vertical direction of the blocks arranged in one dimension by the rearranging means and the number of bits of pixel data representing gradation. An image encoding apparatus that divides the data into blocks smaller than the number of data stored in a reference unit of an encoding scheme and the number of data stored in an encoding unit of the encoding scheme .
画像データに含まれる画素データの一部を間引いて画像データを縮小することにより解像度が低い階層レベルが上位の画像データを生成するステップと、
階層レベルが上位の画像データから順に処理対象とする処理画像データを選択するステップと、
処理対象となる処理画像データを、前記処理画像データより階層レベルが上位の画像データに含まれる画素データを少なくとも1つ含むブロックに分割するステップと、
前記分割ステップにより分割されたブロック毎に、該ブロックに含まれる画素データのうち階層レベルがより上位の画像データに含まれる画素データを除く画素データを符号化対象画素データとして復元可能に符号化するステップと
2次元に配列された前記符号化対象画素データを予め定められた所定の順序で1次元に配列された画素データに並替えるステップとを含み、
前記符号化するステップは、参照部と符号化部とを備える適応型辞書法に基づく符号化方式を用いて符号化し、
前記並替えるステップは、前記符号化対象画素データを、2次元に配列された画素位置の横方向に隣接する順に横方向に配列し、該横方向に画素データがなくなると、次の行の画素データを横方向に配列する処理、または2次元に配列された画素位置の縦方向に隣接する順に縦方向に配列し、該縦方向に画素データがなくなると、次の列の画素データを縦方向に配列する処理を、ブロック内の前記符号化対象画素データがなくなるまで繰り返すことにより1次元に配列し、
前記分割するステップは、前記並替えるステップが1次元に配列するブロックの横方向の1行内または縦方向の1列内に含まれる画素数と階調を表す画素データのビット数との積を、前記符号化方式の参照部に格納されるデータ数および前記符号化方式の符号化部に格納されるデータ数よりそれぞれ小さいブロックに分割する、画像符号化方法。
And step lower resolution, the hierarchical level to generate image data of the upper by reducing the image data by thinning out a part of the pixel data included in the image data,
Selecting processing image data to be processed in order from image data having a higher hierarchical level;
Dividing the processed image data to be processed into blocks including at least one pixel data included in image data having a higher hierarchical level than the processed image data;
For each block divided by the dividing step, pixel data excluding pixel data included in image data having a higher hierarchical level among the pixel data included in the block is encoded so as to be recoverable as encoding target pixel data. Steps ,
A parallel changing step to the pixel data arranged one-dimensionally in a predetermined given sequence of said coded pixel data arranged in a two-dimensional look-containing,
The step of encoding is performed using an encoding method based on an adaptive dictionary method including a reference unit and an encoding unit,
The rearranging step arranges the encoding target pixel data in the horizontal direction in the order adjacent to the horizontal direction of the two-dimensionally arranged pixel positions, and when there is no pixel data in the horizontal direction, the pixel in the next row Processing to arrange data in the horizontal direction, or arrange in the vertical direction in the order adjacent to the vertical direction of the pixel positions arranged in two dimensions, and when there is no pixel data in the vertical direction, the pixel data of the next column is Are arranged in a one-dimensional manner by repeating the processing to be arranged until the encoding target pixel data in the block is exhausted,
In the dividing step, a product of the number of pixels included in one row in the horizontal direction or one column in the vertical direction of the blocks arranged in one dimension in the rearrangement step and the number of bits of pixel data representing gradation is obtained. An image encoding method in which the number of data stored in the reference unit of the encoding scheme and the number of data stored in the encoding unit of the encoding scheme are each divided into smaller blocks .
JP2003007468A 2003-01-15 2003-01-15 Image coding apparatus and image coding method Expired - Fee Related JP4133357B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003007468A JP4133357B2 (en) 2003-01-15 2003-01-15 Image coding apparatus and image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003007468A JP4133357B2 (en) 2003-01-15 2003-01-15 Image coding apparatus and image coding method

Publications (2)

Publication Number Publication Date
JP2004221986A JP2004221986A (en) 2004-08-05
JP4133357B2 true JP4133357B2 (en) 2008-08-13

Family

ID=32897564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003007468A Expired - Fee Related JP4133357B2 (en) 2003-01-15 2003-01-15 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP4133357B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4721258B2 (en) * 2005-01-11 2011-07-13 株式会社リコー Image processing apparatus, image processing method, program, and information recording medium
US8103111B2 (en) * 2006-12-26 2012-01-24 Olympus Imaging Corp. Coding method, electronic camera, recording medium storing coded program, and decoding method

Also Published As

Publication number Publication date
JP2004221986A (en) 2004-08-05

Similar Documents

Publication Publication Date Title
JP4480119B2 (en) Image processing apparatus and image processing method
US4682869A (en) Image processing system and method
US6031938A (en) Image encoding apparatus with selective Markov and predictive coding
KR20040077921A (en) Compression of palettized color images with variable length color codes
US6020923A (en) Method and apparatus for coding and recording an image signal and recording medium for storing an image signal
JP2002034043A (en) Method and device for coding and recording medium
Rahmani et al. An efficient histogram-based index mapping mechanism for reversible data hiding in VQ-compressed images
JP2009290552A (en) Motion picture compressing apparatus and motion picture compression program
JP4133357B2 (en) Image coding apparatus and image coding method
JP4633576B2 (en) Data compression apparatus and data compression program
JP3201448B2 (en) Encoding / decoding device, encoding device, and decoding device
WO2001050769A1 (en) Method and apparatus for video compression using multi-state dynamical predictive systems
JP4371026B2 (en) Printing system and printer
JP2002190956A (en) Image encoding equipment and image decoding equipment
JP4173498B2 (en) Data compression apparatus and data compression program
JP3676078B2 (en) Run-length encoding method and compression apparatus
JP4462360B2 (en) Image compression apparatus and image expansion apparatus
JP3407588B2 (en) Encoding / decoding device
JP3990949B2 (en) Image coding apparatus and image coding method
JP4741317B2 (en) Data compression apparatus and data compression program
JPH07274006A (en) Picture processor, scanner, printer, digital copying machine and display device
JP4633577B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
Prabha et al. A hybrid encoding method for reducing code stream in EICA-optimized SMVQ reversible data hiding
JPH0621828A (en) Vector quantizing decoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070904

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071102

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080602

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

Free format text: PAYMENT UNTIL: 20110606

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

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees