JP3822512B2 - Image data compression apparatus, image data compression method, recording medium, and program - Google Patents

Image data compression apparatus, image data compression method, recording medium, and program Download PDF

Info

Publication number
JP3822512B2
JP3822512B2 JP2002080781A JP2002080781A JP3822512B2 JP 3822512 B2 JP3822512 B2 JP 3822512B2 JP 2002080781 A JP2002080781 A JP 2002080781A JP 2002080781 A JP2002080781 A JP 2002080781A JP 3822512 B2 JP3822512 B2 JP 3822512B2
Authority
JP
Japan
Prior art keywords
image data
image
pixels
size
correlation
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
JP2002080781A
Other languages
Japanese (ja)
Other versions
JP2002369201A (en
Inventor
之彦 横山
正宏 譽田
貴裕 中山
忠弘 大見
Original Assignee
忠弘 大見
アイ・アンド・エフ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 忠弘 大見, アイ・アンド・エフ株式会社 filed Critical 忠弘 大見
Priority to JP2002080781A priority Critical patent/JP3822512B2/en
Priority to US10/507,378 priority patent/US20050163389A1/en
Priority to PCT/JP2002/009625 priority patent/WO2003081898A1/en
Priority to EP02772865A priority patent/EP1499106A1/en
Publication of JP2002369201A publication Critical patent/JP2002369201A/en
Application granted granted Critical
Publication of JP3822512B2 publication Critical patent/JP3822512B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、画像データ圧縮装置、画像データ圧縮方法、記録媒体およびプログラムに関し、特に、所定の大きさのブロックで入力された画像データのブロックサイズを変更して画像データを圧縮処理する画像データ圧縮装置に用いて好適なものである。
【0002】
【従来の技術】
従来、複数の画素により構成された入力画像の画像情報を記録媒体に記録したり、伝送媒体を介して伝送したりする際には、上記入力画像の画像データに符号化処理を施すことにより画像データを圧縮し、記録媒体に記録したり、伝送媒体を介して伝送したりしていた。
【0003】
上記入力画像の画像データの符号化処理では、まず、複数の画素により構成された入力画像を所定の大きさ(例えば、8×8画素)のマクロブロック(画像ブロック)に分割していた。次に、上記分割したマクロブロック毎に所定の演算処理を行うことで、上記マクロブロック内の画素値の高周波成分を除去したりして、上記入力画像の画像データを圧縮(符号化)していた。
【0004】
例えば、入力画像がカラー画像の場合には、一般に、上記入力画像の原信号、あるいは上記入力画像の原信号に所定の色補正処理を施して生成した輝度信号および色差信号が入力されていた。ここで、上記入力された原信号、あるいは輝度信号および色差信号は、上記カラー画像を構成するそれぞれの画素が備える情報である。上記カラー画像の画像データを圧縮する際には、上記カラー画像を所定の大きさのマクロブロックに分割して、上記入力された原信号、あるいは輝度信号および色差信号を上記マクロブロック毎に演算処理して上記カラー画像の画像データを圧縮していた。
【0005】
【発明が解決しようとする課題】
しかしながら、上述したように入力画像の画像データを符号化処理し圧縮する際、上記画像データの高周波成分を除去するため、所定の大きさのマクロブロック内における画素値の変化が大きい画像(高周波成分の多い画像)では、画素値の変化が小さい画像(低周波成分の多い画像)より入力画像に対する圧縮したデータから復元した画像(復元画像)の画質の劣化が大きくなる。
【0006】
したがって、画像サイズの小さい画像やエッジ部分の多い画像が入力画像として入力されたときには、所定の大きさのマクロブロック内において画像の階調(画素値)が急激に変化する部分が多くなり、すなわち高周波成分の多い画像となり、復元画像の画質の劣化が大きくなってしまう。すなわち、画像サイズの小さい画像やエッジ部分の多い画像が入力画像として入力されたときには、単一の大きさのみのマクロブロックに入力画像を分割して符号化処理を施すと、復元画像の画質の劣化が大きくなってしまうという問題があった。
【0007】
また、一般に、入力画像を分割するマクロブロックの大きさを大きくすると、上記入力画像の画像データの圧縮率は高くなるが、高周波成分の多い画像ほど復元画像の画質の劣化が大きくなる。そのため、低周波成分の多い画像では、画像データの圧縮率を高くするために圧縮処理におけるマクロブロックの大きさを比較的大きくしたとしても、復元画像の画質を維持することができた。しかし、高周波成分の多い画像では、復元画像の画質を維持したまま画像データの圧縮率を高くするためには圧縮処理におけるマクロブロックの大きさを適切に決定し、入力画像を分割しなければならなかった。
【0008】
しかしながら、上記入力画像における原信号や輝度信号等の画素値(画像データ)の発生分布は広範囲であり、さらに上記画素値の分布の形状も入力画像の種類により異なっていた。すなわち、入力画像の種類等により入力画像を分割したマクロブロック内の周波数分布が異なるため、予めマクロブロック内の周波数分布を演算することにより、復元画像の画質を維持したまま、画像データの圧縮率を高くすることができる圧縮処理におけるマクロブロックの大きさを決定することは容易ではないという問題があった。
【0009】
本発明は、このような問題を解決するために成されたものであり、入力画像に応じて適切な圧縮処理におけるマクロブロックの大きさを容易に決定し、復元画像の画質を維持しながらも入力画像の画像データを高い圧縮率で圧縮処理することができるようにすることを目的とする。
【0010】
【課題を解決するための手段】
本発明の画像データ圧縮装置は、m画素×n画素(mおよびnは自然数)の画像ブロックで入力された入力画像データに所定の処理を施して、上記画像ブロックの大きさを変更する画像サイズ変換手段と、上記画像サイズ変換手段により大きさを変更した画像ブロックの画像データを圧縮する圧縮手段と、上記圧縮手段により圧縮した圧縮画像データを伸長し、上記m画素×n画素の画像ブロックの復元画像データを生成する伸長手段と、上記伸長手段により生成した復元画像データと上記入力画像データとの相関の強さを求める第1の相関演算手段と、上記伸長手段により生成した復元画像データに基づいて、所定の大きさの分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求める第2の相関演算手段と、上記第1の相関演算手段より出力される第1の相関の強さと、上記第2の相関演算手段より出力される第2の相関の強さとに基づいて、上記画像サイズ変換手段によりさらに画像ブロックの大きさを変更するか否かを判断する判断手段とを備えることを特徴とする。
【0012】
本発明の画像データ圧縮装置のその他の特徴とするところは、第2の相関演算手段は、伸長手段により生成した復元画像データからm'画素×n'画素(m'およびn'は自然数、かつm'≦m、n'≦n)の分割画像ブロックの画像データを切り出し、切り出した分割画像ブロックの画像データと、入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求めることを特徴とする。
【0013】
本発明の画像データ圧縮装置のその他の特徴とするところは、第2の相関演算手段は、伸長手段により生成した復元画像データを結合してm'画素×n'画素(m'およびn'は自然数、かつm'>m、n'>n)の分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、当該分割画像ブロックに対応するように結合した入力画像データとの相関の強さを求めることを特徴とする。
【0014】
本発明の画像データ圧縮装置のその他の特徴とするところは、圧縮対象である被圧縮画像データをm画素×n画素の画像ブロック単位で抽出し、抽出した上記被圧縮画像データを入力画像データとして入力する画像ブロック抽出手段をさらに備えることを特徴とする。
【0015】
本発明の画像データ圧縮装置のその他の特徴とするところは、画像ブロック抽出手段から入力されたすべての入力画像データに対して、画像サイズ変換手段によりさらに画像ブロックの大きさの変更を行わないと判断手段により判断された際に、圧縮手段により圧縮した上記すべての入力画像データにそれぞれ対応する圧縮画像データを完全可逆符号化処理する完全可逆符号化手段をさらに備えることを特徴とする。
【0016】
本発明の画像データ圧縮装置のその他の特徴とするところは、完全可逆符号化手段は、圧縮手段により圧縮したすべての入力画像データにそれぞれ対応する圧縮画像データを複数の完全可逆符号化方式で完全可逆符号化処理し、上記完全可逆符号化手段により複数の完全可逆符号化方式で完全可逆符号化処理した圧縮画像データを比較して、完全可逆符号化処理した圧縮画像データのデータ量が最も少ない完全可逆符号化方式を選択する完全可逆符号化方式選択手段をさらに備えることを特徴とする。
【0017】
本発明の画像データ圧縮装置のその他の特徴とするところは、所定の解像度変化率で被圧縮画像データの解像度を変換し、画像ブロック抽出手段に供給する解像度変換手段をさらに備えることを特徴とする。
【0018】
本発明の画像データ圧縮装置のその他の特徴とするところは、相関の強さは、伸長手段により生成した復元画像データに基づく復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値との相関値であることを特徴とする。
【0019】
本発明の画像データ圧縮装置のその他の特徴とするところは、相関値は、復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値とのS/N比であることを特徴とする。
本発明の画像データ圧縮装置のその他の特徴とするところは、相関値は、復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値との2乗平均誤差であることを特徴とする。
本発明の画像データ圧縮装置のその他の特徴とするところは、相関値は、復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値との差分絶対値距離であることを特徴とする。
【0020】
本発明の画像データ圧縮装置のその他の特徴とするところは、判断手段は、相関値が所定の閾値より小さい場合に、画像サイズ変換手段によりさらに画像ブロックの大きさを変更すると判断することを特徴とする。
本発明の画像データ圧縮装置のその他の特徴とするところは、判断手段は、相関値が所定の閾値より大きい場合に、画像サイズ変換手段によりさらに画像ブロックの大きさを変更すると判断することを特徴とする。
【0021】
本発明の画像データ圧縮装置のその他の特徴とするところは、圧縮手段および伸長手段は、コードブック方式を用いたベクトル量子化によりそれぞれ圧縮、伸長することを特徴とする。
【0022】
本発明の画像データ圧縮装置のその他の特徴とするところは、コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを2乗平均誤差が最も小さいパターンが隣のアドレスになるように配置することを特徴とする。
【0023】
本発明の画像データ圧縮装置のその他の特徴とするところは、コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを差分絶対値距離が最も小さいパターンが隣のアドレスになるように配置することを特徴とする。
【0024】
本発明の画像データ圧縮装置のその他の特徴とするところは、コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを所定の規則に従い隣接して配置するとともに、上記所定の規則に従って画像ブロックの各パターンを配置するアドレスの前方または後方の隣接するアドレスに、a画素×b画素の画像ブロックの要素値が全て同じ値であるパターンを所定の個数だけさらに配置することを特徴とする。
【0031】
本発明の画像データ圧縮方法は、m画素×n画素(mおよびnは自然数)の画像ブロックで入力された入力画像データに所定の処理を施して、上記画像ブロックの大きさを変更し、大きさを変更した画像ブロックの画像データを圧縮処理し、上記圧縮処理により得られた圧縮画像データを伸長処理して、上記m画素×n画素の画像ブロックの復元画像データを生成し、上記生成した復元画像データと上記入力画像データとの相関の強さを示す第1の相関の強さを求めるとともに、上記生成した復元画像データに基づいて所定の大きさの分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを示す第2の相関の強さを求め、上記第1の相関の強さと上記第2の相関の強さとに基づいて、画像ブロックの大きさをさらに変更するか否かを判断することを特徴とする。
【0032】
本発明の画像データ圧縮方法のその他の特徴とするところは、第2の相関の強さとして、生成した復元画像データからm'画素×n'画素(m'およびn'は自然数、かつm'≦m、n'≦n)の分割画像ブロックの画像データを切り出し、切り出した分割画像ブロックの画像データと、入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求めることを特徴とする。
【0033】
本発明の画像データ圧縮方法のその他の特徴とするところは、第2の相関の強さとして、生成した復元画像データを結合してm'画素×n'画素(m'およびn'は自然数、かつm'>m、n'>n)の分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、当該分割画像ブロックに対応するように結合した入力画像データとの相関の強さを求めることを特徴とする。
【0034】
本発明の画像データ圧縮方法のその他の特徴とするところは、圧縮対象である被圧縮画像データを上記m画素×n画素の画像ブロック単位で抽出し、抽出した上記被圧縮画像データを入力画像データとして入力し、上記入力されたすべての入力画像データに対して、上記画像ブロックの大きさをさらに変更しないと判断された際に、圧縮処理により得られた上記すべての入力画像データにそれぞれ対応する圧縮画像データを完全可逆符号化処理することを特徴とする。
【0035】
本発明の画像データ圧縮方法のその他の特徴とするところは、圧縮処理により得られたすべての入力画像データにそれぞれ対応する圧縮画像データを複数の完全可逆符号化方式で完全可逆符号化処理し、上記複数の完全可逆符号化方式で完全可逆符号化処理した圧縮画像データのデータ量が最も少ない完全可逆符号化方式を選択することを特徴とする。
【0036】
本発明の画像データ圧縮方法のその他の特徴とするところは、所定の解像度変化率で圧縮対象である被圧縮画像データの解像度を変換し、上記解像度を変換した被圧縮画像データをm画素×n画素の画像ブロック単位で抽出し、抽出した被圧縮画像データを入力画像データとして入力することを特徴とする。
【0037】
本発明の画像データ圧縮方法のその他の特徴とするところは、相関の強さは、生成した復元画像データに基づく復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値との相関値であることを特徴とする。
【0038】
本発明の画像データ圧縮方法のその他の特徴とするところは、相関値は、復元画像に係る画像データの各画素値と、当該画像データに対応する入力画像データの各画素値とのS/N比、2乗平均誤差、および差分絶対値距離のうち何れかであることを特徴とする。
【0039】
本発明の画像データ圧縮方法のその他の特徴とするところは、圧縮処理および伸長処理は、コードブック方式を用いたベクトル量子化によりそれぞれ圧縮、伸長することを特徴とする。
【0042】
本発明のコンピュータ読み取り可能な記録媒体は、上記各手段としてコンピュータを機能させるためのプログラムを記録したことを特徴とする。
また、本発明のコンピュータ読み取り可能な記録媒体の他の特徴とするところは、上記画像データ圧縮方法の手順をコンピュータに実行させるためのプログラムを記録したことを特徴とする。
【0043】
本発明のプログラムは、上記各手段としてコンピュータを機能させることを特徴とする。
また、本発明のプログラムの他の特徴とするところは、上記画像データ圧縮方法の手順をコンピュータに実行させることを特徴とする。
【0044】
【発明の実施の形態】
以下、本発明の実施形態を図面を参照しながら説明する。以下に示す各実施形態は、圧縮対象の画像データとして例えば動画を構成する静止画を例にとり、圧縮した画像データから生成した復元画像の画質および画像データの圧縮率の更なる向上を達成するものである。
【0045】
(第1の実施形態)
先ず、図1〜図6を参照しながら、本発明の第1の実施形態について説明する。
なお、本実施形態では、所定の大きさの画素ブロック(マクロブロック)に入力画像を分割し圧縮する手法として、圧縮したデータの伸長処理を容易に行うことができるベクトル量子化(VQ:Vector Quantization)という手法を用いている。最初に、ベクトル量子化による画像圧縮および伸長の原理について、静止画像を例にとり図1を参照しながら説明する。
【0046】
図1は、ベクトル量子化による画像圧縮および伸長の原理を説明するための図である。
図1に示すように、圧縮対象の画像データとして入力される入力画像1は、画素と呼ばれる要素が多数集まって構成されている。個々の画素は、RGB信号から変換された輝度信号(Y信号)、及び色信号(U、V信号)等の情報を持っている。
【0047】
入力画像1中から複数画素で構成されるブロックを取り出したのが、入力画像ブロック(マクロブロック)2である。図1の例では、入力画像ブロック2の大きさとして4画素×4画素を選んでいるが、この大きさは何であってもよい。この入力画像ブロック2は、上述したように複数の画素で構成されており、各々の画素が持つ輝度信号値および色信号値を集めてそれぞれベクトルデータとすることができる。これが、入力ベクトルデータである。
【0048】
ここで、入力画像1中の幾つかの入力画像ブロック2は、人間の視覚特性上、見た目では殆ど同じに見える場合がある。このような同じに見える複数の入力画像ブロック2を、より少ない数の画像ブロックで代表させることが可能である。コードブック3は、入力画像1上の多数の入力画像ブロック2を代表する画像ブロック(コードベクトルデータ)を複数持ったものである。コードベクトルデータは、コードブック3内の画像ブロックを構成する各々の画素が持つ輝度信号値や色度信号値をベクトルデータとしたものである。
【0049】
ベクトル量子化では、入力画像1の全体を入力画像ブロックとして分割し、各々の入力画像ブロック2を入力ベクトルデータとして、その入力ベクトルデータに類似するコードベクトルデータをコードブック3内から検索する。そして、該当するコードベクトルデータの番号のみを転送することで、画像を圧縮することが可能である。圧縮された画像を再生して再現画像4を得るには、上記転送された番号に対応するコードベクトルデータをコードブック3から読み出し、画像にあてはめればよい。
【0050】
第1の実施形態は、入力画像を所定の大きさに分割して取り出した上述の入力画像ブロック2に処理方法に併せて拡大処理または縮小処理を施した後、所定の大きさの圧縮対象マクロブロックに分割しベクトル量子化を行うものである。
【0051】
図2は、第1の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
まず、ステップS1にて、入力画像1の入力を行う。次に、ステップS2にて、上記入力画像1から基本サイズマクロブロック5(以下、「基本サイズMB」と称す。)を抽出する。すなわち、入力画像1を所定の大きさの基本サイズMB5に分割する。ここで、上記基本サイズMB5は、後述する圧縮対象マクロブロック(以下、「圧縮対象MB」と称す。)以上の画素数で構成されるマクロブロックである。
【0052】
例えば、図3に示すように圧縮対象MBが4画素×4画素の大きさであれば、基本サイズMB5を16画素×16画素の大きさとすれば良い。なお、ここでは、一例として16画素×16画素の大きさの基本サイズMBを示しているが、この大きさは任意に設定可能である。
【0053】
次に、ステップS3にて、上記ステップS2において抽出した基本サイズMB5の中の1つの基本サイズMB5について画像サイズ変換処理を行う。上記画像サイズ変換処理では、基本サイズMB5を所定の縮小率で縮小処理して、基本サイズMB5のサイズを変更した後、所定の大きさの圧縮対象MBに分割する。このステップS3における画像サイズ変換処理の詳細については後述する。
【0054】
ステップS4にて、上記ステップS3において所定の大きさに分割した圧縮対象MBについて上述したベクトル量子化による圧縮処理を行い、処理結果としてコードベクトルデータのコード番号を出力する。このステップS4では、上記ステップS3において所定の大きさに分割した全ての圧縮対象MBについてベクトル量子化による圧縮処理を行う。
【0055】
次に、ステップS5にて、上記ステップS4において全ての圧縮対象MBについて得られたコード番号に基づいて、画像を復元する。すなわち、ステップS5では、上記コード番号に対応したコードベクトルデータをコードブックからそれぞれ読み出して、読み出したコードベクトルデータを結合し画像を復元する。
【0056】
ステップS6にて、上記ステップS5において復元したコードベクトルデータにより構成される画像を基本サイズMB5の大きさと同じサイズに拡大処理する。これにより、基本サイズMB5と同じサイズの復元画像を得ることができる。
【0057】
次に、ステップS7にて、上記ステップS6において得られた復元画像と、当該復元画像に対応する基本サイズMB5の画像との相関値、例えばS/N比を演算し、所定の閾値以上であるか否か判定する。すなわち、ステップS7では、ベクトル量子化により圧縮処理した画像データに基づいて生成した復元画像の画質に問題があるか否か判定する。
【0058】
上記判定の結果、相関値が所定の閾値より小さい場合には、上述したステップS3の画像サイズ変換処理に戻り、基本サイズMB5を縮小する所定の縮小率を変更し、上述したステップS3〜ステップS7の処理を繰り返し行う。
一方、上記判定の結果、相関値が所定の閾値以上の場合には、上記ステップS3での基本サイズMB5の縮小率、および上記ステップS4において得られたコード番号を出力し、ステップS8に進む。
【0059】
ステップS8では、ベクトル量子化による圧縮処理を施していない基本サイズMB5があるか否か判断する。上記判断の結果、ベクトル量子化による圧縮処理を施していない基本サイズMB5がある場合には、上記ステップS3に戻り、上述したステップS3〜ステップS7の処理を行う。
一方、ベクトル量子化による圧縮処理を施していない基本サイズMB5がない場合、すなわち上記ステップS2において抽出した全ての基本サイズMB5についてベクトル量子化による圧縮処理が終了している場合には、ステップS9に進む。
【0060】
次に、ステップS9にて、上述した処理により全ての基本サイズMB5についてそれぞれ得られたコード番号を完全可逆符号化処理する。
ここで、上記完全可逆符号化処理では、上記コード番号を少なくとも1つの完全可逆符号化方式、例えばLZSS圧縮法やハフマン符号化により完全可逆符号化処理する。そして、複数の完全可逆符号化方式で完全可逆符号化処理した場合には、完全可逆符号化処理後のデータ量を比較し、データ量が最も少ない完全可逆符号化処理後のデータを選択する。さらに、画像全体で採用した完全可逆符号化方式を示す情報と基本サイズMB5毎の縮小率の情報とを圧縮データのヘッダとして書き込み、完全可逆符号化処理後のデータと合成して圧縮データとして出力する。
【0061】
次に、ステップS10にて、上記ステップS9において出力した圧縮データを、上記ステップS1において入力された入力画像の圧縮データとして出力し、処理を終了する。
【0062】
なお、ここで上述したステップS4において用いるコードベクトルデータは、各基本サイズMB5の縮小率および圧縮対象MBの大きさによって異なるコードブックを用いることも可能であるし、共通のコードブックを用いることも可能である。
【0063】
次に、上記図2に示したステップS3での画像サイズ変換処理について、図3を参照しながら詳細に説明する。
図3は、画像サイズ変換処理を説明するための模式図である。
なお、以下の説明では、横方向にX個が並び、縦方向にY個が並び、(X×Y)個の画素により構成されるマクロブロックを、X画素×Y画素のマクロブロックと記述する。また、図3では、上記図2に示したステップS2において、入力画像1から16画素×16画素の基本サイズMB5を抽出した場合を一例として示している。
【0064】
先ず、上記図2のステップS2において基本サイズMB5を抽出した後、最初に行う画像サイズ変換処理では、抽出した基本サイズMB5の縦方向および横方向のサイズをそれぞれ4分の1の大きさ、すなわち基本サイズMB5を4分の1に縮小処理して、4画素×4画素の縮小マクロブロック6(以下、「縮小MB」と称す。)を得る。得られた4画素×4画素の縮小MB6を圧縮対象MB7として、ベクトル量子化による圧縮処理等の上記図2に示したステップS4〜ステップS7の処理を行う。
【0065】
上記縮小処理では、注目画素の画素値とその近傍に存在する画素の画素値との平均値を演算し、演算結果を代表値とすることで縮小MB6を得る。また、上記縮小処理に限らず、例えば、16画素×16画素の基本サイズMB5を16個の4画素×4画素のブロックに分割し、各ブロックにて画素値の平均値を演算し、演算結果を代表値として縮小MB6を得るようにしても良いし、16画素×16画素の基本サイズMB5において所定の画素間隔で抽出した画素値を代表値として縮小MB6を得る、つまり所定の縮小率に併せて画素を間引きして縮小MB6を得るようにしても良い。また、注目画素とその近傍に存在する画素との距離の比を求め、その比率で注目画素の画素値をその近傍の画素値から求める線形補間法を用いて、縮小MB6を得るようにしても良い。
【0066】
図2に示したステップS4〜ステップS7の処理を上記圧縮対象MB7について行い、ステップS7での判定結果により、再びステップS3に処理が戻った場合には、基本サイズMB5を縮小する縮小率を変更する。そして、基本サイズMB5の横方向のサイズを2分の1、縦方向のサイズを4分の1の大きさに縮小処理して、8画素×4画素の縮小MB8を得る。この8画素×4画素の縮小MB8を、2個の4画素×4画素のマクロブロック9に分割し、これを圧縮対象MBとして、図2に示したステップS4〜ステップS7の処理を行う。
【0067】
基本サイズMB5を縮小処理した8画素×4画素の縮小MB8での処理の結果、再び、ステップS3に処理が戻ってきた場合には、基本サイズMB5を縮小する縮小率を変更する。そして、基本サイズMB5の横方向のサイズを2分の1、縦方向のサイズを2分の1の大きさに縮小処理して、8画素×8画素の縮小MB10を得る。この8画素×8画素の縮小MB10は、4個の4画素×4画素のマクロブロック11に分割し、これを圧縮対象MBとして、図2に示したステップS4〜ステップS7の処理を行う。
【0068】
そして、再び、ステップS3に処理が戻ってきた場合には、基本サイズMB5の横方向のサイズを1分の1、縦方向のサイズを2分の1の大きさに縮小処理して、16画素×8画素の縮小MB12を得る。この16画素×8画素の縮小MB12を、8個の4画素×4画素のマクロブロック13に分割し、これを圧縮対象MBとして、図2に示したステップS4〜ステップS7の処理を行う。
【0069】
再び、ステップS3に処理が戻ってきた場合には、基本サイズMB5を縮小する縮小率を変更し、横方向のサイズを1分の1、縦方向サイズを1分の1の大きさに縮小処理する。つまり、入力された16画素×16画素の基本サイズMB5のサイズを変更せずに、縮小MB14とする。この縮小MB14は、16個の4画素×4画素のマクロブロック15に分割し、これを圧縮対象MBとして、図2に示したステップS4〜ステップS7の処理を行う。
【0070】
さらに、再び、ステップS3に処理が戻ってきた場合には、基本サイズMB5を縮小する縮小率を変更し、横方向のサイズを1分の2、縦方向サイズを1分の2の大きさに縮小処理する。つまり、入力された16画素×16画素の基本サイズMB5の横方向および縦方向のサイズをそれぞれ2倍に拡大処理する。この後、4画素×4画素のマクロブロックに分割してもよいが、図3においては上述した処理と等価の操作である、16画素×16画素のマクロブロック14から2画素×2画素のマクロブロック16に分割している。この際、2画素×2画素のマクロブロック16は64個得られることになり、これらを圧縮対象MBとして、図2に示したステップS4〜ステップS7の処理を行う。
【0071】
再び、ステップS3に処理が戻ってきた場合には、基本サイズMB5を縮小する縮小率を変更し、横方向のサイズを1分の4、縦方向サイズを1分の4の大きさに縮小処理する。つまり、入力された16画素×16画素の基本サイズMB5の横方向および縦方向のサイズをそれぞれ4倍に拡大処理する。この後、4画素×4画素のマクロブロックに分割してもよいが、図3においては上述した処理と等価の操作である、16画素×16画素のマクロブロック14から1画素×1画素のマクロブロック17に分割している。この際、1画素×1画素のマクロブロック17は256個得られることになる。
【0072】
これら1画素×1画素のマクロブロック17を圧縮対象MBとして、ステップS4〜ステップS7の処理を行うことも可能であるが、このマクロブロック17は画素そのものを表わしているため、ステップS4〜ステップS7の操作を省略してステップS9の完全可逆符号化処理を行い、ステップS10にて圧縮データを出力することも可能である。
【0073】
このように、図2に示したステップS7における復元画像と基本サイズMB5の画像との相関値による判定の結果、現状の縮小率により得られた縮小MBのサイズでは、復元画像(再生画像)の画質に問題があると判断した場合には、ステップS3における基本サイズMB5を縮小する縮小率を変化させることにより、復元画像(再生画像)の画質の劣化を抑えた画像データ圧縮ができる。
【0074】
また、上記ステップS7における上記相関値による判定の結果、所定の閾値条件を満足している場合には、より大きな縮小MBのサイズで画像データ圧縮が可能であるため、大幅な圧縮率の向上を達成することができる。
【0075】
なお、図3に示す画像サイズ変換処理においては、16画素×16画素の基本サイズMB5を使用した場合を一例として示しているが、上記基本サイズMB5の大きさは、任意の大きさの基本サイズMBを用いることができる。
【0076】
また、基本サイズMB5を縮小する縮小率の変化についても、図3に示した縮小率の変化は、ほんの一例であり、他の縮小の方法を採用しても何ら問題はない。また、図3においては、基本サイズMB5を縮小する縮小率を変化させる際、縦方向の縮小率は常に横方向の縮小率以下としているが、縦方向の縮小率が横方向の縮小率以上となっても良いことは言うまでもない。つまり、横方向および縦方向の縮小率を(X、Y)と記述すると、例えば、縮小率を(1/4、1/4)→(1/4、1/2)→(1/2、1/4)→(1/2、1/2)→…と変化させても良いし、(1/4、1/4)→(1/4、1/2)→(1/2、1/2)→…と変化させても良い。
【0077】
また、図2のステップS7において、復元画像と当該復元画像に対応する基本サイズMB5の画像との相関値に基づいて、基本サイズMB5を縮小する縮小率を変化させるか否かを判定するための所定の閾値条件を適宜設定することにより、強制的に任意の縮小率以降の縮小率の変更を行わないように(図2に示すステップS3に処理が戻らないように)したり、任意の縮小率での圧縮処理した画像データが出力されることを禁止したりするようにしても良い。例えば、上記所定の閾値条件として常に満足できる閾値条件を設定することにより、以降の縮小率の変更を行わないようにすることができ、逆に常に満足することができない閾値条件を設定することにより、任意の縮小率での圧縮処理した画像データが出力されることを禁止することができる。
【0078】
また、ベクトル量子化による圧縮処理を行う圧縮対象MBのサイズとして、4画素×4画素、2画素×2画素及び1画素×1画素の圧縮対象MBを例に挙げているが、これについても任意のサイズの圧縮対象MBを使用しても本発明の効果に何ら影響を与えるものではない。
【0079】
また、図3に示す画像サイズ変換処理においては、16画素×16画素の基本サイズMB5を使用し、上記基本サイズMB5を縮小かつ、4画素×4画素、2画素×2画素のマクロブロックに分割し、ベクトル量子化による圧縮処理を行う例について示しているが、例えば、基本サイズMB5を横方向および縦方向に4分の1に縮小して、4画素×4画素のマクロブロックとするとき、基本サイズMB5を縮小処理するのではなく、16画素×16画素のコードベクトルデータをコードブックに用意しておき、ベクトル量子化による圧縮対象MBのサイズを4画素×4画素から16画素×16画素としても同様の効果が得られる。
【0080】
このように、基本サイズMB5を縮小し、かつ4画素×4画素、2画素×2画素等のマクロブロックに分割するかわりに、縮小率にあったマクロブロックサイズ(16画素×16画素、8画素×16画素、8画素×8画素、4画素×8画素、4画素×4画素、2画素×2画素、1画素×1画素)に分割し、それに対応するコードベクトルデータをコードブックに用意しておき、ベクトル量子化による圧縮処理をすることで、本発明の効果と同様の効果が得られる。
【0081】
次に、図4を参照しながら、上述の画像データ圧縮方法を実現する画像データ圧縮装置の構成について説明する。図4は、第1の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
【0082】
画像入力部30には入力画像1が入力される。マクロブロック抽出部31は、上記入力画像1から基本サイズMB5の抽出を行う。画像サイズ変換部32は、図3に示すようにして、マクロブロック抽出部31により抽出した基本サイズMB5のサイズを所定の縮小率で変換し、ベクトル量子化圧縮部33での圧縮処理を施す圧縮対象MBを生成する。
【0083】
ベクトル量子化圧縮部33は、コードブック記憶部35に保持されているコードブックを構成するコードベクトルデータを用いて、上記画像サイズ変換部32から供給される圧縮対象MBの圧縮処理を行う。画像復元部34は、上記ベクトル量子化圧縮部33による圧縮処理の結果、出力されるコードベクトルデータのコード番号に基づいて、コードブック記憶部35に保持されているコードベクトルデータを読み出し、読み出したコードベクトルデータを結合して画像を生成する。
【0084】
ここで、上記コードブックは、例えば2048個のコードベクトルデータを備えており、さらにコードブック内では同じサイズのコードベクトルデータにおいて、互いに隣り合うアドレスのコードベクトルデータとの2乗平均誤差が最も小さくなるように配置されている。なお、同じサイズのコードベクトルデータにおいて、互いに隣り合うアドレスのコードベクトルデータとの差分絶対値距離が最も小さくなるようにコードブック内に配置するようにしても良い。
【0085】
また、上述のようにコードベクトルデータが配置されたコードブックにて、同じサイズのコードベクトルデータの先頭のアドレス(当該コードベクトルデータの最小アドレスの前方に隣接するアドレス)または最後のアドレス(当該コードベクトルデータの最大アドレスの後方に隣接するアドレス)に、さらにコードベクトルデータのサイズが同じであるとともに各要素が全て同じ値を有し、互いに異なるコードベクトルデータ(同じサイズのベタパターンで互いに異なるコードベクトルデータ)を所定の個数(例えば、画素の階調値分)だけコードブック内に配置するようにしても良い。
また、コードベクトルデータが、互いに隣り合うアドレスのコードベクトルデータと歪みが小さくなるようにコードブック内に配置される手法であれば、どのような手法を採用しても問題ない。
【0086】
このように、予めコードベクトルデータを2乗平均誤差などを用いてコードブック内に配置しておくことで、圧縮処理においてコードベクトルデータの検索時間が短くなり、圧縮処理の高速化を図ることができる。また、ベクトル量子化による圧縮処理後に出力される画像データは、画像の特性からコードベクトルデータのコード番号に偏りが生じるため、完全可逆符号化による符号化効率が高くなり、圧縮データのデータサイズがより小さくなるという利点がある。
【0087】
画像サイズ逆変換部36は、画像復元部34により生成した画像に対して、画像サイズ変換部32で行われた処理と逆の処理を行い、基本サイズMB5と同じサイズの復元画像を生成する。
【0088】
判定部37は、画像サイズ逆変換部36により生成した復元画像と、当該復元画像に対応する基本サイズMB5との相関値(例えば、S/N比)を算出する。また、判定部37は、算出した相関値と予め設定した閾値とを比較することにより、画像サイズ逆変換部36により生成した復元画像の画質の劣化が大きいか否か判定を行う。
【0089】
上記判定の結果、画像サイズ逆変換部36により生成した復元画像の画質の劣化が大きいと判断した場合には、判定部37は、基本サイズMB5を縮小する縮小率を変更し、再度ベクトル量子化による圧縮処理を行うように画像サイズ変換部32等に指示する。また、上記判定の結果、画像サイズ逆変換部36により生成した復元画像の画質の劣化がさほど大きくないと判断した場合には、基本サイズMB5の縮小率およびコードベクトルデータのコード番号を出力する。
【0090】
完全可逆符号化部38は、上記判定部37から出力されたコードベクトルデータのコード番号を少なくとも1つの完全可逆符号化方式により完全可逆符号化処理し、複数の完全可逆符号化方式により完全可逆符号化処理した場合には、完全可逆符号化処理後のデータ量が最も少ないデータを選択する。そして、完全可逆符号化部38は、画像全体で採用した完全可逆符号化方式を示す情報と基本サイズMB5毎の縮小率の情報とを圧縮データのヘッダとして書き込み、完全可逆符号化処理後のデータと合成して圧縮データとして出力する。
【0091】
図5は、上記完全可逆符号化部38の詳細な構成を示すブロック図である。
図5において、第1および第2の完全可逆符号化部21、22は、図4に示す判定部37から供給されるコードベクトルデータのコード番号をそれぞれLZSS圧縮法およびハフマン符号化により圧縮処理し、データ量比較部23に供給する。
【0092】
データ量比較部23は、上記第1および第2の完全可逆符号化部21、22により圧縮処理されたコード番号のデータ量を比較する。また、データ量比較部23は、上記比較の結果、データ量が最も少ない完全可逆符号化方式を選択し、その選択した完全可逆符号化方式を示す情報と基本サイズMB5毎の縮小率の情報とを圧縮データのヘッダとして書き込み、選択した完全可逆符号化処理後のデータと合成して圧縮データとして出力する。
【0093】
なお、図5においては、完全可逆符号化方式として、LZSS圧縮法とハフマン符号化を用いているが、本発明は上記完全可逆符号化方式に限らず、この他の完全可逆符号化方式を用いても良いことは言うまでもなく、また3種類以上の完全可逆符号化方式を採用しても何ら問題はない。このように、完全可逆符号化処理において、複数の異なる完全可逆符号化方式による圧縮処理を行い、データ量が最も少ない完全可逆符号化方式を採用することにより、従来の1種類の完全可逆符号化方式による圧縮処理に比べ、入力画像の種類、つまりコード番号の並び方に応じた最適な完全可逆符号化方式を選択でき、大幅な圧縮率の向上を達成することができる。
【0094】
図4に戻り、圧縮データ出力部39は、上記完全可逆符号化部38により出力される圧縮データを、画像入力部30に入力された入力画像の圧縮データとして、外部に送信したり、内部に記録したりする。
なお、ベクトル量子化圧縮部33で用いられるコードベクトルデータについては、各基本サイズMB5の縮小率および圧縮対象MBのサイズによって異なるコードブックを用いることも可能であるし、共通のコードブックを用いることも可能である。
【0095】
次に、図6を参照しながら、第1の実施形態による画像データ圧縮方法により画像データ圧縮を行った場合のデータの伸長方法について説明する。図6はデータ伸長方法の手順を示すフローチャートである。
【0096】
先ず、ステップS40にて、ベクトル量子化および完全可逆符号化により圧縮処理した圧縮データを入力する。ステップS41にて、上記ステップS40において入力された圧縮データからヘッダ情報を抽出し、さらに完全可逆符号化方式を示す情報および基本サイズMB5の縮小率の情報を抽出し、これらの情報に基づいて、伸長処理の方法を決定する。
【0097】
ステップS42にて、上記ステップS41において抽出した完全可逆符号化方式を示す情報に示された完全可逆符号化方式に従い、圧縮データをデコードする。ステップS43にて、圧縮データをデコードすることにより得られたコード番号に対応するコードベクトルデータをコードブックから抽出する。このステップS43では、ステップS41において抽出した基本サイズMB5の縮小率の情報に基づいて、1つの基本サイズMB5を構成する1つまたは複数のコードベクトルデータが抽出される。
【0098】
ステップS44にて、上記ステップS43において抽出したコードベクトルデータと、ステップS41において抽出した基本サイズMB5の縮小率の情報をもとに、各コードベクトルデータの結合と画像の拡大処理を行い、16画素×16画素の基本サイズMB5の復元画像にする。全ての基本サイズMB5について、上述した処理を繰り返すことにより復元画像は合成され、ステップS45にて、復元画像の再生が行われる。
【0099】
以上説明したように、本発明の第1の実施形態によれば、入力画像1から先ず基本サイズMB5を抽出し、所定の処理方法に併せて上記基本サイズMB5に拡大処理または縮小処理を行い、所望の大きさの縮小MBに分割した後に、ベクトル量子化による圧縮処理を行い、圧縮処理した画像データに基づいて生成した復元画像と上記入力画像1とを比較し、復元画像の画質に問題がなくなるまで基本サイズMB5に拡大処理または縮小処理を繰り返し行い、ベクトル量子化による圧縮処理を行う。さらに、複数の完全可逆符号化方式による完全可逆符号化処理後のデータ量を比較した上で、より圧縮率が高い完全可逆符号化方式を選択する。これにより、復元画像の画質の劣化を最小限に抑えて入力画像1の画像データ圧縮率の大幅な向上を達成することが可能となる。
【0100】
なお、第1の実施形態では、基本サイズMB5を構成する全ての圧縮対象MBについてベクトル量子化による圧縮処理を行った後、復元画像と基本サイズMB5の画像との相関値を算出して復元画像の画質の判定を行うようにしているが、1つの圧縮対象MBについてベクトル量子化による圧縮処理を行うたびに、それまでに圧縮処理した部分の復元画像と、それに対応する部分の基本サイズMB5の画像との相関値を算出して復元画像の画質の判定を行うようにしても良い。このようにすると、復元画像の画質の劣化が大きい場合には、ベクトル量子化による圧縮処理を施していない残り圧縮対象MBを圧縮処理せず、基本サイズMB5を縮小する縮小率を変更することができ、入力画像1の圧縮処理を速やかに行うことができる。
【0101】
また、第1の実施形態では、入力画像1から抽出する基本サイズMB5として16画素×16画素の基本サイズMBを示し例示し、その基本サイズMB5を縮小かつ分割して生成する圧縮対象MBとして、4画素×4画素、2画素×2画素、1画素×1画素の圧縮対象MBを例示したが、本発明はこれに限定されるものではない。
【0102】
また、第1の実施形態では、基本サイズMB5および圧縮対象MBとして、縦方向および横方向が同じ数の画素数で構成される正方形のマクロブロックを用いているが、正方形のマクロブロックに限らず長方形のマクロブロックを用いても良い。例えば、4画素×5画素の長方形マクロブロックを圧縮対象MBに使用しても良い。更に、基本サイズMB5の縮小率として、4分の1、2分の1など圧縮対象MBのサイズの整数倍になるように縮小率を決定する必要はなく、任意のサイズのマクロブロックに設定することが可能である。
【0103】
また、第1の実施形態では、ベクトル量子化による圧縮処理後に復元した復元画像と、当該復元画像に対応する基本サイズMB5の画像との相関値としてS/N比を示しているが、本発明はS/N比に限らず、復元画像と当該復元画像に対応する基本サイズMB5の画像との相関を示す指標であれば問題はなく、上記相関値として、例えば、差分絶対値距離または2乗平均誤差を用いても良い。ただし、上記相関値として差分絶対値距離または2乗平均誤差を用いたときには、上述した図2のステップS7において、相関値が所定の閾値より大きい場合には、図2のステップS3〜ステップS7の処理を行うようにし、相関値が所定の閾値以下場合には、図2のステップS8に進むようにする。
【0104】
また、復元画像と当該復元画像に対応する基本サイズMB5の画像との相関を示す指標として、相関値のヒストグラムを求め、その分布に基づいて図2のステップS3に戻るか、ステップS8に進むか決定するようにしても良い。
【0105】
(第2の実施形態)
図7〜図10を参照しながら、本発明の第2の実施形態について説明する。第1の実施形態では、基本サイズMBを抽出する際、入力された入力画像1に何ら処理を施さずに抽出していたが、第2の実施形態は、入力された入力画像1に対して解像度変換処理を施した後、基本サイズMBを抽出するようにしたものである。
【0106】
図7は、第2の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
なお、図7において、ステップS51およびステップS53〜ステップS61は、上述した第1の実施形態による画像データ圧縮方法のステップS1およびステップS2〜ステップS10にそれぞれ対応し、第1の実施形態による画像データ圧縮方法と同じ処理を行うため、説明は省略する。第2の実施形態では、ステップS52にて、ステップS51において入力された入力画像1に対して解像度変換処理を施して、入力画像1の解像度を変更する。そして、ステップS53にて解像度を変更した入力画像1から基本サイズMBを抽出する。
【0107】
次に、図8を参照しながらステップS52における解像度変換処理について詳細に説明する。
図8は、解像度変換処理方法を説明するための模式図である。
なお、以下の説明では、上記図7に示すステップS51において、640画素×480画素により構成される入力画像61が入力されたものとして説明する。
【0108】
上記ステップS51において、入力画像61が入力されると、ステップS52にて、予め設定しておいた解像度の変化率に従い、入力画像61の解像度を変化させる。例えば、解像度の変化率が25%の場合には、入力画像61の縦方向と横方向との解像度をそれぞれ2分の1にし、320画素×240画素により構成される画像62に変換する。
【0109】
次にステップS53にて、上記ステップS52において得られた解像度変換後の画像62から、例えば16画素×16画素の基本サイズMBを抽出し、第1の実施形態と同様にして、ステップS54〜ステップS61の処理を順次行っていく。
【0110】
また、解像度の変化率の他の例としては、解像度の変化率が50%の場合には、入力画像61の縦方向の解像度を2分の1、横方向の解像度を1分の1にすることで、640画素×240画素により構成される画像63が得られる。
【0111】
また、解像度の変化率が100%の場合には、入力画像61そのものである640画素×480画素により構成される画像64が得られ、解像度の変化率が200%の場合には、入力画像61の縦方向の解像度を1分の2、横方向の解像度を1分の1にすることで、640画素×960画素により構成される画像65が得られる。
同様に、解像度の変化率が400%の場合には、入力画像61の縦方向の解像度を1分の2、横方向の解像度を1分の2にすることで、1280画素×960画素により構成される画像66が得られる。
【0112】
なお、ステップS52における入力画像61に対する解像度変換処理では、予め設定されている解像度の変化率に応じて、解像度を小さくする場合には、例えば、注目画素の画素値とその近傍に存在する画素の画素値との平均値を演算し、演算結果を代表値とすることで入力画像61の解像度を変換する。また、解像度を大きくする場合には、例えば、入力画像61における隣接画素に補間処理を施して入力画像61の解像度を変換する。
また、上記解像度変換処理に限らず、解像度の変化率に併せて画素を間引きして入力画像61の解像度を変換するようにしても良い。また、注目画素と隣接画素間の距離の比率を用いて注目画素の画素値を求める線形補間法を用いて、入力画像61の解像度を変換するようにしても良い。
【0113】
また、ここでは、解像度の変化率として、25%、50%、100%、200%、400%の場合を示したが、他の任意の変化率を設定しても、本発明の効果に何ら影響を与えるものではない。また、解像度の変化率が50%の場合には、画像の縦方向の解像度を2分の1にした例について示しているが、縦方向の解像度を2分の1にするのではなく横方向の解像度を2分の1にしても何ら問題はない。同様に、他の解像度の変化率に対しても、解像度を変える方向は任意に設定することができる。さらに、入力画像61の解像度をここでは640画素×480画素としているが、他の画像サイズおよび解像度であっても何ら問題がないことは言うまでもない。
【0114】
また、図8においては、図7のステップS52において入力画像61の全体を設定した解像度の変化率に従って解像度変換処理を施した後、ステップS53において、例えば16画素×16画素の基本サイズMBを抽出する場合を示しているが、入力画像61から基本サイズMBに相当するマクロブロックを抽出し、抽出したマクロブロックに対して、設定した解像度の変化率に従い解像度変換処理を施すようにしても良い。
【0115】
例えば、解像度の変換率が25%の場合には、入力画像61から32画素×32画素のマクロブロックを抽出して、抽出したマクロブロックの縦方向および横方向のサイズを2分の1にすることで16画素×16画素の基本サイズMBとし、ステップS54〜ステップS61の処理を行うようにしても良い。この処理については、他の任意の解像度の変化率についても同じ処理を行うことができることは言うまでもない。
【0116】
次に、図9を参照しながら、第2の実施形態による画像データ圧縮方法を実現する画像データ圧縮装置の構成について説明する。図9は、第2の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
なお、この図9において、図4に示したブロックと同じ機能を有するブロックには同一の符号を付し、重複する説明は省略する。
【0117】
図9において、81は解像度変換部であり、図8に示すようにして、予め設定された解像度の変化率に従い、画像入力部30に入力された入力画像61に対して解像度変換処理を施す。そして、解像度変換部81は、入力画像61に解像度変換処理を施すことにより、所望の解像度に変換した画像をマクロブロック抽出部31に供給する。
【0118】
次に、図10を参照しながら、第2の実施形態による画像データ圧縮方法でデータ圧縮を行った場合のデータの伸長方法について説明する。
図10は、データ伸長方法の手順を示すフローチャートである。図10において、ステップS71〜ステップS75およびステップS77は、上述した第1の実施形態による画像データ圧縮方法におけるデータ伸長方法のステップS40〜ステップS44およびステップS45にそれぞれ対応し、同じ処理を行うため説明は省略し、第1の実施形態と処理が異なるステップS76について説明を行う。
【0119】
ステップS76では、図7に示したステップS52において予め設定されていた入力画像の解像度の変化率に応じて、ステップS75において得られた復元画像の拡大処理または縮小処理を行う。例えば、ステップ52において、予め設定していた解像度の変化率が25%の場合には、ステップS76では、ステップS75までの処理により復元された復元画像の縦方向および横方向のサイズをそれぞれ2倍することにより、もとの入力画像61と同じサイズの復元画像を得ることができる。
【0120】
また、ステップ52において、設定していた解像度の変化率が400%の場合には、ステップS76では、ステップS75までの処理により復元された画像の縦方向および横方向のサイズをそれぞれ2分の1にすることにより、もとの入力画像61と同じサイズの復元画像を得ることができる。このように、画像圧縮時にステップS52において設定されていた解像度の変化率に応じてステップS76において、復元画像の拡大処理または縮小処理を行うことにより、正常に画像を復元することが可能である。また、ステップS76で復元された復元画像は、次のステップS77において復元画像として外部に出力することが可能である。
【0121】
以上説明したように、本発明の第2の実施形態によれば、入力画像61を予め設定しておいた解像度変化率に従い、入力画像61の解像度を変更してから、第1の実施形態と同様に画像サイズ変換処理およびベクトル量子化による圧縮処理を行うことにより、低周波成分の多い画像などに対しては復元画像の画質を維持したまま、さらなる圧縮率の向上を達成することが可能となる。また、高周波成分の多い画像や復元画像に高い画質が要求される画像およびアプリケーションに対しては、解像度の変化率として与える値を変えることにより、さらなる画質の向上を達成することが可能となる。
【0122】
なお、第2の実施形態では、解像度の変換率を25%、50%、100%、200%、400%の例を示したが、これに限定されるものではない。また、基本サイズMBのサイズとして16画素×16画素の例を示したが、基本サイズMBのサイズは任意に設定することが可能であり、これに限定されるものではない。なお、上述した第1および第2の実施形態において、入力画像を分割し圧縮する手法としてベクトル量子化を用いているが、本発明はこれに限らず、入力画像を複数の大きさに分割して圧縮する手法に適用することができる。
【0123】
(第3の実施形態)
図11〜図13を参照しながら、本発明の第3の実施形態について説明する。第1および第2の実施形態では、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値に基づいて、基本サイズMBを縮小する縮小率を変更するか否か、すなわち画像サイズ変換処理をさらに行うか否かを判定していた。しかしながら、第1および第2の実施形態では、画像サイズ逆変換処理にて拡大処理する際に、量子化誤差が分散され、復元画像の画質劣化を招いてしまうおそれがあった。
【0124】
そこで、第3の実施形態では、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値に加え、復元画像を所定の大きさに分割した(復元画像から所定の大きさで切り出した)画像ブロックと当該画像ブロックに対応する原画像との相関値に基づいて、基本サイズMBを縮小する縮小率を変更するか否かをそれぞれ判定するようにしたものである。
【0125】
図11は、第3の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
なお、図11において、ステップS81〜ステップS86およびステップS90〜ステップS93は、上述した第1の実施形態による画像データ圧縮方法のステップS1〜ステップS6およびステップS7〜ステップS10にそれぞれ対応し、第1の実施形態による画像データ圧縮方法と同じ処理を行うため、説明は省略する。なお、図11では、説明の便宜上、ステップS90は、「原画像との相関値判定▲2▼」と記している。
【0126】
第3の実施形態では、ステップS87にて、ステップS86での画像サイズ逆変換処理により得られた復元画像、すなわち基本サイズMBと同じサイズの復元画像を所定の大きさの比較用の画像ブロックに分割する(復元画像ブロック分割処理)。
【0127】
次に、ステップS88にて、上記ステップS87において分割した画像ブロックと、当該画像ブロックに対応する原画像との相関値を算出し、算出した当該相関値が予め設定された閾値以上であるか否かを判定する。上記判定の結果、当該相関値が所定の閾値より小さい場合には、ステップS83の画像サイズ変換処理に戻り、当該相関値が所定の閾値以上の場合には、ステップS89に進む。このステップS88における処理を「第1の相関値判定処理」と称す。
【0128】
ステップS89にて、上記ステップS87において分割した画像ブロックの中で、上記ステップS88での第1の相関値判定処理を行っていない画像ブロックがあるか否かを判断する。すなわち、ステップS89では、上記ステップS87において分割した画像ブロックの全てに対して、ステップS88での第1の相関値判定処理を行ったか否かを判断する。上記判断の結果、第1の相関値判定処理を行っていない画像ブロックがある場合には、ステップS88に戻り、そうでない場合には、ステップS90に進む。
【0129】
次に、図12を参照しながら、上記ステップS87での復元画像ブロック分割処理およびステップS88での第1の相関値判定処理について詳細に説明する。図12は、上記復元画像ブロック分割処理および第1の相関値判定処理を説明するための模式図である。なお、以下の説明では、上記図11に示すステップS86において、16画素×16画素により構成される復元画像91、すなわち16画素×16画素の基本サイズMBに対応する復元画像が得られたものとして説明する。
【0130】
ステップS87において、ステップS86での画像サイズ逆変換処理により得られた復元画像91が入力されると、復元画像91は、予め設定しておいたサイズの画像ブロックに分割される。ここでは、16画素×16画素の復元画像91から4画素×4画素で構成される画像ブロック92が抽出され、復元画像91は16個の画像ブロック92に分割される。
【0131】
次に、ステップS88にて、上記ステップS87において分割された画像ブロック92と、当該画像ブロックに対応する原画像との相関値(例えば、S/N比)を算出し、さらに算出した相関値と予め設定しておいた閾値とを比較する。上記比較の結果、算出した相関値が閾値より小さい場合には、ステップS83に戻り、ステップS83〜ステップS87の処理を行う。一方、算出した相関値が閾値以上の場合には、ステップS89に進む。
【0132】
そして、分割した他の画像ブロックに対しても、上述した処理を繰り返し行い、全ての画像ブロックにおいて、算出した相関値が閾値以上の場合には、ステップS90に進み、上述した第1の実施形態と同様に、復元画像と、当該復元画像に対応する基本サイズMBの画像との画像全体の相関値に基づいて相関値判定を行い、以降の所定の処理を行う。
【0133】
次に、図13を参照しながら、第3の実施形態による画像データ圧縮方法を実現する画像データ圧縮装置の構成について説明する。図13は、第3の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
なお、この図13において、図4に示したブロックと同じ機能を有するブロックには同一の符号を付し、重複する説明は省略する。
【0134】
図13において、93は復元画像ブロック分割部であり、図12に示すようにして、画像サイズ逆変換部36により生成した復元画像を、予め設定された大きさ(画素サイズ)の画像ブロックに分割する。
【0135】
94は第1の判定部であり、復元画像ブロック分割部93にて分割して得られた復元画像の画像ブロックと、当該画像ブロックに対応する原画像との相関値を算出する。また、第1の判定部94は、算出した相関値と予め設定した閾値とを比較し、画像サイズをさらに変更するか否かを画像サイズ変換部32等に指示する。また、復元画像を分割して得られた全ての画像ブロックが、予め設定した閾値を満足した場合には、第1の判定部94は、復元画像と、当該復元画像に対応した基本サイズMBの画像との画像全体での相関値を算出して判定を行うように第2の判定部37'に指示する。なお、第2の判定部37'は、上記図4に示した判定部37と同じであるので、重複する説明は省略する。
【0136】
なお、第3の実施形態による画像データ圧縮方法により画像データ圧縮を行った場合のデータの伸長方法については、上述した第1の実施形態と同様であるので説明は省略する。
【0137】
以上、説明したように第3の実施形態によれば、第1の実施形態により得られる効果と同様の効果が得られるとともに、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値に加え、復元画像を所定の大きさに分割した画像ブロックと当該画像ブロックに対応する原画像との相関値に基づいて、基本サイズMBを縮小する縮小率を変更するか否かを判定する。
【0138】
これにより、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値、および復元画像の画像ブロックと当該画像ブロックに対応する原画像との相関値に基づいて、圧縮処理により生じた量子化誤差による復元画像の画質劣化、特に画像サイズ逆変換処理による量子化誤差の分散により生じるおそれのある復元画像の画質劣化を詳細に判定することができる。したがって、復元画像の画質の劣化を抑制して、適切な縮小率での圧縮処理が可能になり、さらなる画質の向上を達成することが可能となる。
【0139】
また、復元画像を分割した画像ブロックと当該画像ブロックに対応する原画像との相関値が、1つでも閾値条件を満足しない場合には、上記閾値条件を満足しない画像ブロックが確認された時点で、以降の処理を省略することができ、処理を効率良く行うことができる。
【0140】
なお、上述した第3の実施形態では、分割する画像ブロックのサイズを4画素×4画素としているが、他の画素サイズにしても何ら問題がないことは言うまでもない。同様に、復元画像のサイズ(基本サイズMBのサイズ)を16画素×16画素としたが、他の画素サイズにしても何ら問題がないことは言うまでもない。また、同様に、基本サイズMBを縮小かつ分割して生成する圧縮対象MBも、4画素×4画素、2画素×2画素、1画素×1画素に限定されるものではない。
【0141】
また、第3の実施形態では、基本サイズMBおよび圧縮対象MBとして、縦方向および横方向が同じ数の画素数で構成される正方形のマクロブロックを用いているが、正方形のマクロブロックに限らず長方形のマクロブロックを用いても良い。例えば、4画素×5画素の長方形マクロブロックを圧縮対象MBに使用しても良い。更に、基本サイズMBの縮小率として、4分の1、2分の1など圧縮対象MBのサイズの整数倍になるように縮小率を決定する必要はなく、任意のサイズのマクロブロックに設定することが可能である。
【0142】
また、画像サイズ逆変換処理により得られる復元画像のサイズ(基本サイズMBのサイズ)が、復元画像ブロック分割処理にて抽出・分割する画像ブロックのサイズより小さい場合には、画像サイズ逆変換処理により得られる複数の復元画像(複数の基本サイズMB)を結合して画像ブロックを生成するようにすれば良い。
【0143】
また、第3の実施形態では、復元画像を画像ブロックに分割し判定を行った後、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値に基づいて判定を行うようにしているが、これら2つの処理の順序は任意であり、どちらの処理を始めに行っても同じ効果が得られることは言うまでもない。
【0144】
また、第3の実施形態では、基本サイズMBを構成する全ての圧縮対象MBについてベクトル量子化による圧縮処理を行った後、復元画像と当該復元画像に対応する基本サイズMBの画像との画像全体での相関値、および復元画像を所定の大きさに分割した画像ブロックと当該画像ブロックに対応する原画像との相関値に基づいて、復元画像の画質の判定を行うようにしているが、1つの圧縮対象MBについてベクトル量子化による圧縮処理を行うたびに、それまでに圧縮処理した部分の復元画像とそれに対応する部分の基本サイズMBの画像との相関値、およびそれまでに圧縮処理した部分の復元画像を分割して得られた画像ブロックと当該画像ブロックに対応する原画像との相関値に基づいて、復元画像の画質の判定を行うようにしても良い。このようにすると、復元画像の画質の劣化が大きい場合には、ベクトル量子化による圧縮処理を施していない残り圧縮対象MBを圧縮処理せず、基本サイズMBを縮小する縮小率を変更することができ、入力画像の圧縮処理を速やかに行うことができる。
【0145】
また、第3の実施形態では、ベクトル量子化による圧縮処理後に復元した復元画像と当該復元画像に対応する基本サイズMBの画像との相関値、および復元画像を所定の大きさに分割した画像ブロックと当該画像ブロックに対応する原画像との相関値としてS/N比を示しているが、本発明はS/N比に限らず、復元画像と原画像との相関を示す指標であれば問題はなく、上記相関値として、例えば、差分絶対値距離または2乗平均誤差を用いても良い。ただし、上記相関値として差分絶対値距離または2乗平均誤差を用いたときには、上述した図11のステップS88およびステップS90において、相関値が所定の閾値より大きい場合には、図11のステップS83に戻るようにし、相関値が所定の閾値以下場合には、図11のステップS89およびステップS91にそれぞれ進むようにする。
【0146】
また、第3の実施形態では、基本サイズMBを抽出する際、入力された入力画像に何ら処理を施さずに抽出しているが、上述した第2の実施形態と同様に、入力画像に対して解像度変換処理を施した後、基本サイズMBを抽出するようにしても良い。
また、復元画像と原画像との相関を示す指標として、相関値のヒストグラムを求め、その分布に基づいて画像サイズを変更するか否かを決定するようにしても良い。
【0147】
(その他の実施形態)
上記様々な実施形態に示した各機能ブロックおよび処理手段は、ハードウェアにより構成しても良いし、CPUあるいはMPU、ROMおよびRAM等からなるマイクロコンピュータシステムによって構成し、その動作をROMやRAMに格納された作業プログラムに従って実現するようにしても良い。また、上記各機能ブロックの機能を実現するように当該機能を実現するためのソフトウェアのプログラムをRAMに供給し、そのプログラムに従って上記各機能ブロックを動作させることによって実施したものも、本発明の範疇に含まれる。
【0148】
この場合、上記ソフトウェアのプログラム自体が上述した各実施形態の機能を実現することになり、そのプログラム自体、及びそのプログラムをコンピュータに供給するための手段、例えばかかるプログラムを格納した記録媒体は本発明を構成する。かかるプログラムを記録する記録媒体としては、上記ROMやRAMの他に、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−I、CD−RW、DVD、zip、磁気テープ、あるいは不揮発性のメモリカード等を用いることができる。
【0149】
また、コンピュータが供給されたプログラムを実行することにより、上述の実施形態の機能が実現されるだけではなく、そのプログラムがコンピュータにおいて稼動しているOS(オペレーティングシステム)あるいは他のアプリケーションソフト等の共同して上述の実施形態の機能が実現される場合にもかかるプログラムは本発明の実施形態に含まれることは言うまでもない。
【0150】
さらに、供給されたプログラムがコンピュータの機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに格納された後、そのプログラムの指示に基づいてその機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上述した実施形態の機能が実現される場合にも本発明に含まれることは言うまでもない。
【0151】
【発明の効果】
以上説明したように、本発明によれば、m画素×n画素の画像ブロックで入力された入力画像データに所定の処理を施して上記画像ブロックの大きさを変更し、変更した画像ブロックの画像データを圧縮処理して得られる圧縮画像データを伸長処理して生成したm画素×n画素の復元画像データとm画素×n画素の入力画像データとの相関の強さを求めるとともに、復元画像データに基づいて生成した所定の大きさの分割画像ブロックの画像データと入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求め、求めた相関の強さに基づいて画像ブロックの大きさの変更方法を変えることにより、圧縮処理に適切な画像ブロックの大きさを容易に決定することができ、復元画像の画質を高く維持しながらも入力画像の画像データを高い圧縮率で圧縮処理することができる。また、圧縮処理により生じる量子化誤差による復元画像の画質劣化、特に伸長処理での量子化誤差の分散により生じるおそれのある復元画像の画質劣化をより詳細に判定することができ、さらなる画質の向上を達成することが可能となる。
【図面の簡単な説明】
【図1】ベクトル量子化による画像圧縮および伸長の原理を説明するための図である。
【図2】第1の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
【図3】画像サイズ変換処理を説明するための模式図である。
【図4】第1の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
【図5】完全可逆符号化部38の詳細な構成を示すブロック図である。
【図6】第1の実施形態におけるデータ伸長方法の手順を示すフローチャートである。
【図7】第2の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
【図8】解像度変換処理方法を説明するための模式図である。
【図9】第2の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
【図10】第2の実施形態におけるデータ伸長方法の手順を示すフローチャートである。
【図11】第3の実施形態による画像データ圧縮方法の処理手順を示すフローチャートである。
【図12】復元画像ブロック分割処理および第1の相関値判定処理を説明するための模式図である。
【図13】第3の実施形態による画像データ圧縮装置の一構成例を示すブロック図である。
【符号の説明】
30 画像入力部
31 マクロブロック抽出部
32 画像サイズ変換部
33 ベクトル量子化圧縮部
34 画像復元部
35 コードブック記憶部
36 画像サイズ逆変換部
37 判定部
38 完全可逆符号化部
39 圧縮データ出力部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image data compression apparatus, an image data compression method, a recording medium, and a program, and more particularly to image data compression for compressing image data by changing the block size of image data input in a predetermined size block. It is suitable for use in an apparatus.
[0002]
[Prior art]
Conventionally, when image information of an input image composed of a plurality of pixels is recorded on a recording medium or transmitted via a transmission medium, the image data of the input image is subjected to an encoding process. Data was compressed and recorded on a recording medium or transmitted via a transmission medium.
[0003]
In the encoding process of the image data of the input image, first, an input image composed of a plurality of pixels is divided into macro blocks (image blocks) having a predetermined size (for example, 8 × 8 pixels). Next, by performing predetermined arithmetic processing for each of the divided macro blocks, the high frequency component of the pixel value in the macro block is removed, and the image data of the input image is compressed (encoded). It was.
[0004]
For example, when the input image is a color image, generally, an original signal of the input image or a luminance signal and a color difference signal generated by performing a predetermined color correction process on the original signal of the input image are input. Here, the input original signal, the luminance signal, and the color difference signal are information included in each pixel constituting the color image. When the image data of the color image is compressed, the color image is divided into macro blocks of a predetermined size, and the input original signal, the luminance signal, and the color difference signal are processed for each macro block. Thus, the image data of the color image is compressed.
[0005]
[Problems to be solved by the invention]
However, when the image data of the input image is encoded and compressed as described above, in order to remove the high-frequency component of the image data, an image (high-frequency component) having a large change in pixel value within a macroblock of a predetermined size is used. In the case of an image having a large change in pixel value, the image quality of an image restored from the compressed data for the input image (restored image) is larger than that of an image having a small change in pixel value (an image having a lot of low frequency components).
[0006]
Therefore, when an image having a small image size or an image having many edge portions is input as an input image, there are many portions in which the gradation (pixel value) of the image suddenly changes in a macroblock having a predetermined size. The image has a lot of high frequency components, and the quality of the restored image is greatly degraded. In other words, when an image with a small image size or an image with many edges is input as an input image, if the input image is divided into macroblocks of only a single size and subjected to encoding processing, the image quality of the restored image is improved. There was a problem that deterioration would become large.
[0007]
In general, when the size of a macroblock that divides an input image is increased, the compression rate of the image data of the input image increases, but the image quality of the restored image increases as the frequency of the high-frequency component increases. Therefore, in an image with many low frequency components, the image quality of the restored image can be maintained even if the macroblock size in the compression process is made relatively large in order to increase the compression rate of the image data. However, in order to increase the compression rate of image data while maintaining the image quality of the restored image, it is necessary to appropriately determine the macroblock size in the compression process and divide the input image for images with many high-frequency components. There wasn't.
[0008]
However, the generation distribution of pixel values (image data) such as original signals and luminance signals in the input image is wide, and the shape of the distribution of the pixel values varies depending on the type of the input image. In other words, since the frequency distribution in the macroblock obtained by dividing the input image differs depending on the type of the input image, the compression rate of the image data is maintained while maintaining the image quality of the restored image by calculating the frequency distribution in the macroblock in advance. There is a problem that it is not easy to determine the size of the macroblock in the compression processing that can increase the image quality.
[0009]
The present invention has been made to solve such problems, and easily determines the size of a macroblock in an appropriate compression process according to an input image, while maintaining the quality of a restored image. An object is to enable image data of an input image to be compressed at a high compression rate.
[0010]
[Means for Solving the Problems]
The image data compression apparatus according to the present invention performs predetermined processing on input image data input in an image block of m pixels × n pixels (m and n are natural numbers), and changes the size of the image block. Conversion means, compression means for compressing the image data of the image block whose size has been changed by the image size conversion means, decompressing the compressed image data compressed by the compression means, and Decompression means for generating restored image data, first correlation calculation means for determining the strength of correlation between the restored image data generated by the extension means and the input image data, and the restored image data generated by the extension means Based on the image data of the divided image block of a predetermined size based on the generated image data of the divided image block and the corresponding portion of the input image data. A second correlation calculating means for obtaining the strength of the correlation with the portion corresponding to the split image block; the first correlation strength output from the first correlation calculating means; and the second correlation calculating means. And determining means for determining whether or not to further change the size of the image block by the image size converting means based on the strength of the second correlation to be output.
[0012]
According to another feature of the image data compression apparatus of the present invention, the second correlation calculation unit is configured such that m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers, and The image data of the divided image block of m ′ ≦ m, n ′ ≦ n) is cut out, and the strength of correlation between the image data of the cut out divided image block and the portion corresponding to the divided image block of the input image data is obtained. It is characterized by that.
[0013]
According to another feature of the image data compression apparatus of the present invention, the second correlation calculation means combines the restored image data generated by the decompression means to m ′ pixels × n ′ pixels (m ′ and n ′ are The image data of the divided image block of natural numbers and m ′> m, n ′> n) is generated, and the image data of the generated divided image block and the input image data combined so as to correspond to the divided image block It is characterized by obtaining the strength of correlation.
[0014]
Another feature of the image data compression apparatus according to the present invention is that the compressed image data to be compressed is extracted in units of m pixels × n pixels, and the extracted compressed image data is used as input image data. An image block extracting means for inputting is further provided.
[0015]
Another feature of the image data compression apparatus according to the present invention is that the size of the image block is not further changed by the image size conversion unit for all the input image data input from the image block extraction unit. The image processing apparatus further comprises a complete lossless encoding means for performing a complete lossless encoding process on the compressed image data corresponding to all the input image data compressed by the compression means when determined by the determination means.
[0016]
Another feature of the image data compression apparatus according to the present invention is that the complete lossless encoding means completely compresses compressed image data respectively corresponding to all input image data compressed by the compression means by a plurality of complete lossless encoding methods. Comparing compressed image data that has been subjected to lossless encoding processing and has been subjected to complete lossless encoding processing by a plurality of completely lossless encoding methods using the above-described completely lossless encoding means, the amount of compressed image data that has been subjected to complete lossless encoding processing is the smallest. It is further characterized by further comprising a complete lossless encoding method selection means for selecting a complete lossless encoding method.
[0017]
Another feature of the image data compression apparatus according to the present invention is that the image data compression apparatus further comprises resolution conversion means for converting the resolution of the compressed image data at a predetermined resolution change rate and supplying the converted image data to the image block extraction means. .
[0018]
Another feature of the image data compression device of the present invention is that the strength of the correlation corresponds to each pixel value of the image data related to the restored image based on the restored image data generated by the decompression means, and the image data. It is a correlation value with each pixel value of input image data.
[0019]
Another feature of the image data compression device of the present invention is that the correlation value is an S / N between each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data. It is characterized by a ratio.
Another feature of the image data compression apparatus according to the present invention is that the correlation value is a mean square of each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data. It is an error.
Another feature of the image data compression device of the present invention is that the correlation value is an absolute value of a difference between each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data. It is a distance.
[0020]
Another feature of the image data compression apparatus according to the present invention is that the judging means judges that the size of the image block is further changed by the image size converting means when the correlation value is smaller than a predetermined threshold value. And
Another feature of the image data compression apparatus according to the present invention is that, when the correlation value is larger than a predetermined threshold, the determination unit determines that the size of the image block is further changed by the image size conversion unit. And
[0021]
Another feature of the image data compression apparatus of the present invention is that the compression means and the expansion means respectively compress and expand by vector quantization using a codebook method.
[0022]
Another feature of the image data compression apparatus of the present invention is that each pattern of image blocks of a pixels × b pixels (a and b are natural numbers) in the codebook is adjacent to the pattern with the smallest mean square error. It is arranged to be an address.
[0023]
Another feature of the image data compression apparatus of the present invention is that each pattern of an image block of a pixel × b pixel (a and b are natural numbers) in the codebook is adjacent to the pattern having the smallest difference absolute value distance. It is arranged to be an address.
[0024]
Another feature of the image data compression device of the present invention is that each pattern of image blocks of a pixels × b pixels (a and b are natural numbers) in the codebook are arranged adjacent to each other according to a predetermined rule, A predetermined number of patterns in which the element values of the image blocks of a pixels × b pixels are all the same value are further arranged at adjacent addresses in front of or behind the address where the patterns of the image blocks are arranged according to the predetermined rule. It is characterized by that.
[0031]
The image data compression method of the present invention performs predetermined processing on input image data input in an image block of m pixels × n pixels (m and n are natural numbers) to change the size of the image block. The image data of the image block whose size is changed is compressed, the compressed image data obtained by the compression process is decompressed, and the restored image data of the image block of m pixels × n pixels is generated. The first correlation strength indicating the correlation strength between the restored image data and the input image data is obtained, and image data of a divided image block having a predetermined size is generated based on the generated restored image data. The second correlation strength indicating the strength of correlation between the image data of the generated divided image block and the portion of the input image data corresponding to the divided image block is obtained, and the first correlation is obtained. And determining whether or not to further change the size of the image block based on the strength of the second correlation and the strength of the second correlation.
[0032]
Another feature of the image data compression method of the present invention is that, as the second correlation strength, m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers, m ′ ≦ m, n ′ ≦ n), the image data of the divided image block is cut out, and the strength of correlation between the image data of the cut out divided image block and the portion corresponding to the divided image block of the input image data is obtained. Features.
[0033]
The other feature of the image data compression method of the present invention is that m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers, And m ′> m, n ′> n) image data of the divided image block is generated, and the correlation between the generated image data of the divided image block and the input image data combined so as to correspond to the divided image block is calculated. It is characterized by seeking strength.
[0034]
Another feature of the image data compression method according to the present invention is that the compressed image data to be compressed is extracted in units of image blocks of m pixels × n pixels, and the extracted compressed image data is input image data. When it is determined that the size of the image block is not further changed with respect to all the input image data input as described above, it corresponds respectively to all the input image data obtained by the compression processing. The compressed image data is completely losslessly encoded.
[0035]
Another feature of the image data compression method of the present invention is that the compressed image data respectively corresponding to all the input image data obtained by the compression processing is completely lossless encoded by a plurality of completely lossless encoding methods, A completely lossless encoding method that selects the least amount of compressed image data that has been subjected to complete lossless encoding processing using the plurality of completely lossless encoding methods is selected.
[0036]
Another feature of the image data compression method of the present invention is that the resolution of the compressed image data to be compressed is converted at a predetermined resolution change rate, and the compressed image data converted from the resolution is converted to m pixels × n. Extraction is performed in units of image blocks of pixels, and the extracted compressed image data is input as input image data.
[0037]
Another feature of the image data compression method of the present invention is that the strength of the correlation is determined by each pixel value of the image data relating to the restored image based on the generated restored image data, and the input image data corresponding to the image data. It is a correlation value with each pixel value.
[0038]
Another feature of the image data compression method of the present invention is that the correlation value is an S / N between each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data. It is one of a ratio, a mean square error, and a difference absolute value distance.
[0039]
Another feature of the image data compression method of the present invention is that the compression processing and decompression processing are respectively compressed and decompressed by vector quantization using a codebook method.
[0042]
The computer-readable recording medium of the present invention is characterized by recording a program for causing a computer to function as each of the above-described means.
Another aspect of the computer-readable recording medium of the present invention is that a program for causing a computer to execute the procedure of the image data compression method is recorded.
[0043]
The program according to the present invention causes a computer to function as each of the above means.
Another feature of the program of the present invention is that it causes a computer to execute the procedure of the image data compression method.
[0044]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. In the following embodiments, for example, a still image constituting a moving image is taken as an example of image data to be compressed, and the image quality of the restored image generated from the compressed image data and the compression rate of the image data are further improved. It is.
[0045]
(First embodiment)
First, a first embodiment of the present invention will be described with reference to FIGS.
In the present embodiment, as a technique for dividing and compressing an input image into pixel blocks (macroblocks) of a predetermined size, vector quantization (VQ: Vector Quantization) that can easily perform decompression processing of compressed data ) Is used. First, the principle of image compression and decompression by vector quantization will be described with reference to FIG. 1 taking a still image as an example.
[0046]
FIG. 1 is a diagram for explaining the principle of image compression and decompression by vector quantization.
As shown in FIG. 1, an input image 1 inputted as image data to be compressed is composed of a large number of elements called pixels. Each pixel has information such as a luminance signal (Y signal) converted from an RGB signal and a color signal (U, V signal).
[0047]
An input image block (macroblock) 2 is obtained by extracting a block composed of a plurality of pixels from the input image 1. In the example of FIG. 1, 4 × 4 pixels are selected as the size of the input image block 2, but this size may be anything. The input image block 2 is composed of a plurality of pixels as described above, and the luminance signal value and the color signal value possessed by each pixel can be collected and used as vector data. This is input vector data.
[0048]
Here, some input image blocks 2 in the input image 1 may look almost the same in appearance due to human visual characteristics. A plurality of input image blocks 2 that look the same can be represented by a smaller number of image blocks. The code book 3 has a plurality of image blocks (code vector data) representing many input image blocks 2 on the input image 1. The code vector data is obtained by using the luminance signal value and the chromaticity signal value of each pixel constituting the image block in the code book 3 as vector data.
[0049]
In vector quantization, the entire input image 1 is divided into input image blocks, each input image block 2 is set as input vector data, and code vector data similar to the input vector data is searched from the code book 3. The image can be compressed by transferring only the corresponding code vector data number. In order to reproduce the compressed image and obtain the reproduced image 4, the code vector data corresponding to the transferred number may be read from the code book 3 and applied to the image.
[0050]
In the first embodiment, the input image block 2 obtained by dividing an input image into a predetermined size is subjected to enlargement processing or reduction processing in accordance with the processing method, and then a compression target macro having a predetermined size. It is divided into blocks and vector quantization is performed.
[0051]
FIG. 2 is a flowchart showing a processing procedure of the image data compression method according to the first embodiment.
First, in step S1, input image 1 is input. Next, in step S2, a basic size macro block 5 (hereinafter referred to as “basic size MB”) is extracted from the input image 1. That is, the input image 1 is divided into basic sizes MB5 having a predetermined size. Here, the basic size MB5 is a macroblock having a number of pixels equal to or larger than a compression target macroblock (hereinafter referred to as “compression target MB”) described later.
[0052]
For example, if the compression target MB is 4 pixels × 4 pixels in size as shown in FIG. 3, the basic size MB5 may be 16 pixels × 16 pixels. Here, a basic size MB of 16 pixels × 16 pixels is shown as an example, but this size can be set arbitrarily.
[0053]
Next, in step S3, image size conversion processing is performed for one basic size MB5 among the basic sizes MB5 extracted in step S2. In the image size conversion process, the basic size MB5 is reduced at a predetermined reduction rate, the size of the basic size MB5 is changed, and then divided into compression target MBs of a predetermined size. Details of the image size conversion processing in step S3 will be described later.
[0054]
In step S4, the compression processing by the vector quantization described above is performed on the compression target MB divided in the predetermined size in step S3, and the code number of the code vector data is output as the processing result. In step S4, compression processing by vector quantization is performed on all the compression target MBs divided in the predetermined size in step S3.
[0055]
Next, in step S5, the image is restored based on the code numbers obtained for all the compression target MBs in step S4. That is, in step S5, code vector data corresponding to the code number is read from the code book, and the read code vector data is combined to restore an image.
[0056]
In step S6, the image composed of the code vector data restored in step S5 is enlarged to the same size as the basic size MB5. Thereby, a restored image having the same size as the basic size MB5 can be obtained.
[0057]
Next, in step S7, a correlation value between the restored image obtained in step S6 and the image of the basic size MB5 corresponding to the restored image, for example, the S / N ratio is calculated and is equal to or greater than a predetermined threshold value. It is determined whether or not. That is, in step S7, it is determined whether there is a problem with the image quality of the restored image generated based on the image data compressed by vector quantization.
[0058]
As a result of the determination, if the correlation value is smaller than the predetermined threshold value, the process returns to the image size conversion process in step S3 described above, the predetermined reduction ratio for reducing the basic size MB5 is changed, and the above-described steps S3 to S7 are performed. Repeat the process.
On the other hand, as a result of the determination, if the correlation value is equal to or greater than a predetermined threshold, the reduction rate of the basic size MB5 in step S3 and the code number obtained in step S4 are output, and the process proceeds to step S8.
[0059]
In step S8, it is determined whether there is a basic size MB5 that has not been subjected to compression processing by vector quantization. As a result of the determination, if there is a basic size MB5 that has not been subjected to compression processing by vector quantization, the process returns to step S3, and the processes of steps S3 to S7 described above are performed.
On the other hand, if there is no basic size MB5 that has not been subjected to compression processing by vector quantization, that is, if compression processing by vector quantization has been completed for all the basic sizes MB5 extracted in step S2, the process proceeds to step S9. move on.
[0060]
Next, in step S9, the code numbers respectively obtained for all the basic sizes MB5 by the above-described processing are subjected to complete lossless encoding processing.
Here, in the complete lossless encoding process, the code number is subjected to a complete lossless encoding process by at least one complete lossless encoding method, for example, LZSS compression method or Huffman encoding. When the complete lossless encoding process is performed using a plurality of completely lossless encoding methods, the data amount after the complete lossless encoding process is compared, and the data after the complete lossless encoding process with the smallest data amount is selected. In addition, information indicating the complete lossless encoding method employed for the entire image and information on the reduction ratio for each basic size MB5 are written as the header of the compressed data, combined with the data after the complete lossless encoding process, and output as compressed data To do.
[0061]
Next, in step S10, the compressed data output in step S9 is output as compressed data of the input image input in step S1, and the process ends.
[0062]
Note that the code vector data used in step S4 described above can use different codebooks depending on the reduction rate of each basic size MB5 and the size of the compression target MB, or a common codebook can be used. Is possible.
[0063]
Next, the image size conversion process in step S3 shown in FIG. 2 will be described in detail with reference to FIG.
FIG. 3 is a schematic diagram for explaining the image size conversion process.
In the following description, a macroblock composed of X pixels in the horizontal direction and Y pixels in the vertical direction and composed of (X × Y) pixels is described as a macroblock of X pixels × Y pixels. . FIG. 3 shows an example in which a basic size MB5 of 16 pixels × 16 pixels is extracted from the input image 1 in step S2 shown in FIG.
[0064]
First, after the basic size MB5 is extracted in step S2 in FIG. 2, in the first image size conversion process, the vertical size and the horizontal size of the extracted basic size MB5 are each a quarter size, that is, The basic size MB5 is reduced to a quarter to obtain a reduced macroblock 6 (hereinafter referred to as “reduced MB”) of 4 × 4 pixels. The obtained 4 pixel × 4 pixel reduced MB6 is set as the compression target MB7, and the processing of step S4 to step S7 shown in FIG. 2, such as compression processing by vector quantization, is performed.
[0065]
In the reduction process, the average value of the pixel value of the target pixel and the pixel values of the pixels existing in the vicinity thereof is calculated, and the calculation result is used as a representative value to obtain the reduced MB6. In addition to the above reduction processing, for example, a basic size MB5 of 16 pixels × 16 pixels is divided into 16 blocks of 4 pixels × 4 pixels, an average value of pixel values is calculated in each block, and the calculation result May be obtained as a representative value, or a reduced MB6 may be obtained using a pixel value extracted at a predetermined pixel interval in a basic size MB5 of 16 pixels × 16 pixels as a representative value, that is, combined with a predetermined reduction ratio. The pixels may be thinned out to obtain a reduced MB6. Further, the reduced MB6 may be obtained by using a linear interpolation method that obtains the ratio of the distance between the pixel of interest and the pixels existing in the vicinity thereof, and obtains the pixel value of the pixel of interest from the pixel values in the vicinity of the ratio. good.
[0066]
The processing in steps S4 to S7 shown in FIG. 2 is performed on the compression target MB7, and when the processing returns to step S3 again according to the determination result in step S7, the reduction ratio for reducing the basic size MB5 is changed. To do. Then, the basic size MB5 is reduced to 1/2 the horizontal size and 1/4 the vertical size to obtain a reduced MB8 of 8 pixels × 4 pixels. The reduced MB8 of 8 pixels × 4 pixels is divided into two macro blocks 9 of 4 pixels × 4 pixels, and this is used as a compression target MB, and the processing of steps S4 to S7 shown in FIG. 2 is performed.
[0067]
When the process returns to step S3 again as a result of the process in the reduced MB8 of 8 pixels × 4 pixels obtained by reducing the basic size MB5, the reduction ratio for reducing the basic size MB5 is changed. Then, the basic size MB5 is reduced to half the horizontal size and half the vertical size to obtain a reduced MB10 of 8 pixels × 8 pixels. The 8-pixel × 8-pixel reduced MB 10 is divided into four 4-pixel × 4-pixel macroblocks 11, and the processing is performed from step S 4 to step S 7 shown in FIG.
[0068]
Then, when the process returns to step S3 again, the basic size MB5 is reduced to a half size in the horizontal direction and to a half size in the vertical direction to obtain 16 pixels. A reduced MB12 of x8 pixels is obtained. The reduced MB12 of 16 pixels × 8 pixels is divided into eight macro blocks 13 of 4 pixels × 4 pixels, and the processing of steps S4 to S7 shown in FIG.
[0069]
When the process returns to step S3 again, the reduction ratio for reducing the basic size MB5 is changed, and the horizontal size is reduced to 1/1 and the vertical size is reduced to 1/1. To do. In other words, the size of the input basic size MB5 of 16 pixels × 16 pixels is not changed, and the reduced MB14 is set. The reduced MB 14 is divided into 16 4-pixel × 4-pixel macroblocks 15, and this is used as a compression target MB, and the processing of steps S 4 to S 7 shown in FIG. 2 is performed.
[0070]
Furthermore, when the process returns to step S3 again, the reduction ratio for reducing the basic size MB5 is changed, and the horizontal size is set to 1/2 and the vertical size is set to 1/2. Reduce processing. That is, the horizontal size and the vertical size of the input basic size MB5 of 16 pixels × 16 pixels are each doubled. Thereafter, it may be divided into macro blocks of 4 pixels × 4 pixels, but in FIG. 3, the macro block of 2 pixels × 2 pixels is converted from the macro block 14 of 16 pixels × 16 pixels, which is an operation equivalent to the processing described above. It is divided into blocks 16. At this time, 64 macroblocks 16 of 2 pixels × 2 pixels are obtained, and the processing of steps S4 to S7 shown in FIG.
[0071]
When the process returns to step S3 again, the reduction ratio for reducing the basic size MB5 is changed, and the horizontal size is reduced to 1/4 and the vertical size is reduced to 1/4. To do. In other words, the horizontal size and the vertical size of the input basic size MB5 of 16 pixels × 16 pixels are each enlarged four times. Thereafter, it may be divided into macro blocks of 4 pixels × 4 pixels, but in FIG. 3, the macro block of 1 pixel × 1 pixel is changed from the macro block 14 of 16 pixels × 16 pixels, which is an operation equivalent to the processing described above. It is divided into blocks 17. At this time, 256 macroblocks 17 of 1 pixel × 1 pixel are obtained.
[0072]
The processing of steps S4 to S7 can be performed using the macroblock 17 of 1 pixel × 1 pixel as the compression target MB. However, since the macroblock 17 represents the pixel itself, the steps S4 to S7 are performed. It is also possible to perform the complete lossless encoding process in step S9 without outputting the above operation and output the compressed data in step S10.
[0073]
Thus, as a result of the determination based on the correlation value between the restored image and the basic size MB5 image in step S7 shown in FIG. 2, the restored image (reproduced image) is obtained with the reduced MB size obtained by the current reduction rate. If it is determined that there is a problem with the image quality, the image data compression can be performed while suppressing the deterioration of the image quality of the restored image (reproduced image) by changing the reduction ratio for reducing the basic size MB5 in step S3.
[0074]
Further, as a result of the determination based on the correlation value in the step S7, if the predetermined threshold condition is satisfied, the image data can be compressed with a larger reduced MB size. Can be achieved.
[0075]
In the image size conversion process shown in FIG. 3, the case where the basic size MB5 of 16 pixels × 16 pixels is used is shown as an example, but the size of the basic size MB5 is an arbitrary basic size. MB can be used.
[0076]
Further, regarding the change in the reduction ratio for reducing the basic size MB5, the change in the reduction ratio shown in FIG. 3 is only an example, and there is no problem even if other reduction methods are adopted. In FIG. 3, when changing the reduction ratio for reducing the basic size MB5, the vertical reduction ratio is always equal to or less than the horizontal reduction ratio, but the vertical reduction ratio is equal to or greater than the horizontal reduction ratio. It goes without saying that it can be. That is, if the reduction ratio in the horizontal direction and the vertical direction is described as (X, Y), for example, the reduction ratio is (1/4, 1/4) → (1/4, 1/2) → (1/2, (1/4) → (1/2, 1/2) →... Or (1/4, 1/4) → (1/4, 1/2) → (1/2, 1 / 2) → ... may be changed.
[0077]
Further, in step S7 of FIG. 2, it is determined whether or not to change the reduction ratio for reducing the basic size MB5 based on the correlation value between the restored image and the image of the basic size MB5 corresponding to the restored image. By appropriately setting a predetermined threshold condition, the reduction ratio after the arbitrary reduction ratio is not forcibly changed (the process does not return to step S3 shown in FIG. 2), or the arbitrary reduction ratio is set. It may be prohibited to output image data compressed at a rate. For example, by setting a threshold condition that can always be satisfied as the predetermined threshold condition, it is possible to prevent the subsequent reduction rate from being changed, and conversely by setting a threshold condition that cannot always be satisfied. Thus, it is possible to prohibit the output of the compressed image data at an arbitrary reduction ratio.
[0078]
Moreover, although the compression target MB of 4 pixels × 4 pixels, 2 pixels × 2 pixels, and 1 pixel × 1 pixel is exemplified as the size of the compression target MB for performing the compression process by vector quantization, this is also optional. Even if the size of the MB to be compressed is used, the effect of the present invention is not affected at all.
[0079]
In the image size conversion process shown in FIG. 3, the basic size MB5 of 16 pixels × 16 pixels is used, the basic size MB5 is reduced and divided into macro blocks of 4 pixels × 4 pixels, 2 pixels × 2 pixels. Although an example of performing compression processing by vector quantization is shown, for example, when the basic size MB5 is reduced to a quarter in the horizontal direction and the vertical direction to form a macroblock of 4 pixels × 4 pixels, Instead of reducing the basic size MB5, code vector data of 16 pixels × 16 pixels is prepared in the code book, and the size of the compression target MB by vector quantization is changed from 4 pixels × 4 pixels to 16 pixels × 16 pixels. The same effect can be obtained.
[0080]
In this way, instead of reducing the basic size MB5 and dividing it into macro blocks of 4 pixels × 4 pixels, 2 pixels × 2 pixels, etc., the macro block size (16 pixels × 16 pixels, 8 pixels) suitable for the reduction ratio is used. × 16 pixels, 8 pixels × 8 pixels, 4 pixels × 8 pixels, 4 pixels × 4 pixels, 2 pixels × 2 pixels, 1 pixel × 1 pixel), and code vector data corresponding to them is prepared in the codebook The effect similar to the effect of the present invention can be obtained by performing the compression process by vector quantization.
[0081]
Next, the configuration of an image data compression apparatus that implements the above-described image data compression method will be described with reference to FIG. FIG. 4 is a block diagram illustrating a configuration example of the image data compression device according to the first embodiment.
[0082]
The input image 1 is input to the image input unit 30. The macroblock extraction unit 31 extracts the basic size MB5 from the input image 1. As shown in FIG. 3, the image size conversion unit 32 converts the size of the basic size MB5 extracted by the macroblock extraction unit 31 at a predetermined reduction rate, and performs compression processing by the vector quantization compression unit 33 A target MB is generated.
[0083]
The vector quantization compression unit 33 performs a compression process on the compression target MB supplied from the image size conversion unit 32 using the code vector data constituting the code book held in the code book storage unit 35. The image restoration unit 34 reads out and reads out the code vector data held in the code book storage unit 35 based on the code number of the code vector data to be output as a result of the compression processing by the vector quantization compression unit 33. An image is generated by combining the code vector data.
[0084]
Here, the code book includes, for example, 2048 code vector data. Further, in the code book of the same size in the code book, the mean square error with the code vector data of adjacent addresses is the smallest. It is arranged to be. The code vector data of the same size may be arranged in the code book so that the difference absolute value distance between the code vector data of adjacent addresses is the smallest.
[0085]
Further, in the code book in which the code vector data is arranged as described above, the top address (address adjacent to the front of the minimum address of the code vector data) or the last address (the code) In addition, the code vector data size is the same and the elements all have the same value, and the code vector data is different from each other with the same size solid pattern. Vector data) may be arranged in the code book in a predetermined number (for example, pixel gradation values).
Any method may be employed as long as the code vector data is arranged in the code book so as to reduce distortion with the code vector data of addresses adjacent to each other.
[0086]
As described above, by previously arranging the code vector data in the code book using the mean square error or the like, the search time for the code vector data is shortened in the compression processing, and the compression processing can be speeded up. it can. In addition, since the image data output after the compression processing by vector quantization is biased in the code number of the code vector data due to the characteristics of the image, the encoding efficiency by the complete lossless encoding is increased, and the data size of the compressed data is reduced. There is an advantage of being smaller.
[0087]
The image size inverse conversion unit 36 performs a process opposite to the process performed by the image size conversion unit 32 on the image generated by the image restoration unit 34, and generates a restored image having the same size as the basic size MB5.
[0088]
The determination unit 37 calculates a correlation value (for example, S / N ratio) between the restored image generated by the image size inverse transform unit 36 and the basic size MB5 corresponding to the restored image. Further, the determination unit 37 determines whether or not the degradation of the image quality of the restored image generated by the image size inverse conversion unit 36 is large by comparing the calculated correlation value with a preset threshold value.
[0089]
As a result of the determination, if it is determined that the image quality of the restored image generated by the image size inverse conversion unit 36 is greatly deteriorated, the determination unit 37 changes the reduction ratio for reducing the basic size MB5 and performs vector quantization again. The image size conversion unit 32 is instructed to perform the compression process. If it is determined as a result of the determination that the image quality of the restored image generated by the image size inverse conversion unit 36 is not significantly degraded, the reduction ratio of the basic size MB5 and the code number of the code vector data are output.
[0090]
The complete lossless encoding unit 38 performs a complete lossless encoding process on the code number of the code vector data output from the determination unit 37 using at least one complete lossless encoding method, and uses a plurality of complete lossless encoding methods. In the case of the conversion process, data having the smallest data amount after the complete lossless encoding process is selected. Then, the complete lossless encoding unit 38 writes information indicating the complete lossless encoding method employed for the entire image and information on the reduction ratio for each basic size MB5 as the header of the compressed data, and the data after the complete lossless encoding process And output as compressed data.
[0091]
FIG. 5 is a block diagram showing a detailed configuration of the complete lossless encoding unit 38.
In FIG. 5, the first and second completely lossless encoding units 21 and 22 compress the code numbers of the code vector data supplied from the determination unit 37 shown in FIG. 4 by the LZSS compression method and the Huffman encoding, respectively. To the data amount comparison unit 23.
[0092]
The data amount comparison unit 23 compares the data amounts of the code numbers compressed by the first and second complete lossless encoding units 21 and 22. Further, the data amount comparison unit 23 selects the completely lossless encoding method having the smallest data amount as a result of the comparison, information indicating the selected complete lossless encoding method, and information on the reduction rate for each basic size MB5. As the header of the compressed data, and is combined with the selected data after the complete lossless encoding process and output as compressed data.
[0093]
In FIG. 5, the LZSS compression method and the Huffman coding are used as the complete lossless coding method. However, the present invention is not limited to the complete lossless coding method, and other completely lossless coding methods are used. Needless to say, there is no problem even if three or more completely lossless encoding methods are employed. In this way, in the completely lossless encoding process, a compression process using a plurality of different completely lossless encoding methods is performed, and a completely lossless encoding method with the least amount of data is adopted, so that one type of conventional completely lossless encoding is performed. Compared with the compression processing based on the method, an optimal complete lossless encoding method corresponding to the type of input image, that is, the arrangement of code numbers, can be selected, and a significant improvement in compression rate can be achieved.
[0094]
Returning to FIG. 4, the compressed data output unit 39 transmits the compressed data output from the complete lossless encoding unit 38 to the outside as compressed data of the input image input to the image input unit 30, or internally. Or record.
For the code vector data used in the vector quantization compression unit 33, a different code book can be used depending on the reduction rate of each basic size MB5 and the size of the compression target MB, or a common code book is used. Is also possible.
[0095]
Next, a data decompression method when image data compression is performed by the image data compression method according to the first embodiment will be described with reference to FIG. FIG. 6 is a flowchart showing the procedure of the data decompression method.
[0096]
First, in step S40, compressed data compressed by vector quantization and completely lossless encoding is input. In step S41, header information is extracted from the compressed data input in step S40, and information indicating the complete lossless encoding method and information on the reduction rate of the basic size MB5 are extracted. Based on these information, Determine the decompression method.
[0097]
In step S42, the compressed data is decoded in accordance with the complete lossless encoding method indicated in the information indicating the complete lossless encoding method extracted in step S41. In step S43, code vector data corresponding to the code number obtained by decoding the compressed data is extracted from the code book. In step S43, one or a plurality of code vector data constituting one basic size MB5 is extracted based on the reduction rate information of the basic size MB5 extracted in step S41.
[0098]
In step S44, based on the code vector data extracted in step S43 and the information on the reduction ratio of the basic size MB5 extracted in step S41, the code vector data is combined and the image is enlarged to obtain 16 pixels. A restored image having a basic size MB5 of × 16 pixels is used. For all the basic sizes MB5, the restored image is synthesized by repeating the above-described processing, and the restored image is reproduced in step S45.
[0099]
As described above, according to the first embodiment of the present invention, the basic size MB5 is first extracted from the input image 1, and the basic size MB5 is enlarged or reduced according to a predetermined processing method. After dividing into reduced MBs of a desired size, compression processing by vector quantization is performed, the restored image generated based on the compressed image data is compared with the input image 1, and there is a problem in the quality of the restored image. The enlargement process or the reduction process is repeatedly performed on the basic size MB5 until there is no more, and the compression process by vector quantization is performed. Furthermore, after comparing the data amounts after the complete lossless encoding processes using a plurality of completely lossless encoding methods, a completely lossless encoding method with a higher compression rate is selected. As a result, it is possible to achieve a significant improvement in the image data compression rate of the input image 1 while minimizing the deterioration of the image quality of the restored image.
[0100]
In the first embodiment, after performing compression processing by vector quantization on all the compression target MBs constituting the basic size MB5, the correlation value between the restored image and the image of the basic size MB5 is calculated to restore the restored image. However, every time compression processing by vector quantization is performed on one compression target MB, the restored image of the portion compressed so far and the basic size MB5 of the corresponding portion The image quality of the restored image may be determined by calculating a correlation value with the image. In this way, when the image quality of the restored image is greatly degraded, the reduction rate for reducing the basic size MB5 may be changed without compressing the remaining compression target MB that has not been subjected to compression processing by vector quantization. The input image 1 can be quickly compressed.
[0101]
Further, in the first embodiment, the basic size MB5 extracted from the input image 1 is illustrated as an example of a basic size MB of 16 pixels × 16 pixels, and the compression target MB generated by reducing and dividing the basic size MB5 is as follows: Although the compression target MB of 4 pixels × 4 pixels, 2 pixels × 2 pixels, 1 pixel × 1 pixel is illustrated, the present invention is not limited to this.
[0102]
In the first embodiment, square macroblocks having the same number of pixels in the vertical and horizontal directions are used as the basic size MB5 and the compression target MB. However, the basic size MB5 and the compression target MB are not limited to square macroblocks. A rectangular macroblock may be used. For example, a rectangular macroblock of 4 pixels × 5 pixels may be used for the compression target MB. Furthermore, as the reduction rate of the basic size MB5, it is not necessary to determine the reduction rate to be an integral multiple of the size of the compression target MB, such as 1/4 or 1/2, and it is set to a macroblock of any size. It is possible.
[0103]
In the first embodiment, the S / N ratio is shown as a correlation value between a restored image restored after compression processing by vector quantization and an image of the basic size MB5 corresponding to the restored image. Is not limited to the S / N ratio, and there is no problem as long as it is an index indicating the correlation between the restored image and the image of the basic size MB5 corresponding to the restored image. As the correlation value, for example, the difference absolute value distance or the square An average error may be used. However, when the difference absolute value distance or the mean square error is used as the correlation value, if the correlation value is larger than a predetermined threshold value in step S7 of FIG. 2, the steps S3 to S7 in FIG. Processing is performed, and if the correlation value is equal to or smaller than a predetermined threshold value, the process proceeds to step S8 in FIG.
[0104]
Further, whether a histogram of correlation values is obtained as an index indicating the correlation between the restored image and the image of the basic size MB5 corresponding to the restored image, and the process returns to step S3 in FIG. 2 or proceeds to step S8 based on the distribution. It may be determined.
[0105]
(Second Embodiment)
A second embodiment of the present invention will be described with reference to FIGS. In the first embodiment, when the basic size MB is extracted, the input image 1 is extracted without performing any processing. However, the second embodiment is performed on the input image 1 that has been input. After the resolution conversion process is performed, the basic size MB is extracted.
[0106]
FIG. 7 is a flowchart showing the processing procedure of the image data compression method according to the second embodiment.
In FIG. 7, step S51 and steps S53 to S61 respectively correspond to step S1 and step S2 to step S10 of the image data compression method according to the first embodiment described above, and image data according to the first embodiment. Since the same processing as the compression method is performed, the description is omitted. In the second embodiment, in step S52, resolution conversion processing is performed on the input image 1 input in step S51 to change the resolution of the input image 1. In step S53, the basic size MB is extracted from the input image 1 whose resolution has been changed.
[0107]
Next, the resolution conversion process in step S52 will be described in detail with reference to FIG.
FIG. 8 is a schematic diagram for explaining the resolution conversion processing method.
In the following description, it is assumed that the input image 61 composed of 640 pixels × 480 pixels is input in step S51 shown in FIG.
[0108]
In step S51, when the input image 61 is input, in step S52, the resolution of the input image 61 is changed in accordance with a preset resolution change rate. For example, when the rate of change in resolution is 25%, the resolution of the input image 61 in the vertical and horizontal directions is halved and converted to an image 62 composed of 320 pixels × 240 pixels.
[0109]
Next, in step S53, a basic size MB of, for example, 16 pixels × 16 pixels is extracted from the resolution-converted image 62 obtained in step S52, and steps S54 to S are performed in the same manner as in the first embodiment. The process of S61 is sequentially performed.
[0110]
As another example of the resolution change rate, when the resolution change rate is 50%, the vertical resolution of the input image 61 is halved and the horizontal resolution is halved. Thus, an image 63 composed of 640 pixels × 240 pixels is obtained.
[0111]
Further, when the resolution change rate is 100%, an image 64 composed of 640 pixels × 480 pixels, which is the input image 61 itself, is obtained, and when the resolution change rate is 200%, the input image 61 is obtained. An image 65 composed of 640 pixels × 960 pixels is obtained by reducing the resolution in the vertical direction to 1/2 and the resolution in the horizontal direction to 1/1.
Similarly, when the rate of change in resolution is 400%, the input image 61 is composed of 1280 pixels × 960 pixels by setting the vertical resolution to 1/2 and the horizontal resolution to 1/2. An image 66 to be obtained is obtained.
[0112]
In the resolution conversion process for the input image 61 in step S52, when the resolution is reduced according to a preset change rate of the resolution, for example, the pixel value of the pixel of interest and the pixels existing in the vicinity thereof are changed. The resolution of the input image 61 is converted by calculating an average value with the pixel value and using the calculation result as a representative value. Further, when increasing the resolution, for example, an interpolation process is performed on adjacent pixels in the input image 61 to convert the resolution of the input image 61.
In addition to the resolution conversion process, the resolution of the input image 61 may be converted by thinning out pixels in accordance with the resolution change rate. Further, the resolution of the input image 61 may be converted using a linear interpolation method for obtaining the pixel value of the target pixel using the ratio of the distance between the target pixel and the adjacent pixel.
[0113]
In addition, here, the change rate of resolution is 25%, 50%, 100%, 200%, and 400%. However, even if any other change rate is set, the effect of the present invention is not affected. It has no effect. Further, in the case where the rate of change in resolution is 50%, an example in which the vertical resolution of the image is halved is shown. However, the vertical resolution is not halved, but the horizontal direction. There is no problem even if the resolution is halved. Similarly, the direction of changing the resolution can be arbitrarily set with respect to the rate of change of other resolutions. Furthermore, although the resolution of the input image 61 is 640 pixels × 480 pixels here, it is needless to say that there is no problem with other image sizes and resolutions.
[0114]
In FIG. 8, after performing resolution conversion processing according to the resolution change rate set for the entire input image 61 in step S52 of FIG. 7, for example, a basic size MB of 16 pixels × 16 pixels is extracted in step S53. However, a macro block corresponding to the basic size MB may be extracted from the input image 61, and resolution conversion processing may be performed on the extracted macro block according to the set resolution change rate.
[0115]
For example, when the resolution conversion rate is 25%, a macroblock of 32 pixels × 32 pixels is extracted from the input image 61, and the vertical and horizontal sizes of the extracted macroblock are halved. As a result, the basic size MB of 16 pixels × 16 pixels may be set, and the processing in steps S54 to S61 may be performed. It goes without saying that the same process can be performed for the change rate of any other resolution.
[0116]
Next, the configuration of an image data compression apparatus that implements the image data compression method according to the second embodiment will be described with reference to FIG. FIG. 9 is a block diagram illustrating a configuration example of an image data compression apparatus according to the second embodiment.
In FIG. 9, blocks having the same functions as those shown in FIG. 4 are denoted by the same reference numerals, and redundant description is omitted.
[0117]
In FIG. 9, reference numeral 81 denotes a resolution conversion unit, which performs resolution conversion processing on the input image 61 input to the image input unit 30 in accordance with a preset resolution change rate as shown in FIG. Then, the resolution conversion unit 81 supplies the macroblock extraction unit 31 with an image converted to a desired resolution by performing resolution conversion processing on the input image 61.
[0118]
Next, a data expansion method when data compression is performed by the image data compression method according to the second embodiment will be described with reference to FIG.
FIG. 10 is a flowchart showing the procedure of the data decompression method. In FIG. 10, Steps S71 to S75 and Step S77 correspond to Steps S40 to S44 and Step S45 of the data decompression method in the image data compression method according to the above-described first embodiment, respectively, and will be described for performing the same processing. Step S76, which is different from the process of the first embodiment, will be described.
[0119]
In step S76, the restored image obtained in step S75 is enlarged or reduced according to the resolution change rate of the input image previously set in step S52 shown in FIG. For example, when the preset resolution change rate is 25% in step 52, in step S76, the vertical and horizontal sizes of the restored image restored by the processing up to step S75 are each doubled. Thus, a restored image having the same size as the original input image 61 can be obtained.
[0120]
If the resolution change rate set in step 52 is 400%, in step S76, the vertical and horizontal sizes of the image restored by the processing up to step S75 are each halved. By doing so, a restored image having the same size as the original input image 61 can be obtained. As described above, it is possible to normally restore the image by performing the enlargement process or the reduction process of the restored image in step S76 according to the resolution change rate set in step S52 at the time of image compression. Further, the restored image restored in step S76 can be output to the outside as a restored image in the next step S77.
[0121]
As described above, according to the second embodiment of the present invention, after changing the resolution of the input image 61 in accordance with the resolution change rate set in advance for the input image 61, Similarly, by performing compression processing by image size conversion processing and vector quantization, it is possible to achieve further improvement in compression rate while maintaining the quality of restored images for images with many low frequency components. Become. Further, for images and applications that require high image quality for images with many high-frequency components and restored images, it is possible to achieve further improvement in image quality by changing the value given as the rate of change in resolution.
[0122]
In the second embodiment, examples of the resolution conversion rate of 25%, 50%, 100%, 200%, and 400% are shown, but the present invention is not limited to this. Moreover, although the example of 16 pixels x 16 pixels is shown as the size of the basic size MB, the size of the basic size MB can be arbitrarily set, and is not limited to this. In the first and second embodiments described above, vector quantization is used as a method for dividing and compressing the input image. However, the present invention is not limited to this, and the input image is divided into a plurality of sizes. Can be applied to the compression method.
[0123]
(Third embodiment)
A third embodiment of the present invention will be described with reference to FIGS. In the first and second embodiments, whether or not to change the reduction ratio for reducing the basic size MB based on the correlation value of the entire image between the restored image and the image of the basic size MB corresponding to the restored image. That is, it is determined whether or not to further perform image size conversion processing. However, in the first and second embodiments, when the enlargement process is performed by the inverse image size conversion process, there is a possibility that the quantization error is dispersed and the quality of the restored image is deteriorated.
[0124]
Therefore, in the third embodiment, in addition to the correlation value of the entire image between the restored image and the basic size MB image corresponding to the restored image, the restored image is divided into a predetermined size (from the restored image to a predetermined size). Whether or not to change the reduction ratio for reducing the basic size MB is determined based on the correlation value between the image block (cut out by size) and the original image corresponding to the image block.
[0125]
FIG. 11 is a flowchart illustrating a processing procedure of an image data compression method according to the third embodiment.
In FIG. 11, Steps S81 to S86 and Steps S90 to S93 correspond to Steps S1 to S6 and Steps S7 to S10 of the image data compression method according to the first embodiment described above, respectively. Since the same processing as the image data compression method according to the embodiment is performed, the description thereof is omitted. In FIG. 11, for convenience of description, step S90 is described as “determination of correlation value with original image (2)”.
[0126]
In the third embodiment, in step S87, a restored image obtained by the image size inverse transform process in step S86, that is, a restored image having the same size as the basic size MB is used as an image block for comparison having a predetermined size. Divide (restored image block division processing).
[0127]
Next, in step S88, a correlation value between the image block divided in step S87 and the original image corresponding to the image block is calculated, and whether or not the calculated correlation value is greater than or equal to a preset threshold value. Determine whether. As a result of the determination, if the correlation value is smaller than the predetermined threshold value, the process returns to the image size conversion process in step S83. If the correlation value is equal to or larger than the predetermined threshold value, the process proceeds to step S89. The processing in step S88 is referred to as “first correlation value determination processing”.
[0128]
In step S89, it is determined whether there is an image block that has not been subjected to the first correlation value determination process in step S88 among the image blocks divided in step S87. That is, in step S89, it is determined whether or not the first correlation value determination process in step S88 has been performed on all the image blocks divided in step S87. As a result of the determination, if there is an image block that has not been subjected to the first correlation value determination process, the process returns to step S88, and if not, the process proceeds to step S90.
[0129]
Next, the restored image block dividing process in step S87 and the first correlation value determining process in step S88 will be described in detail with reference to FIG. FIG. 12 is a schematic diagram for explaining the restored image block dividing process and the first correlation value determining process. In the following description, it is assumed that a restored image 91 composed of 16 pixels × 16 pixels, that is, a restored image corresponding to a basic size MB of 16 pixels × 16 pixels is obtained in step S86 shown in FIG. explain.
[0130]
In step S87, when the restored image 91 obtained by the image size reverse conversion process in step S86 is input, the restored image 91 is divided into image blocks of a preset size. Here, an image block 92 composed of 4 pixels × 4 pixels is extracted from a restored image 91 of 16 pixels × 16 pixels, and the restored image 91 is divided into 16 image blocks 92.
[0131]
Next, in step S88, a correlation value (for example, S / N ratio) between the image block 92 divided in step S87 and the original image corresponding to the image block is calculated, and the calculated correlation value and Compare with a preset threshold value. As a result of the comparison, if the calculated correlation value is smaller than the threshold value, the process returns to step S83, and the processes of steps S83 to S87 are performed. On the other hand, if the calculated correlation value is greater than or equal to the threshold value, the process proceeds to step S89.
[0132]
Then, the above-described processing is repeated for the other divided image blocks, and in all the image blocks, if the calculated correlation value is equal to or greater than the threshold value, the process proceeds to step S90, and the first embodiment described above. Similarly, the correlation value determination is performed based on the correlation value of the entire image between the restored image and the basic size MB image corresponding to the restored image, and the subsequent predetermined processing is performed.
[0133]
Next, the configuration of an image data compression apparatus that implements the image data compression method according to the third embodiment will be described with reference to FIG. FIG. 13 is a block diagram illustrating a configuration example of an image data compression apparatus according to the third embodiment.
In FIG. 13, blocks having the same functions as those shown in FIG. 4 are denoted by the same reference numerals, and redundant description is omitted.
[0134]
In FIG. 13, reference numeral 93 denotes a restored image block dividing unit, which divides the restored image generated by the image size inverse converting unit 36 into image blocks having a preset size (pixel size) as shown in FIG. To do.
[0135]
A first determination unit 94 calculates a correlation value between the image block of the restored image obtained by the division by the restored image block dividing unit 93 and the original image corresponding to the image block. The first determination unit 94 compares the calculated correlation value with a preset threshold value, and instructs the image size conversion unit 32 or the like whether or not to further change the image size. Further, when all the image blocks obtained by dividing the restored image satisfy a preset threshold value, the first determination unit 94 sets the restored image and the basic size MB corresponding to the restored image. The second determination unit 37 ′ is instructed to calculate and calculate a correlation value of the entire image with the image. The second determination unit 37 ′ is the same as the determination unit 37 shown in FIG.
[0136]
Note that the data decompression method when image data compression is performed by the image data compression method according to the third embodiment is the same as that in the first embodiment described above, and a description thereof will be omitted.
[0137]
As described above, according to the third embodiment, the same effect as that obtained by the first embodiment can be obtained, and the restored image and the image of the basic size MB corresponding to the restored image can be obtained. Whether to change the reduction ratio for reducing the basic size MB based on the correlation value between the image block obtained by dividing the restored image into a predetermined size and the original image corresponding to the image block in addition to the overall correlation value Determine whether.
[0138]
Thus, compression is performed based on the correlation value of the entire image between the restored image and the basic size MB image corresponding to the restored image, and the correlation value between the image block of the restored image and the original image corresponding to the image block. It is possible to determine in detail image quality degradation of a restored image due to quantization error caused by processing, particularly image quality degradation of a restored image that may occur due to dispersion of quantization error caused by image size inverse transformation processing. Therefore, it is possible to suppress the deterioration of the image quality of the restored image, perform the compression process at an appropriate reduction rate, and achieve further improvement in the image quality.
[0139]
Further, when even one correlation value between the image block obtained by dividing the restored image and the original image corresponding to the image block does not satisfy the threshold condition, the image block that does not satisfy the threshold condition is confirmed. The subsequent processing can be omitted, and the processing can be performed efficiently.
[0140]
In the above-described third embodiment, the size of the image block to be divided is 4 pixels × 4 pixels, but it goes without saying that there is no problem even if other pixel sizes are used. Similarly, the size of the restored image (the size of the basic size MB) is 16 pixels × 16 pixels, but it goes without saying that there is no problem even if other pixel sizes are used. Similarly, the compression target MB generated by reducing and dividing the basic size MB is not limited to 4 pixels × 4 pixels, 2 pixels × 2 pixels, and 1 pixel × 1 pixel.
[0141]
In the third embodiment, square macroblocks having the same number of pixels in the vertical and horizontal directions are used as the basic size MB and the compression target MB. However, the basic size MB and the compression target MB are not limited to square macroblocks. A rectangular macroblock may be used. For example, a rectangular macroblock of 4 pixels × 5 pixels may be used for the compression target MB. Furthermore, as the reduction rate of the basic size MB, it is not necessary to determine the reduction rate to be an integral multiple of the size of the compression target MB, such as 1/4 or 1/2, and it is set to a macroblock of any size. It is possible.
[0142]
In addition, when the size of the restored image (basic size MB size) obtained by the image size inverse transformation process is smaller than the size of the image block extracted and divided by the restored image block division process, the image size inverse transformation process A plurality of restored images (a plurality of basic sizes MB) obtained may be combined to generate an image block.
[0143]
In the third embodiment, the determination is performed by dividing the restored image into image blocks, and then performing determination based on the correlation value of the entire image between the restored image and the image of the basic size MB corresponding to the restored image. Although the order of these two processes is arbitrary, it goes without saying that the same effect can be obtained regardless of which process is performed first.
[0144]
Further, in the third embodiment, after performing compression processing by vector quantization on all the compression target MBs constituting the basic size MB, the entire image of the restored image and the image of the basic size MB corresponding to the restored image The image quality of the restored image is determined on the basis of the correlation value between the image block and the correlation value between the image block obtained by dividing the restored image into a predetermined size and the original image corresponding to the image block. Each time compression processing by vector quantization is performed on one compression target MB, the correlation value between the restored image of the portion compressed so far and the image of the basic size MB of the corresponding portion, and the portion compressed so far The image quality of the restored image may be determined based on the correlation value between the image block obtained by dividing the restored image and the original image corresponding to the image block. There. In this way, when the image quality of the restored image is greatly deteriorated, the reduction rate for reducing the basic size MB may be changed without compressing the remaining compression target MB that has not been subjected to compression processing by vector quantization. The input image compression process can be performed quickly.
[0145]
In the third embodiment, the correlation value between the restored image restored after the compression processing by vector quantization and the image of the basic size MB corresponding to the restored image, and the image block obtained by dividing the restored image into a predetermined size The S / N ratio is shown as the correlation value between the image block and the original image corresponding to the image block. Instead, for example, a difference absolute value distance or a mean square error may be used as the correlation value. However, when the difference absolute value distance or the mean square error is used as the correlation value, if the correlation value is larger than the predetermined threshold value in step S88 and step S90 of FIG. 11 described above, the process proceeds to step S83 of FIG. When the correlation value is equal to or smaller than the predetermined threshold value, the process proceeds to step S89 and step S91 in FIG.
[0146]
In the third embodiment, when the basic size MB is extracted, the input image is extracted without any processing. However, as in the second embodiment, the input image is extracted. After performing the resolution conversion process, the basic size MB may be extracted.
Further, a histogram of correlation values may be obtained as an index indicating the correlation between the restored image and the original image, and it may be determined whether or not to change the image size based on the distribution.
[0147]
(Other embodiments)
Each functional block and processing means shown in the various embodiments described above may be configured by hardware, or configured by a microcomputer system including a CPU or MPU, ROM, RAM, etc., and the operation thereof is stored in ROM or RAM. You may make it implement | achieve according to the stored work program. In addition, what is implemented by supplying a software program for realizing the function to the RAM so as to realize the function of the function block and operating the function block according to the program is also included in the scope of the present invention. include.
[0148]
In this case, the software program itself realizes the functions of the above-described embodiments, and the program itself and means for supplying the program to a computer, for example, a recording medium storing such a program are included in the present invention. Configure. As a recording medium for recording such a program, in addition to the ROM and RAM, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-I, a CD-RW, a DVD, a zip, a magnetic tape, or A nonvolatile memory card or the like can be used.
[0149]
Further, by executing the program supplied by the computer, not only the functions of the above-described embodiments are realized, but also the OS (operating system) or other application software in which the program is running on the computer. Needless to say, such a program is included in the embodiment of the present invention even when the functions of the above-described embodiment are realized.
[0150]
Further, after the supplied program is stored in the memory provided in the function expansion board of the computer or the function expansion unit connected to the computer, the CPU or the like provided in the function expansion board or function expansion unit based on the instructions of the program Needless to say, the present invention includes the case where the functions of the above-described embodiment are realized by performing part or all of the actual processing.
[0151]
【The invention's effect】
As described above, according to the present invention, the input image data input in an image block of m pixels × n pixels is subjected to predetermined processing to change the size of the image block, and the image of the changed image block The strength of the correlation between the restored image data of m pixels × n pixels generated by decompressing the compressed image data obtained by compressing the data and the input image data of m pixels × n pixels is obtained, and the restored image data The strength of the correlation between the image data of the divided image block having a predetermined size generated based on the image and the portion corresponding to the divided image block of the input image data is obtained, and the image block of the image block is determined based on the obtained correlation strength. By changing the size change method, it is possible to easily determine the size of the image block suitable for the compression process, and to maintain the image quality of the restored image while maintaining the image quality of the input image. It can be compressed with high compression ratio. In addition, it is possible to determine in more detail the image quality degradation of the restored image due to the quantization error caused by the compression process, especially the restored image quality degradation that may occur due to the dispersion of the quantization error in the decompression process, and further improve the image quality Can be achieved.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining the principle of image compression and expansion by vector quantization.
FIG. 2 is a flowchart showing a processing procedure of an image data compression method according to the first embodiment.
FIG. 3 is a schematic diagram for explaining image size conversion processing;
FIG. 4 is a block diagram illustrating a configuration example of an image data compression apparatus according to the first embodiment.
5 is a block diagram showing a detailed configuration of a complete lossless encoding unit 38. FIG.
FIG. 6 is a flowchart illustrating a procedure of a data decompression method according to the first embodiment.
FIG. 7 is a flowchart showing a processing procedure of an image data compression method according to the second embodiment.
FIG. 8 is a schematic diagram for explaining a resolution conversion processing method;
FIG. 9 is a block diagram illustrating a configuration example of an image data compression device according to a second embodiment.
FIG. 10 is a flowchart illustrating a procedure of a data decompression method according to the second embodiment.
FIG. 11 is a flowchart illustrating a processing procedure of an image data compression method according to a third embodiment.
FIG. 12 is a schematic diagram for explaining restored image block division processing and first correlation value determination processing;
FIG. 13 is a block diagram illustrating a configuration example of an image data compression device according to a third embodiment.
[Explanation of symbols]
30 Image input section
31 Macroblock extractor
32 Image size converter
33 Vector quantization compression unit
34 Image restoration unit
35 Codebook storage
36 Image size inverse transform unit
37 judgment part
38 Complete lossless encoding unit
39 Compressed data output section

Claims (30)

m画素×n画素(mおよびnは自然数)の画像ブロックで入力された入力画像データに所定の処理を施して、上記画像ブロックの大きさを変更する画像サイズ変換手段と、
上記画像サイズ変換手段により大きさを変更した画像ブロックの画像データを圧縮する圧縮手段と、
上記圧縮手段により圧縮した圧縮画像データを伸長し、上記m画素×n画素の画像ブロックの復元画像データを生成する伸長手段と、
上記伸長手段により生成した復元画像データと上記入力画像データとの相関の強さを求める第1の相関演算手段と、
上記伸長手段により生成した復元画像データに基づいて、所定の大きさの分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求める第2の相関演算手段と、
上記第1の相関演算手段より出力される第1の相関の強さと、上記第2の相関演算手段より出力される第2の相関の強さとに基づいて、上記画像サイズ変換手段によりさらに画像ブロックの大きさを変更するか否かを判断する判断手段とを備えることを特徴とする画像データ圧縮装置。
image size conversion means for performing predetermined processing on input image data input in an image block of m pixels × n pixels (m and n are natural numbers) and changing the size of the image block;
Compression means for compressing the image data of the image block whose size has been changed by the image size conversion means;
Decompression means for decompressing the compressed image data compressed by the compression means and generating restored image data of the image block of m pixels × n pixels;
First correlation calculation means for obtaining the strength of correlation between the restored image data generated by the decompression means and the input image data;
Based on the restored image data generated by the decompression means, image data of a divided image block of a predetermined size is generated, and the generated image data of the divided image block and the input image data corresponding to the divided image block A second correlation calculating means for obtaining the strength of correlation with the part;
Based on the first correlation strength output from the first correlation calculation means and the second correlation strength output from the second correlation calculation means, the image size conversion means further provides an image block. An image data compression apparatus comprising: a determination unit that determines whether or not to change the size of the image data.
上記第2の相関演算手段は、上記伸長手段により生成した復元画像データからm'画素×n'画素(m'およびn'は自然数、かつm'≦m、n'≦n)の分割画像ブロックの画像データを切り出し、切り出した分割画像ブロックの画像データと、上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求めることを特徴とする請求項1に記載の画像データ圧縮装置。  The second correlation calculation means is a divided image block of m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers and m ′ ≦ m, n ′ ≦ n) from the restored image data generated by the decompression means. 2. The image data according to claim 1, wherein the image data is cut out, and the strength of correlation between the image data of the cut out divided image block and the portion of the input image data corresponding to the divided image block is obtained. Compression device. 上記第2の相関演算手段は、上記伸長手段により生成した復元画像データを結合してm'画素×n'画素(m'およびn'は自然数、かつm'>m、n'>n)の分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、当該分割画像ブロックに対応するように結合した上記入力画像データとの相関の強さを求めることを特徴とする請求項1に記載の画像データ圧縮装置。  The second correlation calculation means combines the restored image data generated by the decompression means to generate m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers, and m ′> m, n ′> n). The image data of the divided image block is generated, and the strength of correlation between the generated image data of the divided image block and the input image data combined so as to correspond to the divided image block is obtained. 2. The image data compression apparatus according to 1. 圧縮対象である被圧縮画像データを上記m画素×n画素の画像ブロック単位で抽出し、抽出した上記被圧縮画像データを上記入力画像データとして入力する画像ブロック抽出手段をさらに備えることを特徴とする請求項1〜3の何れか1項に記載の画像データ圧縮装置。  The image processing apparatus further comprises image block extraction means for extracting the compressed image data to be compressed in units of image blocks of m pixels × n pixels and inputting the extracted compressed image data as the input image data. The image data compression device according to claim 1. 上記画像ブロック抽出手段から入力されたすべての入力画像データに対して、上記画像サイズ変換手段によりさらに画像ブロックの大きさの変更を行わないと上記判断手段により判断された際に、上記圧縮手段により圧縮した上記すべての入力画像データにそれぞれ対応する圧縮画像データを完全可逆符号化処理する完全可逆符号化手段をさらに備えることを特徴とする請求項4に記載の画像データ圧縮装置。  When all the input image data input from the image block extraction means is determined by the determination means that the image size conversion means does not further change the size of the image block, the compression means 5. The image data compression apparatus according to claim 4, further comprising a complete lossless encoding means for performing a complete lossless encoding process on the compressed image data respectively corresponding to all the compressed input image data. 上記完全可逆符号化手段は、上記圧縮手段により圧縮した上記すべての入力画像データにそれぞれ対応する圧縮画像データを複数の完全可逆符号化方式で完全可逆符号化処理し、
上記完全可逆符号化手段により複数の完全可逆符号化方式で完全可逆符号化処理した圧縮画像データを比較して、完全可逆符号化処理した圧縮画像データのデータ量が最も少ない完全可逆符号化方式を選択する完全可逆符号化方式選択手段をさらに備えることを特徴とする請求項5に記載の画像データ圧縮装置。
The complete lossless encoding means performs a complete lossless encoding process on the compressed image data respectively corresponding to all the input image data compressed by the compression means by a plurality of complete lossless encoding methods,
Comparing compressed image data that has been subjected to complete lossless encoding with a plurality of completely lossless encoding methods using the above-described completely lossless encoding means 6. The image data compression apparatus according to claim 5, further comprising a complete lossless encoding method selection means for selecting.
所定の解像度変化率で上記被圧縮画像データの解像度を変換し、上記画像ブロック抽出手段に供給する解像度変換手段をさらに備えることを特徴とする請求項4〜6の何れか1項に記載の画像データ圧縮装置。  The image according to any one of claims 4 to 6, further comprising a resolution conversion unit that converts the resolution of the compressed image data at a predetermined resolution change rate and supplies the converted image data to the image block extraction unit. Data compression device. 上記相関の強さは、上記伸長手段により生成した復元画像データに基づく復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値との相関値であることを特徴とする請求項1〜7の何れか1項に記載の画像データ圧縮装置。  The strength of the correlation is a correlation value between each pixel value of the image data related to the restored image based on the restored image data generated by the decompression unit and each pixel value of the input image data corresponding to the image data. The image data compression apparatus according to claim 1, wherein the image data compression apparatus is any one of claims 1 to 7. 上記相関値は、上記復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値とのS/N比であることを特徴とする請求項8に記載の画像データ圧縮装置。  The correlation value is an S / N ratio between each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data. Image data compression device. 上記相関値は、上記復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値との2乗平均誤差であることを特徴とする請求項8に記載の画像データ圧縮装置。  9. The correlation value is a mean square error between each pixel value of image data related to the restored image and each pixel value of the input image data corresponding to the image data. Image data compression device. 上記相関値は、上記復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値との差分絶対値距離であることを特徴とする請求項8に記載の画像データ圧縮装置。  9. The correlation value according to claim 8, wherein the correlation value is a difference absolute value distance between each pixel value of the image data relating to the restored image and each pixel value of the input image data corresponding to the image data. Image data compression device. 上記判断手段は、上記相関値が所定の閾値より小さい場合に、上記画像サイズ変換手段によりさらに画像ブロックの大きさを変更すると判断することを特徴とする請求項9に記載の画像データ圧縮装置。  10. The image data compression apparatus according to claim 9, wherein the determination unit determines that the size of the image block is further changed by the image size conversion unit when the correlation value is smaller than a predetermined threshold value. 上記判断手段は、上記相関値が所定の閾値より大きい場合に、上記画像サイズ変換手段によりさらに画像ブロックの大きさを変更すると判断することを特徴とする請求項10または11に記載の画像データ圧縮装置。  12. The image data compression according to claim 10 or 11, wherein the determination unit determines that the size of the image block is further changed by the image size conversion unit when the correlation value is larger than a predetermined threshold value. apparatus. 上記圧縮手段および上記伸長手段は、コードブック方式を用いたベクトル量子化によりそれぞれ圧縮、伸長することを特徴とする請求項1〜13の何れか1項に記載の画像データ圧縮装置。  The image data compression apparatus according to claim 1, wherein the compression unit and the expansion unit compress and expand by vector quantization using a code book method. コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを2乗平均誤差が最も小さいパターンが隣のアドレスになるように配置することを特徴とする請求項14に記載の画像データ圧縮装置。  15. The pattern of image blocks of a pixels × b pixels (a and b are natural numbers) in the codebook are arranged so that a pattern having the smallest mean square error is an adjacent address. The image data compression apparatus described. コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを差分絶対値距離が最も小さいパターンが隣のアドレスになるように配置することを特徴とする請求項14に記載の画像データ圧縮装置。  15. The pattern of image blocks of a pixels × b pixels (a and b are natural numbers) in a codebook are arranged so that a pattern having the smallest difference absolute value distance is an adjacent address. The image data compression apparatus described. コードブック内のa画素×b画素(aおよびbは自然数)の画像ブロックの各パターンを所定の規則に従い隣接して配置するとともに、上記所定の規則に従って画像ブロックの各パターンを配置するアドレスの前方または後方の隣接するアドレスに、a画素×b画素の画像ブロックの要素値が全て同じ値であるパターンを所定の個数だけさらに配置することを特徴とする請求項14〜16の何れか1項に記載の画像データ圧縮装置。  Each pattern of image blocks of a pixels × b pixels (a and b are natural numbers) in the codebook are arranged adjacent to each other according to a predetermined rule, and in front of the address where each pattern of the image block is arranged according to the predetermined rule. Alternatively, a predetermined number of patterns in which the element values of the image block of a pixel × b pixel are all the same value are further arranged at adjacent addresses in the rear, according to any one of claims 14 to 16. The image data compression apparatus described. m画素×n画素(mおよびnは自然数)の画像ブロックで入力された入力画像データに所定の処理を施して、上記画像ブロックの大きさを変更し、大きさを変更した画像ブロックの画像データを圧縮処理し、上記圧縮処理により得られた圧縮画像データを伸長処理して、上記m画素×n画素の画像ブロックの復元画像データを生成し、上記生成した復元画像データと上記入力画像データとの相関の強さを示す第1の相関の強さを求めるとともに、上記生成した復元画像データに基づいて所定の大きさの分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを示す第2の相関の強さを求め、上記第1の相関の強さと上記第2の相関の強さとに基づいて、画像ブロックの大きさをさらに変更するか否かを判断することを特徴とする画像データ圧縮方法。  Input image data input in an image block of m pixels × n pixels (m and n are natural numbers) are subjected to predetermined processing to change the size of the image block, and the image data of the image block whose size has been changed And decompressing the compressed image data obtained by the compression processing to generate restored image data of the image block of m pixels × n pixels, and the generated restored image data and the input image data The first correlation strength indicating the strength of the first correlation is obtained, the image data of the divided image block having a predetermined size is generated based on the generated restored image data, and the generated image data of the divided image block is generated. A second correlation strength indicating a correlation strength between the input image data and a portion corresponding to the divided image block of the input image data, and calculating the first correlation strength and the second correlation strength. And determining whether or not to further change the size of the image block based on the image data compression method. 上記第2の相関の強さとして、上記生成した復元画像データからm'画素×n'画素(m'およびn'は自然数、かつm'≦m、n'≦n)の分割画像ブロックの画像データを切り出し、切り出した分割画像ブロックの画像データと、上記入力画像データの当該分割画像ブロックに対応する部分との相関の強さを求めることを特徴とする請求項18に記載の画像データ圧縮方法。  As the second correlation strength, an image of a divided image block of m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers and m ′ ≦ m, n ′ ≦ n) from the generated restored image data. 19. The image data compression method according to claim 18, wherein the data is cut out, and the strength of correlation between the image data of the cut out divided image block and the portion of the input image data corresponding to the divided image block is obtained. . 上記第2の相関の強さとして、上記生成した復元画像データを結合してm'画素×n'画素(m'およびn'は自然数、かつm'>m、n'>n)の分割画像ブロックの画像データを生成し、生成した分割画像ブロックの画像データと、当該分割画像ブロックに対応するように結合した上記入力画像データとの相関の強さを求めることを特徴とする請求項18に記載の画像データ圧縮方法。  As the second correlation strength, divided images of m ′ pixels × n ′ pixels (m ′ and n ′ are natural numbers and m ′> m, n ′> n) by combining the generated restored image data. 19. The image data of a block is generated, and the strength of correlation between the generated image data of the divided image block and the input image data combined so as to correspond to the divided image block is obtained. The image data compression method as described. 圧縮対象である被圧縮画像データを上記m画素×n画素の画像ブロック単位で抽出し、抽出した上記被圧縮画像データを上記入力画像データとして入力し、上記入力されたすべての入力画像データに対して、上記画像ブロックの大きさをさらに変更しないと判断された際に、上記圧縮処理により得られた上記すべての入力画像データにそれぞれ対応する圧縮画像データを完全可逆符号化処理することを特徴とする請求項18〜20の何れか1項に記載の画像データ圧縮方法。  The compressed image data to be compressed is extracted in units of the m-pixel × n-pixel image block, the extracted compressed image data is input as the input image data, and the input image data is all input. When it is determined that the size of the image block is not further changed, the compressed image data respectively corresponding to all the input image data obtained by the compression processing is completely lossless encoded. The image data compression method according to any one of claims 18 to 20. 上記圧縮処理により得られた上記すべての入力画像データにそれぞれ対応する圧縮画像データを複数の完全可逆符号化方式で完全可逆符号化処理し、上記複数の完全可逆符号化方式で完全可逆符号化処理した圧縮画像データのデータ量が最も少ない完全可逆符号化方式を選択することを特徴とする請求項21に記載の画像データ圧縮方法。  Compressed image data respectively corresponding to all the input image data obtained by the compression process is completely lossless encoded by a plurality of completely lossless encoding methods, and completely lossless encoded by the plurality of completely lossless encoding methods. The image data compression method according to claim 21, wherein a completely lossless encoding method with the smallest amount of compressed image data is selected. 所定の解像度変化率で圧縮対象である被圧縮画像データの解像度を変換し、上記解像度を変換した被圧縮画像データを上記m画素×n画素の画像ブロック単位で抽出し、抽出した被圧縮画像データを上記入力画像データとして入力することを特徴とする請求項18〜22の何れか1項に記載の画像データ圧縮方法。  The resolution of the compressed image data to be compressed is converted at a predetermined resolution change rate, the compressed image data obtained by converting the resolution is extracted in units of image blocks of m pixels × n pixels, and the extracted compressed image data 23. The image data compression method according to claim 18, wherein the image data is input as the input image data. 上記相関の強さは、上記生成した復元画像データに基づく復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値との相関値であることを特徴とする請求項18〜23の何れか1項に記載の画像データ圧縮方法。  The strength of the correlation is a correlation value between each pixel value of the image data related to the restored image based on the generated restored image data and each pixel value of the input image data corresponding to the image data. The image data compression method according to any one of claims 18 to 23. 上記相関値は、上記復元画像に係る画像データの各画素値と、当該画像データに対応する上記入力画像データの各画素値とのS/N比、2乗平均誤差、および差分絶対値距離のうち何れかであることを特徴とする請求項24に記載の画像データ圧縮方法。  The correlation value is an S / N ratio between each pixel value of the image data related to the restored image and each pixel value of the input image data corresponding to the image data, a mean square error, and a difference absolute value distance. The image data compression method according to claim 24, wherein the image data compression method is any one of them. 上記圧縮処理および上記伸長処理は、コードブック方式を用いたベクトル量子化によりそれぞれ圧縮、伸長することを特徴とする請求項18〜25の何れか1項に記載の画像データ圧縮方法。  The image data compression method according to any one of claims 18 to 25, wherein the compression processing and the expansion processing are respectively compressed and expanded by vector quantization using a codebook method. 請求項1〜17の何れか1項に記載の各手段としてコンピュータを機能させるためのプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium on which a program for causing a computer to function as each means according to any one of claims 1 to 17 is recorded. 請求項18〜26の何れか1項に記載の画像データ圧縮方法の処理手順をコンピュータに実行させるためのプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。  A computer-readable recording medium having recorded thereon a program for causing a computer to execute the processing procedure of the image data compression method according to any one of claims 18 to 26. 請求項1〜17の何れか1項に記載の各手段としてコンピュータを機能させるためのプログラム。  The program for functioning a computer as each means of any one of Claims 1-17. 請求項18〜26の何れか1項に記載の画像データ圧縮方法の処理手順をコンピュータに実行させるためのプログラム。  A program for causing a computer to execute the processing procedure of the image data compression method according to any one of claims 18 to 26.
JP2002080781A 2001-03-22 2002-03-22 Image data compression apparatus, image data compression method, recording medium, and program Expired - Fee Related JP3822512B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2002080781A JP3822512B2 (en) 2001-03-22 2002-03-22 Image data compression apparatus, image data compression method, recording medium, and program
US10/507,378 US20050163389A1 (en) 2002-03-22 2002-09-19 Image data comprising device, image data compression method, recording medium, and program
PCT/JP2002/009625 WO2003081898A1 (en) 2002-03-22 2002-09-19 Image data compression device, image data compression method, recording medium, and program
EP02772865A EP1499106A1 (en) 2002-03-22 2002-09-19 Image data compression device, image data compression method, recording medium, and program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-83138 2001-03-22
JP2001083138 2001-03-22
JP2002080781A JP3822512B2 (en) 2001-03-22 2002-03-22 Image data compression apparatus, image data compression method, recording medium, and program

Publications (2)

Publication Number Publication Date
JP2002369201A JP2002369201A (en) 2002-12-20
JP3822512B2 true JP3822512B2 (en) 2006-09-20

Family

ID=26611825

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002080781A Expired - Fee Related JP3822512B2 (en) 2001-03-22 2002-03-22 Image data compression apparatus, image data compression method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP3822512B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2010234364B2 (en) * 2009-04-08 2014-12-11 Newrow, Inc. System and method for image compression
US9253505B2 (en) 2009-04-08 2016-02-02 Newrow, Inc. System and method for image compression
JP5794421B2 (en) * 2011-09-20 2015-10-14 横河電機株式会社 Measurement data compression method and measurement data compression apparatus
GB2527099B (en) * 2014-06-11 2018-07-18 Gurulogic Microsystems Oy Apparatus and method for data compression

Also Published As

Publication number Publication date
JP2002369201A (en) 2002-12-20

Similar Documents

Publication Publication Date Title
JP2656897B2 (en) Image data compression and decompression device
US8213727B2 (en) Image encoding apparatus and image decoding apparatus, and control method thereof
JP4902569B2 (en) Image coding apparatus and control method thereof
US6563946B2 (en) Image processing apparatus and method
WO2003081898A1 (en) Image data compression device, image data compression method, recording medium, and program
JP2001086345A (en) Image processor and method of image processing
JP5092558B2 (en) Image encoding method, image encoding device, image decoding method, and image decoding device
JP3822512B2 (en) Image data compression apparatus, image data compression method, recording medium, and program
US8798379B2 (en) Image processing method, encoding device, decoding device, and image processing apparatus
TWI795635B (en) Image decoding device, image decoding method and program
JPH1175183A (en) Image signal processing method and device and storage medium
JP3144824B2 (en) Image playback device
JP2009077183A (en) Data compressor, data compression/extension system, and data compression method
JP2626521B2 (en) Image transcoder
JP3556447B2 (en) Color solid-state imaging camera system
JP3305480B2 (en) Image encoding / decoding device
JP3824259B2 (en) Encoding method, decoding method, encoding device, decoding device, and recording medium
JP2000316174A (en) Color picture compression method and its device
JP2006340300A (en) Signal processing method, signal processing apparatus, signal processing program and information recording medium
JPH09307897A (en) Image data compression processing method
JP2005269620A (en) Image compressing/expanding method, image compressing apparatus, image expanding apparatus
JP2809552B2 (en) Image encoding method and image decoding method
JP4957572B2 (en) Image processing apparatus, image processing system, image processing method, and image processing program
JP3954032B2 (en) Image coding apparatus, image coding method, image coding program, and computer-readable recording medium on which image coding program is recorded
JPH04271664A (en) Picture data compressor and picture data decoder

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040413

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040614

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040617

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20040709

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060622

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees