JP2008283701A - Data processor and data processing method, and recording medium - Google Patents
Data processor and data processing method, and recording medium Download PDFInfo
- Publication number
- JP2008283701A JP2008283701A JP2008160003A JP2008160003A JP2008283701A JP 2008283701 A JP2008283701 A JP 2008283701A JP 2008160003 A JP2008160003 A JP 2008160003A JP 2008160003 A JP2008160003 A JP 2008160003A JP 2008283701 A JP2008283701 A JP 2008283701A
- Authority
- JP
- Japan
- Prior art keywords
- data
- encoded data
- unit
- temporary
- code
- 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.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
Abstract
Description
本発明は、データ処理装置およびデータ処理方法、並びに記録媒体に関し、特に、例えば、復号画像の画質を劣化させることなく、かつデータ量を増加せずに、画像に情報を埋め込むことができるようにするデータ処理装置およびデータ処理方法、並びに記録媒体に関する。 The present invention relates to a data processing device, a data processing method, and a recording medium, and in particular, for example, so that information can be embedded in an image without degrading the image quality of a decoded image and without increasing the amount of data. The present invention relates to a data processing apparatus, a data processing method, and a recording medium.
データに対して、そのデータ量を増加させることなく、情報を埋め込む手法としては、例えば、ディジタルオーディオデータの最下位ビットや、下位2ビットなどを、埋め込む情報に変換するものなどがある。この手法は、ディジタルオーディオデータの下位ビットが、その音質にあまり影響を与えないことを利用し、その下位ビットを、単に、埋め込む情報に置き換えるものであり、従って、再生時には、情報が埋め込まれたディジタルオーディオデータは、その下位ビットを元に戻さずに、そのまま出力される。即ち、情報が埋め込まれた下位ビットを、元に戻すのは困難であり、また、下位ビットは、音質に、あまり影響を与えないことから、ディジタルオーディオデータは、情報が埋め込まれた状態で出力される。 As a technique for embedding information without increasing the amount of data, there is, for example, a method of converting the least significant bit or the lower two bits of digital audio data into information to be embedded. This method uses the fact that the lower bits of the digital audio data do not significantly affect the sound quality, and simply replaces the lower bits with information to be embedded. Therefore, at the time of playback, the information is embedded. The digital audio data is output as it is without returning its lower bits. In other words, it is difficult to restore the low-order bits embedded with information, and the low-order bits do not affect the sound quality so much, so the digital audio data is output with the information embedded. Is done.
しかしながら、上述のような手法では、本来のデータと異なるデータが出力される。従って、データがオーディオデータである場合には、その音質に、また、データがビデオデータである場合には、その画質に、少なからず影響がある。 However, with the above-described method, data different from the original data is output. Therefore, when the data is audio data, the sound quality is affected, and when the data is video data, the image quality is affected.
本発明は、このような状況に鑑みてなされたものであり、例えば、画像の画質を劣化させることなく、かつデータ量を増加せずに、画像に情報を埋め込むこと等ができるようにするものである。 The present invention has been made in view of such circumstances. For example, information can be embedded in an image without degrading the image quality and without increasing the data amount. It is.
本発明の第1の側面のデータ処理装置、又は、記録媒体は、第1のデータを、量子化し、その結果得られる量子化コードと量子化誤差を、符号化データとして出力する符号化手段と、前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データを生成する埋め込み手段とを備えるデータ処理装置、又は、データ処理装置として、コンピュータを機能させるためのプログラムが記録された記録媒体である。 The data processing apparatus or the recording medium according to the first aspect of the present invention includes an encoding unit that quantizes the first data and outputs a quantization code and a quantization error obtained as a result as encoded data. The embedded encoding in which the second data is embedded by shifting the correspondence between each value of the quantization code as the encoded data and the quantization error by an operation amount corresponding to the second data A data processing apparatus including an embedding unit for generating data, or a recording medium on which a program for causing a computer to function as a data processing apparatus is recorded.
本発明の第1のデータ処理方法は、データ処理装置が、第1のデータを、量子化し、その結果得られる量子化コードと量子化誤差を、符号化データとして出力し、前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データを生成するステップを含むデータ処理方法である。 In the first data processing method of the present invention, the data processing apparatus quantizes the first data, and outputs a quantization code and a quantization error obtained as a result as encoded data. A step of generating embedded encoded data in which the second data is embedded by shifting the correspondence between each value of the quantization code and the quantization error by an operation amount corresponding to the second data. It is a data processing method including.
本発明の第1の側面においては、第1のデータが、量子化され、その結果得られる量子化コードと量子化誤差が、符号化データとして出力される。さらに、前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データが生成される。 In the first aspect of the present invention, the first data is quantized, and the resulting quantization code and quantization error are output as encoded data. Furthermore, the embedded code in which the second data is embedded by shifting the correspondence between each value of the quantization code as the encoded data and the quantization error by an operation amount corresponding to the second data Data is generated.
本発明の第2の側面のデータ処理装置、又は、記録媒体は、第1のデータを量子化することにより得られる量子化コードと量子化誤差を含む符号化データに第2のデータが埋め込まれた埋め込み符号化データにおける、前記量子化コードの各値と量子化誤差との対応関係を、特定の操作量でシフトすることにより、仮の符号化データを復号する仮符号化データ復号手段と、所定のコードブックに応じて、前記仮の符号化データから、仮の復号データを復号する仮復号データ復号手段と、前記量子化コードと量子化誤差と、前記仮復号データ復号手段により復号された仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かを判定する判定手段とを備え、前記仮符号化データ復号手段は、前記判定手段による判定結果に応じて前記操作量を変更して再び仮の符号化データを復号し、前記判定手段は、前記仮の符号化データが正しいと判定したとき、前記操作量に対応するデータを前記第2のデータとして出力し、前記仮復号データ復号手段からの仮の復号データを真の復号データとして出力するデータ処理装置、又は、データ処理装置として、コンピュータを機能させるためのプログラムが記録された記録媒体である。 In the data processing apparatus or the recording medium according to the second aspect of the present invention, the second data is embedded in the encoded data including the quantization code and the quantization error obtained by quantizing the first data. Temporary encoded data decoding means for decoding the temporary encoded data by shifting the correspondence between each value of the quantization code and the quantization error in the embedded encoded data by a specific operation amount; Temporary decoded data decoding means for decoding temporary decoded data, the quantization code and the quantization error, and the temporary decoded data decoding means decoded from the temporary encoded data according to a predetermined code book A determination unit that determines whether or not the temporary encoded data is correct by comparing a quantization code and a quantization error obtained by re-encoding the temporary decoded data; The temporary encoded data decoding means changes the manipulated variable according to the determination result by the determination means and decodes the temporary encoded data again, and the determination means determines that the temporary encoded data is correct. A data processing device that outputs data corresponding to the manipulated variable as the second data, and outputs temporary decoded data from the temporary decoded data decoding means as true decoded data, or a data processing device A recording medium on which a program for causing a computer to function is recorded.
本発明の第2の側面のデータ処理方法は、データ処理装置が、第1のデータを量子化することにより得られる量子化コードと量子化誤差を含む符号化データに第2のデータが埋め込まれた埋め込み符号化データにおける、前記量子化コードの各値と量子化誤差との対応関係を、特定の操作量でシフトすることにより、仮の符号化データを復号する仮符号化データ復号ステップと、所定のコードブックに応じて、前記仮の符号化データから、仮の復号データを復号する仮復号データ復号ステップと、前記量子化コードと量子化誤差と、前記仮復号データ復号ステップにより復号された仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かを判定する判定ステップとを含み、前記仮符号化データ復号ステップにおいて、前記判定ステップによる判定結果に応じて前記操作量を変更して再び仮の符号化データを復号し、前記判定ステップにおいて、前記仮の符号化データが正しいと判定したとき、前記操作量に対応するデータを前記第2のデータとして出力し、前記仮復号データ復号ステップで復号した仮の復号データを真の復号データとして出力するデータ処理方法である。 In the data processing method according to the second aspect of the present invention, the data processing device embeds the second data in the encoded data including the quantization code and the quantization error obtained by quantizing the first data. A temporary encoded data decoding step of decoding the temporary encoded data by shifting the correspondence between each value of the quantization code and the quantization error in the embedded encoded data by a specific operation amount; In accordance with a predetermined code book, the temporary decoded data decoding step for decoding the temporary decoded data from the temporary encoded data, the quantization code and the quantization error, and the temporary decoded data decoding step Determination of whether or not the temporary encoded data is correct by comparing the quantization code obtained by re-encoding the temporary decoded data with a quantization error In the temporary encoded data decoding step, the operation amount is changed according to the determination result in the determination step, and the temporary encoded data is decoded again. In the determination step, the temporary encoding data is decoded. A data processing method for outputting data corresponding to the manipulated variable as the second data and outputting the provisional decoded data decoded in the provisional decoded data decoding step as true decoded data when it is determined that the data is correct; is there.
本発明の第2の側面においては、第1のデータを量子化することにより得られる量子化コードと量子化誤差を含む符号化データに第2のデータが埋め込まれた埋め込み符号化データにおける、前記量子化コードの各値と量子化誤差との対応関係を、特定の操作量でシフトすることにより、仮の符号化データが復号される。また、所定のコードブックに応じて、前記仮の符号化データから、仮の復号データが復号され、前記量子化コードと量子化誤差と、仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かが判定される。この場合において、前記仮の符号化データが正しいか否かの判定結果に応じて前記操作量が変更されて再び仮の符号化データが復号され、前記仮の符号化データが正しいと判定されたとき、前記操作量に対応するデータが前記第2のデータとして出力され、仮の復号データが真の復号データとして出力される。 In the second aspect of the present invention, in the embedded encoded data in which the second data is embedded in the encoded data including the quantization code obtained by quantizing the first data and the quantization error, Temporarily encoded data is decoded by shifting the correspondence between each value of the quantization code and the quantization error by a specific operation amount. Further, the temporary decoded data is decoded from the temporary encoded data according to a predetermined code book, and the quantization code, the quantization error, and the temporary decoded data are encoded again. By comparing the quantization code and the quantization error, it is determined whether or not the temporary encoded data is correct. In this case, the manipulated variable is changed according to the determination result as to whether or not the temporary encoded data is correct, the temporary encoded data is decoded again, and the temporary encoded data is determined to be correct. At this time, data corresponding to the manipulated variable is output as the second data, and provisional decoded data is output as true decoded data.
本発明の第1及び第2の側面によれば、第1のデータを符号化した符号化データのデータ量を増加させることなく、第2のデータを埋め込むことができ、さらに、そのような第2のデータを埋め込んだデータから、第1および第2のデータを、正確に復号することが可能となる。 According to the first and second aspects of the present invention, the second data can be embedded without increasing the data amount of the encoded data obtained by encoding the first data. The first and second data can be accurately decoded from the data in which the second data is embedded.
図1は、本発明を適用した埋め込み圧縮/復号システム(システムとは、複数の装置が論理的に集合した物をいい、各構成の装置が同一筐体中にあるか否かは問わない)の一実施の形態の構成例を示している。 FIG. 1 shows an embedded compression / decoding system to which the present invention is applied (a system means a logical collection of a plurality of devices, regardless of whether or not each component device is in the same casing). 2 shows a configuration example of an embodiment.
この埋め込み圧縮/復号システムは、符号化装置1および復号装置2で構成されており、符号化装置は、符号化対象としての、例えば、画像を符号化し、復号装置2は、その符号化結果を、元の画像に復号するようになっている。
The embedded compression / decoding system includes an
即ち、符号化装置1は、埋め込み圧縮符号化器11で構成され、そこには、符号化対象としての画像と、その画像に埋め込まれる情報(以下、適宜、付加情報という)とが供給されるようになっている。そして、埋め込み圧縮符号化器11は、画像(ディジタル画像データ)を、所定の符号化ルールにしたがって圧縮符号化するとともに、その符号化ルールを、付加情報(ディジタルデータ)に基づいて破壊することにより、その付加情報を埋め込み、埋め込み符号化データを得て出力する。埋め込み圧縮符号化器11が出力する埋め込み符号化データは、例えば、半導体メモリ、光磁気ディスク、磁気ディスク、光ディスク、磁気テープ、相変化ディスクなどでなる記録媒体3に記録され、あるいは、また、例えば、地上波、衛星回線、CATV(Cable Television)網、インターネット、公衆回線などでなる伝送媒体4を介して伝送され、復号装置2に提供される。
In other words, the
復号装置2は、復号器12で構成され、そこでは、記録媒体3または伝送媒体4を介して提供される埋め込み符号化データが受信される。そして、復号器12は、その埋め込み符号化データを、所定の符号化ルールにしたがって符号化された符号化データに復元することにより、そこに埋め込まれている付加情報を復号し、さらに、符号化データを、元の画像に復号する。復号された画像は、例えば、図示せぬモニタ等に供給されて表示される。
The
なお、付加情報としては、例えば、元の画像に関連するテキストデータや、音声データ、その画像を縮小した縮小画像等は勿論、元の画像に無関係なデータを用いることも可能である。即ち、付加情報としては、あらゆるデータ(プログラムも含む)を用いることが可能である。 As additional information, for example, text data related to the original image, audio data, a reduced image obtained by reducing the image, and data irrelevant to the original image can be used. That is, any data (including programs) can be used as the additional information.
また、付加情報としては、埋め込み圧縮符号化器11に供給する符号化対象としての画像の一部を用いることも可能である。即ち、埋め込み圧縮符号化器11には、画像の一部を付加情報として供給するとともに、残りの画像を符号化対象として供給することが可能である。
Further, as the additional information, it is possible to use a part of an image as an encoding target supplied to the embedded
次に、図2は、図1の埋め込み圧縮符号化器11の構成例を示している。
Next, FIG. 2 shows a configuration example of the embedded
フレームメモリ21は、埋め込み圧縮符号化器11に供給される画像データを、例えば、フレーム単位で記憶する。付加情報メモリ22は、埋め込み圧縮符号化器11に供給される付加情報を記憶する。
The
可変長符号化部23は、フレームメモリ21に記憶された画像データを、可変長符号化としての、例えば、ハフマン符号化し、その結果得られる符号化データを、符号化ルール破壊部25に供給する。また、可変長符号化部23は、ハフマン符号化の際、後述するようにして、ハフマンテーブルを作成するが、そのハフマンテーブルを、変換テーブル作成部24に供給する。さらに、可変長符号化部23は、変換テーブル作成部24に出力したハフマンテーブルを得るのに必要な情報としてのハフマンテーブル関連情報を、MUX(マルチプレクサ)26に供給する。
The variable
変換テーブル作成部24は、可変長符号化部23から供給されるハフマンテーブルにおける符号を変換するための変換テーブルを、付加情報メモリ22に記憶された付加情報に基づいて作成する。即ち、ハフマンテーブルは、ハフマン符号化する対象の値(ここでは、画像の画素値)と、各符号長の符号(符号化データ)との対応関係を記述したものであるが、変換テーブル作成部24は、そのようなハフマンテーブルにおける符号を、付加情報に基づく符号に変換するための変換テーブルを作成する。変換テーブル作成部24で作成された変換テーブルは、符号化ルール破壊部25に供給される。
The conversion
符号化ルール破壊部25は、付加情報に基づき、可変長符号化部23における符号化ルールを破壊することにより、その付加情報を埋め込む。即ち、符号化ルール破壊部25は、変換テーブル作成部24が付加情報に基づき作成した変換テーブルにしたがって、可変長符号化部23が出力する符号化データ(符号)を変換(操作)し、可変長符号化部23における符号化ルールを破壊した符号化ルールにより符号化された符号化データを得る。この破壊された符号化ルールにより符号化された符号化データは、元の符号化データに、付加情報が埋め込まれた埋め込み符号化データとして、符号化ルール破壊部25からMUX26に供給される。
The encoding
MUX26は、符号化ルール破壊部25からの埋め込み符号化データと、可変長符号化部23からのハフマンテーブル関連情報とを多重化し、多重化データとして出力する。この多重化データが、図1で説明したように、記録媒体3または伝送媒体4を介して、復号装置2に提供される。
The
次に、図3は、図2の可変長符号化部23の構成例を示している。
Next, FIG. 3 shows a configuration example of the variable
図2のフレームメモリ21においては、そこに記憶された画像データの各フレームが、例えば、時間順に、順次、注目フレームとされ、その注目フレームの画像データが読み出される。この注目フレームの画像データは、頻度テーブル作成部31と符号化部34に供給される。
In the
頻度テーブル作成部31は、そこに供給される注目フレームを構成する画素について、各画素値と、その出現頻度とを対応付けた頻度テーブルを作成し、ハフマン木作成部32に供給する。また、頻度テーブルは、ハフマンテーブル関連情報として、頻度テーブル作成部31から、図3のMUX26に供給される。
The frequency
ここで、図3の実施の形態では、頻度テーブルを、ハフマンテーブル関連情報として用いるようにしたが、ハフマンテーブル関連情報は、後述するハフマンテーブル作成部33が作成するハフマンテーブルを得ることができるような情報であれば、特に限定されるものではなく、従って、ハフマンテーブル関連情報としては、頻度テーブルの他、例えば、ハフマンテーブル作成部33が作成するハフマンテーブルそのもの等を用いることが可能である。
Here, in the embodiment of FIG. 3, the frequency table is used as the Huffman table related information, but the Huffman table related information can obtain a Huffman table created by the Huffman
ハフマン木作成部32は、頻度テーブル作成部31から供給される頻度テーブルに基づいて、いわゆるハフマン木を作成し、ハフマンテーブル作成部33に供給する。ハフマンテーブル作成部33は、ハフマン木作成部32からのハフマン木に基づき、ハフマンテーブルを作成する。即ち、ハフマンテーブル作成部33は、注目フレームにおける各画素値に対して、その画素値の出現頻度が高いほど、短い符号長の符号(出現頻度が低いほど長い符号長の符号)が割り当てられたハフマンテーブルを作成する。このハフマンテーブルは、符号化部34に供給されるとともに、図2の変換テーブル作成部24に供給される。
The Huffman
符号化部34は、そこに供給される注目フレームの画素を、例えば、ラスタスキャン順に、順次、注目画素とし、その注目画素の画素値を、ハフマンテーブル作成部33からのハフマンテーブルにおいて対応付けられている符号に変換し、符号化データとして出力する。
The
以上のように構成される可変長符号化部23では、頻度テーブル作成部31において、注目フレームについて頻度テーブルが作成され、ハフマン木作成部32に供給される。ハフマン木作成部32では、頻度テーブル作成部31からの頻度テーブルに基づいて、ハフマン木が作成され、ハフマンテーブル作成部33に供給される。ハフマンテーブル作成部33では、ハフマン木作成部32からのハフマン木に基づき、ハフマンテーブルが作成され、符号化部34に供給される。符号化部34では、注目フレームの各画素値が、ハフマンテーブルにおいて、その画素値に対応付けられている符号に変換され、符号化データとして出力される。
In the variable-
次に、図4を参照して、可変長符号化部23における可変長符号化処理について、さらに説明する。
Next, the variable length coding process in the variable
いま、頻度テーブル作成部31において、例えば、図4(A)に示すような頻度テーブルが作成されたとする。ここで、図4(A)は、注目フレームにおいて、画素値「0」、「1」、「2」、「3」、「4」が、それぞれ、5,4,3,2,1回ずつ現れていることを表している。
Assume that the frequency
図4(A)の頻度テーブルについては、ハフマン木作成部32において、例えば、図4(B)乃至図4(E)に示すように、各画素値の出現頻度に基づき、いわばボトムアップ式に、ハフマン木が作成される。
With respect to the frequency table of FIG. 4A, in the Huffman
即ち、ハフマン木作成部32は、頻度テーブルにおける画素値の中から、出現頻度が最も低いものを2つ選択し、1つの接点を構成する。さらに、ハフマン木作成部32は、選択した2つの画素値のうちの、出現頻度が低い方に、ビット"0"または"1"のうちの、例えば、"0"を割り当て、他方に、"1"を割り当てる。そして、ハフマン木作成部32は、選択した2つの画素値によって構成した接点に対して、その選択した2つの画素値の出現頻度の加算値を、その接点の出現頻度として割り当てる。
That is, the Huffman
従って、図4(A)に示した頻度テーブルにおいては、図4(B)に示すように、出現頻度が1の画素値「4」と、出現頻度が2の画素値「3」が選択され、接点#1が構成されるとともに、その接点#1の出現頻度として、3(=1+2)が割り当てられる。さらに、選択された2つの画素値「4」と「3」のうち、出現頻度が低い方の画素値「4」に、ビット"0"が割り当てられるとともに、出現頻度が高い方の画素値「3」に、ビット"1"が割り当てられる。
Accordingly, in the frequency table shown in FIG. 4A, as shown in FIG. 4B, the pixel value “4” having the
ここで、図4(B)乃至図4(E)では、出現頻度を表す数字を、カッコ()で囲って表してある。 Here, in FIGS. 4B to 4E, numbers representing the appearance frequencies are enclosed in parentheses ().
なお、選択された2つの画素値の出現頻度が同一の場合には、いずれの画素値に、ビット"0"または"1"を割り当てても良い。但し、例えば、画素値が小さい方に、ビット"0"を割り当てるといったように、どちらの画素値に、ビット"0"または"1"を割り当てるかを、あらかじめ決めておく必要がある。 Note that when the frequency of appearance of the two selected pixel values is the same, the bit “0” or “1” may be assigned to any pixel value. However, it is necessary to determine in advance which pixel value the bit “0” or “1” is assigned to, for example, the bit “0” is assigned to the smaller pixel value.
ハフマン木作成部32では、以下、同様の処理が、接点が1つ収束するまで繰り返される。
In the Huffman
従って、図4(B)の状態からは、図4(C)に示すように、出現頻度がいずれも3の接点#1と画素値「2」が選択され、その接点#1と画素値「2」が、1つの接点#2とされる。さらに、接点#2の出現頻度が6(=3+3)とされ、接点#1と画素値「2」には、それぞれビット"0"と"1"が割り当てられる。
Therefore, from the state of FIG. 4B, as shown in FIG. 4C, the
図4(C)の状態からは、図4(D)に示すように、出現頻度が4の画素値「1」と、出現頻度が5の画素値「0」が選択され、その画素値「1」と「0」が、1つの接点#3とされる。さらに、接点#3の出現頻度が9(=4+5)とされ、画素値「1」と「0」には、それぞれビット"0"と"1"が割り当てられる。
From the state of FIG. 4C, as shown in FIG. 4D, a pixel value “1” having an appearance frequency of 4 and a pixel value “0” having an appearance frequency of 5 are selected. “1” and “0” are one
図4(D)の状態からは、図4(E)に示すように、出現頻度が6の接点#2と、出現頻度が9の接点#3が選択され、その接点#2と#3が、1つの接点#4とされる。さらに、接点#4の出現頻度が15(=6+9)とされ、接点#2と#3には、それぞれビット"0"と"1"が割り当てられる。
From the state of FIG. 4D, as shown in FIG. 4E, the
図4(E)の状態では、接点が、1つの接点#4に収束しているので、ハフマン木の完成となり、ハフマン木作成部32は、このハフマン木を、ハフマンテーブル作成部33に供給する。
In the state shown in FIG. 4E, since the contacts converge to one
ハフマンテーブル作成部33は、ハフマン木を、収束した接点から、画素値の方向に辿っていくことで、各画素値に割り当てられた符号を認識する。
The Huffman
即ち、例えば、図4(E)に示したハフマン木を、接点#4から、画素値「0」の方向に辿っていき、各接点(または画素値)に割り当てられたビットを並べると、"0"→"0"→"0"となる。これにより、ハフマンテーブル作成部33は、画素値「0」に対して、符号"000"が割り当てられたことを認識する。また、図4(E)に示したハフマン木を、接点#4から、画素値「1」の方向に辿っていき、各接点に割り当てられたビットを並べると、"0"→"0"→"1"となる。これにより、ハフマンテーブル作成部33は、画素値「1」に対して、符号"001"が割り当てられたことを認識する。
That is, for example, when the Huffman tree shown in FIG. 4E is traced from the
以下、同様にして、ハフマンテーブル33は、各画素値に割り当てられた符号を認識し、画素値と符号との対応関係を表すハフマンテーブルを作成する。従って、図4(E)に示したハフマン木からは、図4(F)に示すようなハフマンテーブルが作成されることになる。 Hereinafter, similarly, the Huffman table 33 recognizes the code assigned to each pixel value, and creates a Huffman table representing the correspondence between the pixel value and the code. Therefore, a Huffman table as shown in FIG. 4F is created from the Huffman tree shown in FIG.
なお、可変長符号化部23には、その他、例えば、特許第2977570号に記載されている方法等によって、可変長符号化を行わせることが可能である。
In addition, the variable
図4(E)に示したハフマンテーブルにおいては、出現頻度が5,4,3,2,1回の画素値「0」、「1」、「2」、「3」、「4」それぞれに、符号"11","10","01","001","000"が割り当てられており、従って、基本的に、出現頻度が高いほど、符号長の短い符号が割り当てられている。 In the Huffman table shown in FIG. 4 (E), the pixel values “0”, “1”, “2”, “3”, and “4” each having an appearance frequency of 5, 4, 3, 2, and 1 are shown. The codes “11”, “10”, “01”, “001”, and “000” are assigned. Therefore, basically, the higher the appearance frequency, the shorter the code length.
ところで、図4(E)のハフマンテーブルにおいては、画素値「0」、「1」、「2」、「3」、「4」の出現頻度は異なるが、出現頻度が比較的高い画素値「0」、「1」、「2」には、2ビットの符号が割り当てられており、出現頻度が比較的低い画素値「3」、「4」には、3ビットの符号が割り当てられている。 Incidentally, in the Huffman table of FIG. 4E, the pixel values “0”, “1”, “2”, “3”, and “4” have different appearance frequencies but the pixel values “relatively high appearance frequency”. A 2-bit code is assigned to “0”, “1”, and “2”, and a 3-bit code is assigned to pixel values “3” and “4” that have relatively low appearance frequencies. .
このように、ハフマンテーブルにおいては、出現頻度が異なっていても、同一の符号長の符号が割り当てられる場合があり、画素値の出現頻度と、その画素値に割り当てられる符号の符号長との関係は、一般に、図5に示すようになる。 In this way, in the Huffman table, even if the appearance frequencies are different, codes having the same code length may be assigned, and the relationship between the appearance frequency of the pixel value and the code length of the code assigned to the pixel value Is generally as shown in FIG.
いま、図5において、nビットの符号が割り当てられる画素値がx個あるとすると(但し、xは2n以下の整数)、そのx個の画素値に対するnビットの符号の割り当てパターンは、x!パターンだけ存在するが(!は階乗を表す)、ハフマンテーブルにおいては、そのx!パターンのうちの1つだけが、上述したハフマン木を作成する際のルールに基づいて採用されているにすぎない。 Now, in FIG. 5, if there are x pixel values to which an n-bit code is assigned (where x is an integer equal to or less than 2 n ), an n-bit code assignment pattern for the x pixel values is x ! There are only patterns (! Represents the factorial), but in the Huffman table, that x! Only one of the patterns is employed based on the rules for creating the Huffman tree described above.
一方、ハフマンテーブルにおける、x個の画素値に対するnビットの符号の割り当てパターンを変更しても、符号量は増加しない。即ち、ハフマンテーブルにおいて、nビットのある符号が割り当てられるある画素値に、他のnビットの符号を割り当てても、割り当てられる符号長は、nビットのままであるから、符号量は増加しない。 On the other hand, even if the n-bit code allocation pattern for x pixel values in the Huffman table is changed, the code amount does not increase. That is, in the Huffman table, even if another n-bit code is assigned to a certain pixel value to which an n-bit code is assigned, the assigned code length remains n bits, so the code amount does not increase.
さらに、ハフマンテーブルにおける、x個の画素値に対するnビットの符号の割り当てパターンを変更しても、例えば、そのx個の画素値の出現頻度に基づいて、符号の割り当てパターンは、元に戻すことができる。 Furthermore, even if the n-bit code allocation pattern for the x pixel values in the Huffman table is changed, the code allocation pattern is restored to the original, for example, based on the appearance frequency of the x pixel values. Can do.
以上から、ハフマンテーブルにおいて同一の符号長の符号が割り当てられている画素値に対する符号の割り当てパターンを変更しても、即ち、可変長符号化の符号化ルールを破壊しても、符号量は増加せず、さらに、変更後の割り当てパターンは、元に戻すことができる。 From the above, even if the code allocation pattern for the pixel values to which the code of the same code length is assigned in the Huffman table is changed, that is, even if the coding rule of variable length coding is destroyed, the code amount increases. In addition, the changed assignment pattern can be restored.
このことは、画素値に対する符号の割り当てパターンの変更を、何らかの情報に基づいて行うことで、全体のデータ量を増加させずに、情報を埋め込むことができ、かつ、その埋め込んだ情報を、オーバヘッドなしで復号することができることを意味する。 This is because, by changing the code allocation pattern for pixel values based on some information, it is possible to embed information without increasing the overall data amount, and to embed the embedded information in overhead. It means that it can be decrypted without.
即ち、図6は、8ビットで表される画素値(0乃至255)について作成されたハフマンテーブルの例を示している。なお、図6においては、画素値と、その画素値に割り当てられた符号(符号化データ)の他、各画素値の出現頻度も示してある。 That is, FIG. 6 shows an example of a Huffman table created for pixel values (0 to 255) represented by 8 bits. In FIG. 6, in addition to the pixel value and the code (encoded data) assigned to the pixel value, the appearance frequency of each pixel value is also shown.
図6において、例えば、画素値「12」乃至「18」の7つの画素値に注目すると、これらの7つの画素値には、いずれも、9ビットの符号が割り当てられており、この7つの画素値に対する9ビットの符号の割り当て方は、7!パターンだけ存在する。従って、この7つの画素値に対する9ビットの符号の割り当てパターンを変更することで、int[log27!]ビットの情報を埋め込むことができる。なお、int[]は、[]内の値以下の最大の整数値を意味する。 In FIG. 6, for example, when attention is paid to seven pixel values of pixel values “12” to “18”, a 9-bit code is assigned to each of these seven pixel values. How to assign a 9-bit code to a value is 7! Only patterns exist. Therefore, int [log 2 7!] Bit information can be embedded by changing the 9-bit code allocation pattern for these seven pixel values. Note that int [] means the maximum integer value less than or equal to the value in [].
ここで、図7(A)は、図6における画素値「12」乃至「18」それぞれの出現頻度をグラフによって表したものであり、図7(B)は、図6において、画素値「12」乃至「18」それぞれに割り当てられた9ビットの符号を表している。 Here, FIG. 7A shows the appearance frequencies of the pixel values “12” to “18” in FIG. 6 in a graph, and FIG. 7B shows the pixel value “12” in FIG. "To" 18 "represent 9-bit codes assigned to each.
いま、図7(B)に示した符号の割り当てを、int[log27!]ビット以下の付加情報に基づいて、例えば、図7(C)に示すように変更したとする。 Now, it is assumed that the code assignment shown in FIG. 7B is changed as shown in FIG. 7C, for example, based on additional information of int [log 2 7!] Bits or less.
即ち、図7(B)においては、画素値「12」乃至「18」に対して、符号"110111111","110111010","110100001","110011001","11011000","011101011","010001010"が、それぞれ割り当てられており、図7(C)では、画素値「12」に割り当てられていた符号"110111111"が画素値「15」に、画素値「15」に割り当てられていた符号"110011001"が画素値「12」に、画素値「16」に割り当てられていた符号"11011000"が顔値「17」に、画素値「17」に割り当てられていた符号"011101011"が画素値「18」に、画素値「18」に割り当てられていた符号"010001010"が画素値「16」に、それぞれ割り当て変更されている。なお、図7では、他の画素値に対する符号の割り当ては、変更されていない。 That is, in FIG. 7B, for the pixel values “12” to “18”, the signs “110111111”, “110111010”, “110100001”, “110011001”, “11011000”, “011101011”, “010001010” "Is assigned, and in FIG. 7C, the code" 110111111 "assigned to the pixel value" 12 "is assigned to the pixel value" 15 "and the code assigned to the pixel value" 15 ". 110011001 "is assigned to the pixel value" 12 ", the code" 11011000 "assigned to the pixel value" 16 "is assigned to the face value" 17 ", and the code" 011101011 "assigned to the pixel value" 17 "is assigned to the pixel value" The code “010001010” assigned to the pixel value “18” is changed to the pixel value “16”. In FIG. 7, the code assignment to other pixel values is not changed.
ここで、他の符号長の符号が割り当てられた画素値についても、符号の割り当てパターンを、付加情報に基づいて変更することができる。図8に、付加情報に基づいて、図6における符号の割り当てパターンを変更した符号化データとしての埋め込み符号化データの例を示す。なお、図8には、埋め込み符号化データとともに、その埋め込み符号化データを、図6に示したハフマンテーブルにしたがって可変長復号を行うことにより得られる復号画素値(埋め込み符号化データを、符号化データを得るときに用いたハフマンテーブルによって復号した画素値)も示してある。 Here, also for pixel values to which codes having other code lengths are assigned, the code assignment pattern can be changed based on the additional information. FIG. 8 shows an example of embedded encoded data as encoded data in which the code allocation pattern in FIG. 6 is changed based on the additional information. FIG. 8 shows the decoded pixel values (embedded encoded data encoded by the variable length decoding of the embedded encoded data together with the embedded encoded data according to the Huffman table shown in FIG. 6. The pixel value decoded by the Huffman table used when obtaining data) is also shown.
図8において、例えば、画素値「12」乃至「18」の7つの画素値に注目し、埋め込み符号化データを、図6のハフマンテーブルにしたがって復号すると、図9(A)に示すような復号画素値が得られる。即ち、埋め込み符号化データを、符号化時に用いたハフマンテーブルにしたがって復号した画素値を、埋め込み復号画素値というものとすると、符号"110011001","110111010","110100001","110111111","010001010","11011000","011101011"は、埋め込み復号画素値「15」、「13」、「14」、「12」、「18」、「16」、「17」に、それぞれ可変長復号される。 In FIG. 8, for example, when attention is paid to seven pixel values of pixel values “12” to “18” and the embedded encoded data is decoded in accordance with the Huffman table of FIG. 6, the decoding as shown in FIG. A pixel value is obtained. That is, if the pixel values obtained by decoding the embedded encoded data according to the Huffman table used at the time of encoding are referred to as embedded decoded pixel values, the codes “110011001”, “110111010”, “110100001”, “110111111”, “ 010001010 "," 11011000 "," 011101011 "are variable length decoded into embedded decoded pixel values" 15 "," 13 "," 14 "," 12 "," 18 "," 16 "," 17 ", respectively The
この埋め込み復号画素値「12」乃至「18」について、その出現頻度をカウントすると、図9(B)に示すようになる。即ち、図6のハフマンテーブルにおいて、画素値「12」乃至「18」に対して割り当てられた符号を、図7(B)および図7(C)に示したように変更したことから、画素値「12」、「15」、「16」乃至「18」については、その出現頻度が、図7(A)に示したものに一致せず、具体的には、可変長符号化前の画素値「15」、「12」、「18」、「16」、「17」の出現頻度にそれぞれ一致したものとなる。 The appearance frequencies of the embedded decoded pixel values “12” to “18” are counted as shown in FIG. 9B. That is, in the Huffman table of FIG. 6, since the codes assigned to the pixel values “12” to “18” are changed as shown in FIG. 7B and FIG. The appearance frequencies of “12”, “15”, “16” to “18” do not match those shown in FIG. 7A, specifically, pixel values before variable-length encoding. “15”, “12”, “18”, “16”, “17” respectively correspond to the appearance frequencies.
しかしながら、元(可変長符号化前)の画素値「12」乃至「18」それぞれの出現頻度と、可変長復号の結果得られる画素値「12」乃至「18」それぞれの出現頻度とは一致するはずであるから、上述のように、画素値の出現頻度が、可変長符号化前と、可変長復号後とで異なるのはおかしい。 However, the appearance frequencies of the original (before variable length coding) pixel values “12” to “18” and the appearance frequencies of the pixel values “12” to “18” obtained as a result of variable length decoding match. Therefore, as described above, it is strange that the appearance frequency of the pixel value is different between before the variable length coding and after the variable length decoding.
そこで、図7(A)に示した元の画素値の出現頻度と、図9(B)に示した埋め込み復号画素値の出現頻度とを比較し、一致する出現頻度を検出することで、付加情報に基づいて変更された符号(可変長符号)の割り当てパターンを元に戻すことができる。即ち、埋め込み符号化データを、ハフマンテーブルに基づいて符号化された符号化データに戻すことができる。そして、埋め込み符号化データを符号化データに戻すときの符号の割り当てパターンの変更の仕方から、埋め込まれた付加情報を復号することができ、また、元に戻した符号化データを可変長復号することで、元の画素値を復号することができる。 Therefore, the appearance frequency of the original pixel value shown in FIG. 7A is compared with the appearance frequency of the embedded decoded pixel value shown in FIG. The allocation pattern of the code (variable length code) changed based on the information can be restored. In other words, the embedded encoded data can be returned to the encoded data encoded based on the Huffman table. Then, the embedded additional information can be decoded from the method of changing the code allocation pattern when the embedded encoded data is returned to the encoded data, and the original encoded data is variable-length decoded. Thus, the original pixel value can be decoded.
具体的には、図7(A)に示した元の画素値の出現頻度と、図9(B)に示した埋め込み復号画素値の出現頻度とを比較することで、埋め込み復号画素値「15」、「13」、「14」、「12」、「17」、「18」、「16」の出現頻度が、元の画素値「12」乃至「18」の出現頻度とそれぞれ一致することを検出することができる。 Specifically, by comparing the appearance frequency of the original pixel value shown in FIG. 7A and the appearance frequency of the embedded decoded pixel value shown in FIG. 9B, the embedded decoded pixel value “15” is compared. ”,“ 13 ”,“ 14 ”,“ 12 ”,“ 17 ”,“ 18 ”,“ 16 ”, and the appearance frequencies of the original pixel values“ 12 ”to“ 18 ”respectively match. Can be detected.
これにより、埋め込み復号画素値「15」、「13」、「14」、「12」、「17」、「18」、「16」が得られた埋め込み符号化データ"110011001","110111010","110100001","110111111","010001010","11011000","011101011"は、付加情報が埋め込まれる前は、図6のハフマンテーブルにおいて、元の画素値「12」乃至「18」に割り当てられている符号"110111111","110111010","110100001","110011001","11011000","011101011","010001010"であったことが分かる。 As a result, the embedded encoded data values “110011001”, “110111010”, “15”, “13”, “14”, “12”, “17”, “18”, “16” are obtained. “110100001”, “110111111”, “010001010”, “11011000”, “011101011” are assigned to the original pixel values “12” to “18” in the Huffman table of FIG. 6 before the additional information is embedded. It can be seen that the codes are “110111111”, “110111010”, “110100001”, “110011001”, “11011000”, “011101011”, “010001010”.
従って、図9(C)に示すように、図7(A)に示した元の画素値の出現頻度と、図9(B)に示した埋め込み復号画素値の出現頻度が一致するように、埋め込み符号化データを変換することにより、図6に示したハフマンテーブルにしたがって符号化された符号化データを復元するとともに、埋め込み符号化データと、復元された符号化データとの対応関係から、付加情報を復号することができる。さらに、復元された符号化データを可変長復号することで、図9(D)に示すように、元の画素値を復号することができる。 Therefore, as shown in FIG. 9C, the appearance frequency of the original pixel value shown in FIG. 7A matches the appearance frequency of the embedded decoded pixel value shown in FIG. By converting the embedded encoded data, the encoded data encoded according to the Huffman table shown in FIG. 6 is restored, and added from the correspondence between the embedded encoded data and the recovered encoded data. Information can be decoded. Furthermore, by performing variable length decoding on the restored encoded data, the original pixel value can be decoded as shown in FIG.
図2の埋め込み圧縮符号化器11では、以上のように、データ量を増加させずに、オーバヘッドなしの復号が可能な埋め込み符号化処理が行われるようになっている。
In the embedded
次に、図10のフローチャートを参照して、図2の埋め込み圧縮符号化器11が行う埋め込み符号化処理について、さらに説明する。
Next, the embedded encoding process performed by the embedded
可変長符号化部23は、ステップS1において、フレームメモリ21から供給される注目フレームの各画素の画素値を可変長符号化し、その結果得られる符号化データを、符号化ルール破壊部25に出力する。また、可変長符号化部23(図3)は、ステップS1における可変長符号化において、その頻度テーブル作成部31で作成される頻度テーブルを、ハフマンテーブル関連情報として、MUX26に出力するとともに、ハフマンテーブル作成部33で作成されるハフマンテーブルを、変換テーブル作成部24に出力する。
In step S <b> 1, the variable
そして、ステップS2において、変換テーブル作成部24が、可変長符号化部23からのハフマンテーブルにおける同一符号長の符号の割り当てパターンを、付加情報メモリ22から供給される付加情報に基づいて変更し、その変更前の符号と変更後の符号とを対応付けた変換テーブルを作成する変換テーブル作成処理を行う。この変換テーブルは、変換テーブル作成部24から符号化ルール破壊部25に供給される。
In step S2, the conversion
符号化ルール破壊部25は、ステップS3において、可変長符号化部23からの符号化データを、変換テーブル作成部24からの変換テーブルにしたがって埋め込み符号化データに変換する符号化データ変換処理を行い、その結果得られる埋め込み符号化データを、MUX26に供給する。
In step S3, the encoding
MUX26は、ステップS4において、符号化ルール破壊部25からの注目フレームの埋め込み符号化データと、可変長符号化部23からのハフマンテーブル関連情報とを多重化して出力し、ステップS5に進む。
In step S4, the
ステップS5では、フレームメモリ21に、注目フレームの次のフレームが記憶されているかどうかが判定される。ステップS5において、フレームメモリ21に、次のフレームが記憶されていると判定された場合、その、次のフレームが、新たに注目フレームとされ、ステップS1に戻り、以下、同様の処理が繰り返される。
In step S5, it is determined whether or not the
また、ステップS5において、フレームメモリ21に、次のフレームが記憶されていないと判定された場合、埋め込み符号化処理を終了する。
If it is determined in step S5 that the next frame is not stored in the
次に、図11のフローチャートを参照して、図2の変換テーブル作成部24が図10のステップS2で行う変換テーブル作成処理について、さらに説明する。
Next, the conversion table creation process performed by the conversion
変換テーブル作成処理では、まず最初に、ステップS11において、変換テーブル作成部24は、可変長符号化部23からのハフマンテーブルにおける符号の、ある符号長に注目し、その注目符号長の符号の数を認識する。即ち、変換テーブル作成部24は、注目符号長と同一の符号長を有する符号の数を認識する。
In the conversion table creation process, first, in step S11, the conversion
さらに、変換テーブル作成部24は、ステップS12において、ステップS11で認識した注目符号長の符号の数に基づいて、その注目符号長の符号に埋め込むことのできる付加情報のビット数を算出する。即ち、注目符号長の符号の数をxとすると、変換テーブル作成部24は、y=int[log2(x!)]を演算することにより、埋め込み可能な付加情報のビット数yを求める。
Further, in step S12, the conversion
そして、ステップS13に進み、変換テーブル作成部24は、ステップS12で求めたビット数y分の付加情報を、付加情報メモリ22から読み出し、ステップS14に進む。ステップS14では、変換テーブル作成部24は、注目符号長の符号について、ステップS13で付加情報メモリ22から読み出した付加情報に基づいて、変換テーブルを作成する。即ち、変換テーブル作成部24は、ハフマンテーブルにおいて、各画素値に割り当てられている注目符号長のx個の符号の割り当てパターンを、yビットの付加情報に基づいて変更し、その変更前の符号と、変更後の符号とを対応付けた変換テーブルを、注目符号長の符号についての変換テーブルとして作成する。
In step S13, the conversion
その後、変換テーブル作成部24は、ステップS15において、付加情報が、付加情報メモリ22に、まだ記憶されているかどうかを判定し、記憶されていないと判定した場合、それまでに、注目フレームについて作成した変換テーブルを、符号化ルール破壊部25(図2)に出力して、変換テーブル作成処理を終了する。
Thereafter, in step S15, the conversion
また、ステップS15において、付加情報が、付加情報メモリ22に、まだ記憶されていると判定された場合、ステップS16に進み、変換テーブル作成部24は、ハフマンテーブルにおけるすべての符号長の符号について変換テーブルを作成したかどうかを判定し、まだ作成していないと判定した場合、ステップS11に戻る。この場合、ステップS11では、変換テーブルを作成していない符号長のうちのいずれかが、新たに注目符号長とされ、以下、同様の処理が繰り返される。
If it is determined in step S15 that the additional information is still stored in the
一方、ステップS16において、ハフマンテーブルにおけるすべての符号長の符号について変換テーブルを作成したと判定された場合、変換テーブル作成処理を終了する。 On the other hand, if it is determined in step S16 that a conversion table has been created for all codes of codes in the Huffman table, the conversion table creation process ends.
次に、図12のフローチャートを参照して、図2の符号化ルール破壊部25が図10のステップS3で行う符号化データ変換処理について、さらに説明する。
Next, the encoded data conversion processing performed by the encoding
可変長符号化部23は、上述したように、注目フレームにおける各画素を、ラスタスキャン順に、注目画素として、その注目画素の画素値を可変長符号化し、その結果得られる符号化データを、順次出力する。いま、可変長符号化部23が注目画素について出力した符号化データを、注目符号化データというものとすると、符号化ルール破壊部25は、まず最初に、ステップS21において、注目符号化データの符号長を認識し、ステップS22に進む。
As described above, the variable
ステップS22では、符号化ルール破壊部25は、ステップS21で認識した注目符号化データの符号長についての変換テーブルにしたがって、注目符号化データを変換し、埋め込み符号化データとして、MUX26(図2)に出力する。
In step S22, the encoding
そして、ステップS23に進み、符号化ルール破壊部25は、可変長符号化部23からの次の符号化データがあるかどうかを判定し、あると判定した場合、その、次の符号化データを、新たに注目符号化データとして、ステップS21に戻り、以下、同様の処理を繰り返す。
Then, the process proceeds to step S23, where the encoding
また、ステップS23において、次の符号化データがないと判定された場合、符号化データ変換処理を終了する。 If it is determined in step S23 that there is no next encoded data, the encoded data conversion process ends.
次に、図2の埋め込み圧縮符号化器11では、可変長符号化部23における可変長符号化により得られた符号化データを、変換テーブルにしたがって変換することにより、付加情報が埋め込まれた埋め込み符号化データを得るようにしたが、その他、例えば、可変長符号化部23において、画素値と符号との対応関係を変更したハフマンテーブル(以下、適宜、変更ハフマンテーブルという)を作成し、その変更ハフマンテーブルを用いることで、可変長符号化と付加情報の埋め込みとを同時に行う、即ち、破壊した符号化ルールに基づく可変長符号化を行うようにすることが可能である。
Next, in the embedded
即ち、図13は、そのような埋め込み符号化処理を行う埋め込み圧縮符号化器11の構成例を示している。なお、図中、図2または図3における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図13の埋め込み圧縮符号化器11は、符号化ルール破壊部25が設けられておらず、その替わりに、可変長符号化部23が符号化ルール破壊部41を内蔵している他は、図2における場合と同様に構成されている。
That is, FIG. 13 shows a configuration example of the embedded
符号化ルール破壊部41には、ハフマンテーブル作成部33が出力するハフマンテーブルと、変換テーブル作成部24が出力する変換テーブルが供給されるようになっている。
The encoding
符号化ルール破壊部41は、ハフマンテーブルにおいて各画素値に対応付けられている符号(符号化データ)を、変換テーブルにおいて、その符号に対応付けられている埋め込み符号化データに変更し、これにより、ハフマンテーブル作成部33からのハフマンテーブルを、画素値と埋め込み符号化データとが対応付けられたハフマンテーブルである変更ハフマンテーブルに変更する。この変更ハフマンテーブルは、符号化部34に供給され、符号化部34は、変更ハフマンテーブルにしたがって、画素値を変換する。
The encoding
従って、図13においては、符号化部34からは、埋め込み符号化データが出力される。
Therefore, in FIG. 13, the encoded
次に、図14は、埋め込み圧縮符号化器11が、図2または図13に示したように構成される場合の、図1の復号器12の構成例を示している。
Next, FIG. 14 shows a configuration example of the
DEMUX(デマルチプレクサ)51は、図2または図13の埋め込み圧縮符号化器11から提供されるデータを、埋め込み符号化データとハフマンテーブル関連情報とに、フレーム単位で分離し、各フレームについての埋め込み符号化データを、可変長復号部52および符号化ルール復元部55に供給するとともに、ハフマンテーブル関連情報を、可変長復号部52、逆変換テーブル作成部54、および可変長復号部56に供給する。
The DEMUX (demultiplexer) 51 separates the data provided from the embedded
可変長復号部52は、DEMUX51が出力する埋め込み符号化データおよびハフマン関連情報のフレームを、順次、注目フレームとし、注目フレームについてのハフマンテーブル関連情報としての頻度テーブルから、図3の可変長符号化部23における場合と同様にして、ハフマンテーブルを作成して、逆変換テーブル作成部54に供給する。
The variable
ここで、ハフマンテーブル関連情報としての頻度テーブルから作成されるハフマンテーブルは、可変長符号化部23での可変長符号化に用いられるものと同一のものであり、以下、適宜、正ハフマンテーブルという。また、正ハフマンテーブルを得るのに用いられるハフマンテーブル関連情報としての頻度テーブルを、以下、適宜、正頻度テーブルという。
Here, the Huffman table created from the frequency table as the Huffman table related information is the same as that used for variable-length coding in the variable-
可変長復号部52は、さらに、注目フレームについての埋め込み符号化データを、正ハフマンテーブルにしたがって可変長復号し、その結果得られる画素値の復号値、即ち、埋め込み復号画素値を、ハフマンテーブル生成部53に供給する。
The variable
ハフマンテーブル生成部53は、可変長復号部52から供給される注目フレームについての埋め込み復号画素値を可変長符号化するハフマンテーブルを作成し、そのハフマンテーブルと、そのハフマンテーブルを作成する過程で作成される頻度テーブルを、逆変換テーブル作成部54に供給する。
The Huffman
ここで、ハフマンテーブル生成部53が作成するハフマンテーブルは、埋め込み復号画素値(埋め込み符号化データを、正ハフマンテーブルによって可変長復号したもの)を可変長符号化するものであり、基本的に、符号化データを正しく復号することができるものではない。そこで、この埋め込み復号画素値から得られるハフマンテーブルを、以下、適宜、正ハフマンテーブルに対して、誤ハフマンテーブルという。また、誤ハフマンテーブルを得るのに用いられる頻度テーブルを、以下、適宜、正頻度テーブルに対して、誤頻度テーブルという。
Here, the Huffman table generated by the Huffman
逆変換テーブル作成部54は、可変長復号部52からの正ハフマンテーブル、DEMUX51からのハフマンテーブル関連情報としての正頻度テーブル、ハフマンテーブル生成部53からの誤ハフマンテーブルおよび誤頻度テーブルに基づいて、埋め込み符号化データを、元の符号化データに変換するための逆変換テーブルを作成する。即ち、逆変換テーブル作成部54は、図2(または図13)の変換テーブル作成部24が作成する変換テーブルと同一の逆変換テーブルを作成する。この逆変換テーブルは、符号化ルール復元部55に供給される。
Based on the normal Huffman table from the variable
符号化ルール復元部55は、逆変換テーブル作成部54から供給される逆変換テーブルに基づき、DEMUX51からの埋め込み符号化データを、符号化ルールとしての正ハフマンテーブルにしたがって符号化された符号化データに復元する。さらに、符号化ルール復元部55は、埋め込み符号化データと、復元した符号化データとの対応関係、即ち、逆変換テーブルに基づいて、埋め込み符号化データに埋め込まれていた付加情報を復号する。そして、符号化ルール復元部55は、復元した符号化データを、可変長復号部56に出力するとともに、復号した付加情報を、復号付加情報として出力する。
The encoding
可変長復号部56は、DEMUX51から供給されるハフマン関連情報から、正ハフマンテーブルを作成し、その正ハフマンテーブルに基づいて、符号化ルール復元部55から供給される符号化データを可変長復号して、その結果得られる復号画素値を出力する。
The variable
次に、図15は、図14の可変長復号部52の構成例を示している。
Next, FIG. 15 shows a configuration example of the variable
DEMUX51が出力する埋め込み符号化データは、復号部63に供給されるようになっており、同じく、DEMUX51が出力するハフマンテーブル関連情報としての頻度テーブルは、ハフマン木作成部61に供給されるようになっている。
The embedded encoded data output from the
ハフマン木作成部61は、図3のハフマン木作成部32と同様に、注目フレームについての頻度テーブルから、ハフマン木を作成し、ハフマンテーブル作成部62に供給する。
Similar to the Huffman
ハフマンテーブル作成部62は、図3のハフマンテーブル作成部33と同様に、ハフマン木作成部61からのハフマン木に基づいて、ハフマンテーブルを作成し、復号部63に供給する。
The Huffman
復号部63は、ハフマンテーブル作成部62からのハフマンテーブルにしたがい、そこに供給される埋め込み符号化データを、画素値(埋め込み復号画素値)に復号して出力する。
In accordance with the Huffman table from the Huffman
なお、図14の可変長復号部56も、図15に示した可変長復号部52と同様に構成される。
14 is configured in the same manner as the variable
次に、図16は、図14のハフマンテーブル生成部53の構成例を示している。
Next, FIG. 16 shows a configuration example of the Huffman
ハフマンテーブル生成部53において、可変長復号部52が出力する埋め込み復号画素値は、頻度テーブル71に供給される。頻度テーブル71、ハフマン木作成部72、またはハフマンテーブルテーブル作成部73は、図3の頻度テーブル作成部31、ハフマン木作成部32、またはハフマンテーブル作成部33における場合とそれぞれ同様の処理を行う。
In the Huffman
これにより、頻度テーブル作成部71では、注目フレームの埋め込み復号画素値についての頻度テーブルである誤頻度テーブル(元の画素値についての頻度テーブルではない)が作成され、逆変換テーブル作成部54(図14)に供給される。また、ハフマンテーブル作成部73では、注目フレームの埋め込み復号画素値を、その出現頻度に応じた符号長の符号に変換するためのハフマンテーブルである誤ハフマンテーブル(元の画素値についてのハフマンテーブルではない)が作成され、逆変換テーブル作成部54に供給される。
As a result, the frequency
次に、図17は、図14の逆変換テーブル作成部54の構成例を示している。
Next, FIG. 17 shows a configuration example of the inverse conversion
逆変換テーブル作成部54には、上述したように、正ハフマンテーブル、正頻度テーブル、誤ハフマンテーブル、および誤頻度テーブルが供給されるようになっており、逆変換テーブル作成部54では、これらのテーブルに基づき、図6乃至図9で説明したようにして、埋め込み符号化データと、正ハフマンテーブルによって符号化された符号化データとの対応関係が認識され、その対応関係が記述された逆変換テーブルが作成される。
As described above, a normal Huffman table, a normal frequency table, an erroneous Huffman table, and an erroneous frequency table are supplied to the reverse conversion
即ち、正ハフマンテーブルおよび誤ハフマンテーブルは、符号対応付け部82に供給され、正頻度テーブルおよび誤頻度テーブルは、比較部81に供給される。
That is, the correct Huffman table and the incorrect Huffman table are supplied to the
そして、比較部81は、正頻度テーブルと誤頻度テーブルとを比較し、各符号長の符号ごとに、正頻度テーブルと誤頻度テーブルにおいて、同一の頻度となっている画素値を検出する。さらに、比較部81は、正頻度テーブルと誤頻度テーブルにおいて、同一の頻度となっている画素値を対応付けた対応画素値テーブルを作成し、符号対応付け部82に供給する。
Then, the
符号対応付け部82は、比較部81からの対応画素値テーブルにおいて対応付けられている画素値を、正ハフマンテーブルと誤ハフマンテーブルから検索し、その検索した画素値に対応付けられている符号どうしを対応付けることにより、逆変換テーブルを作成する。この逆変換テーブルは、符号化ルール復元部55に供給される。
The
次に、図18のフローチャートを参照して、図14の復号器12による復号処理について説明する。
Next, decoding processing by the
DEMUX(デマルチプレクサ)51は、そこに供給されるデータを、埋め込み符号化データとハフマンテーブル関連情報とに分離し、各フレームについての埋め込み符号化データを、可変長復号部52および符号化ルール復元部55に供給するとともに、ハフマンテーブル関連情報を、可変長復号部52、逆変換テーブル作成部54、および可変長復号部56に供給する。
A DEMUX (demultiplexer) 51 separates data supplied thereto into embedded encoded data and Huffman table related information, and converts the embedded encoded data for each frame into a variable
可変長復号部52は、ステップS31において、DEMUX51が出力する埋め込み符号化データおよびハフマン関連情報のフレームを、順次、注目フレームとし、注目フレームについての埋め込み符号化データを可変長復号する。
In step S31, the variable
即ち、可変長復号部52は、注目フレームについてのハフマンテーブル関連情報としての頻度テーブル(正頻度テーブル)から、ハフマンテーブル(正ハフマンテーブル)を作成し、逆変換テーブル作成部54に供給する。さらに、可変長復号部52は、注目フレームについての埋め込み符号化データを、正ハフマンテーブルにしたがって可変長復号し、その結果得られる埋め込み復号画素値を、ハフマンテーブル生成部53に供給する。
That is, the variable
そして、ステップS32に進み、ハフマンテーブル生成部53は、可変長復号部52から供給される注目フレームについての埋め込み復号画素値から、頻度テーブル(誤頻度テーブル)を作成し、さらに、その誤頻度テーブルから、誤ハフマンテーブルを作成する。この誤頻度テーブルおよび誤ハフマンテーブルは、逆変換テーブル作成部54に供給される。
In step S32, the Huffman
逆変換テーブル作成部54は、ステップS33において、正ハフマンテーブル、ハフマンテーブル関連情報としての正頻度テーブル、誤ハフマンテーブル、および誤頻度テーブルに基づいて、図17で説明したように、逆変換テーブルを作成し、符号化ルール復元部55に供給する。
In step S33, the reverse conversion
符号化ルール復元部55は、ステップS34において、逆変換テーブル作成部54から供給される逆変換テーブルにおける各符号長ごとの埋め込み符号化データと符号化データとの対応関係を参照することにより、埋め込み符号化データに埋め込まれていた付加情報を復号し、その結果得られる復号付加情報を出力する。
In step S34, the encoding
さらに、符号化ルール復元部55は、ステップS35に進み、逆変換テーブルを参照することにより、DEMUX51からの埋め込み符号化データを、符号化データに変換し、可変長復号部56に供給する。
Further, the encoding
可変長復号部56は、DEMUX51から供給されるハフマン関連情報から、正ハフマンテーブルを作成し、その正ハフマンテーブルに基づいて、符号化ルール復元部55から供給される符号化データを可変長復号して、その結果得られる復号画素値を出力する。
The variable
その後、ステップS37に進み、次のフレームについての埋め込み符号化データおよびハフマンテーブル関連情報が、DEMUX51から出力されているかどうかが判定され、出力されていると判定された場合、その、次のフレームが、新たに注目フレームとされ、ステップS31に戻り、以下、同様の処理が繰り返される。
Thereafter, the process proceeds to step S37, where it is determined whether the embedded encoded data and the Huffman table related information for the next frame are output from the
また、ステップS37において、次のフレームについての埋め込み符号化データおよびハフマンテーブル関連情報が、DEMUX51から出力されていないと判定された場合、復号処理を終了する。
If it is determined in step S37 that the embedded encoded data and the Huffman table related information for the next frame have not been output from the
なお、上述したように、ハフマンテーブル関連情報としては、頻度テーブルではなく、ハフマンテーブルそのものを用いることが可能である。但し、この場合には、ハフマンテーブル関連情報としてのハフマンテーブルは、そのハフマンテーブルを参照することで、同一符号長の符号(符号化データ)が割り当てられる画素値の出現頻度の高低を認識することができるように(認識できるようなルールで)作成する必要がある。 As described above, as the Huffman table related information, the Huffman table itself can be used instead of the frequency table. However, in this case, the Huffman table as the Huffman table related information recognizes the appearance frequency of pixel values to which the code (encoded data) of the same code length is assigned by referring to the Huffman table. Must be created (with rules that can be recognized).
また、上述の場合には、フレーム単位で、ハフマンテーブルを作成するようにしたが、ハフマンテーブルは、その他、例えば、フィールド単位や、2フレーム以上の単位で作成するようにすることも可能である。 In the above case, the Huffman table is created in units of frames. However, the Huffman table can be created in units of fields or in units of two frames or more. .
さらに、ハフマンテーブルは、例えば、所定の画像データを用いて、あらかじめ作成しておき、埋め込み圧縮符号化器11と復号器12には、そのあらかじめ作成されたハフマンテーブルによって処理を行わせるようにすることも可能である。但し、この場合、処理する画像データからハフマンテーブルを作成したときに、そのハフマンテーブルが、所定の画像データから作成されたハフマンテーブルと一致していないと、復号器12において、埋め込み符号化データを符号化データに復元することが困難となるため、付加情報は、所定の画像データから作成されたハフマンテーブルと同一のハフマンテーブルが得られる画像データだけを対象に埋め込むようにする必要がある。
Further, the Huffman table is created in advance using, for example, predetermined image data, and the embedded
次に、図19は、図1の埋め込み圧縮符号化器11の他の構成例を示している。
Next, FIG. 19 shows another configuration example of the embedded
符号化部91には、符号化対象としての画像データが供給されるようになっており、符号化部91は、画像データを、所定の符号化ルールにしたがって符号化し、その結果得られる符号化データを、埋め込み部92に出力する。
The
埋め込み部92には、付加情報が供給されるようになっており、埋め込み部92は、符号化部91から供給される符号化データを、付加情報に基づいて操作して、破壊された符号化ルールにしたがって符号化された符号化データとすることにより、その付加情報を、符号化データに埋め込む。
Additional information is supplied to the embedding
次に、図20のフローチャートを参照して、図19の埋め込み圧縮符号化器11の処理(埋め込み符号化処理)について説明する。
Next, the process (embedded encoding process) of the embedded
符号化部91には、符号化対象としての画像データが、例えば、フレーム単位で供給され、符号化部91は、各フレームを、順次、注目フレームとし、ステップS41において、注目フレームの画像データを、所定の符号化ルールにしたがって符号化する。そして、符号化部91は、その結果得られる符号化データを、埋め込み部92に出力する。
The
埋め込み部92は、ステップS42において、符号化部91における符号化ルールを、付加情報に基づいて破壊することにより、その付加情報を埋め込む。即ち、埋め込み部92は、符号化部91から供給される符号化データを、付加情報に基づいて操作し、これにより、その付加情報を符号化データに埋め込む。さらに、埋め込み部92は、符号化データに付加情報を埋め込むことにより得られる埋め込み符号化データを出力し、ステップS43に進む。
In step S42, the embedding
ステップS43では、符号化部91が、次に符号化すべきフレームがあるかどうかを判定し、あると判定した場合、その、次のフレームが、新たに注目フレームとされ、ステップS41に戻り、以下、同様の処理が繰り返される。
In step S43, the
また、ステップS43において、次に符号化すべきフレームがないと判定された場合、埋め込み符号化処理を終了する。 If it is determined in step S43 that there is no next frame to be encoded, the embedded encoding process is terminated.
次に、図21は、図19の符号化部91の構成例を示している。
Next, FIG. 21 shows a configuration example of the
図21の符号化部91においては、例えば、画像データを構成する画素値が、RGB(Red,Green,Blue)で表現されるものとして、各画素値が、RGBの色空間においてベクトル量子化され、セントロイドベクトルを表すコード(以下、適宜、VQコードという)、そのコードに対応するセントロイドベクトルで表される画素値の、元の画素値に対する誤差(以下、適宜、VQ残差という)、およびベクトル量子化に用いられたコードブックが、符号化データとして出力されるようになっている。
In the
即ち、符号化対象の画像データは、フレームメモリ101に供給され、フレームメモリ101は、そこに供給される画像データを、例えば、フレーム単位で、順次記憶する。
That is, the image data to be encoded is supplied to the
コードブック作成部102は、フレームメモリ101に記憶された画像データのフレームを、順次、注目フレームとし、その注目フレームを構成する各画素の画素値から、その色空間におけるベクトル量子化に用いるコードブックを、例えば、いわゆるLBGアルゴリズムによって作成する。このコードブックは、ベクトル量子化部103に供給されるとともに、符号化データ(の一部)として出力される。
The code
ベクトル量子化部103は、フレームメモリ101から注目フレームを読み出し、その注目フレームを構成する各画素を、例えば、ラスタスキャン順に、順次、注目画素とする。そして、ベクトル量子化部103は、注目画素の画素値を、コードブック作成部102からのコードブックを用いてベクトル量子化し、その結果得られるVQコードおよびVQ残差を、符号化データ(の一部)として出力する。
The
以上のように構成される符号化部91では、図22に示すように、コードブック作成部102において、注目フレームを構成する各画素の画素値から、コードブックが作成され、ベクトル量子化部103に供給される。ベクトル量子化部103は、注目画素の画素値を、コードブック作成部102からのコードブックを用いてベクトル量子化する。
In the
即ち、ベクトル量子化部103は、注目画素の画素値によって表されるRGB空間上の点との距離が最も短い点を表すセントロイドベクトルを、コードブックから検出し、そのセントロイドベクトルを表すVQコードを出力する。さらに、ベクトル量子化部103は、そのVQコードが表すセントロイドベクトルと、注目画素の画素値によって表されるRGB空間上の点に対応するベクトルとの差分を求め、その結果得られる差分ベクトルを、VQ残差として出力する。
That is, the
そして、符号化部91では、以上のようにして得られるコードブック、並びに注目フレームの各画素についてのVQコードおよびVQ残差を、注目フレームについての符号化データとして出力する。
Then, the
次に、図23は、符号化部91が図21に示したように構成される場合の、図19の埋め込み部92の構成例を示している。
Next, FIG. 23 illustrates a configuration example of the embedding
符号化部91が出力する注目フレームのVQコード、VQ残差、コードブックは、VQコードメモリ111、VQ残差メモリ112、コードブックメモリ113に、それぞれ供給されて記憶される。
The VQ code, VQ residual, and code book of the frame of interest output from the
VQコードメモリ111とコードブックメモリ113にそれぞれ記憶されたVQコードとコードブックは、そこから読み出され、圧縮部115に供給される。
The VQ code and code book respectively stored in the
一方、ラインシフト部114は、注目フレームの各ライン(水平ライン)を、例えば、上から下方向に、順次、注目ラインとし、その注目ラインについて、VQ残差メモリ112に記憶されたVQ残差を読み出す。さらに、ラインシフト部114は、注目ラインを構成する画素数を、xとすると、int[log2x]で表されるビット数の付加情報を受信し、例えば、図24に示すように、その付加情報に対応する画素数だけ、注目ラインのVQ残差を右シフトすることにより、その付加情報を、注目ラインに埋め込む。即ち、このラインシフトにより、注目ライン上のある画素に注目すれば、基本的に、その画素についてのVQ残差は、ベクトル量子化により得られるものとは異なるものとなり、ベクトル量子化の符号化ルールが破壊される。そして、符号化ルールが破壊されることにより、付加情報が埋め込まれる。
On the other hand, the
その後、ラインシフト部114は、付加情報を埋め込んだ注目ラインのVQ残差を、圧縮部115に供給する。
Thereafter, the
ここで、注目ラインのVQ残差を右シフトする場合、注目ラインの右端の画素のVQ残差は、注目ラインの左端の画素にシフトされるものとする。同様に、注目ラインのVQ残差を左シフトする場合、左端の画素のVQ残差は、右端の画素にシフトされるものとする。 Here, when the VQ residual of the target line is shifted to the right, the VQ residual of the rightmost pixel of the target line is shifted to the leftmost pixel of the target line. Similarly, when the VQ residual of the target line is shifted to the left, the VQ residual of the leftmost pixel is shifted to the rightmost pixel.
圧縮部115は、そこに供給されるVQコード、VQ残差、コードブックを、例えば、空間相関やエントロピーの偏り等を利用して圧縮し、その圧縮結果を、MUX116に出力する。MUX116は、圧縮部115からのVQコード、VQ残差、コードブックそれぞれの圧縮結果を多重化して出力する。
The
次に、図25のフローチャートを参照して、符号化部91が図21に示したように構成され、埋め込み部92が図23に示したように構成される場合の、図19の埋め込み圧縮符号化器11の処理(埋め込み符号化処理)について説明する。
Next, referring to the flowchart of FIG. 25, the embedded compression code of FIG. 19 when the
符号化部91(図21)では、フレームメモリ101に記憶された所定のフレームが注目フレームとされ、ステップS51において、その注目フレームの各画素が、上述したように、ベクトル量子化されることにより符号化される。注目フレームのベクトル量子化の結果得られる符号化データとしてのVQコード、VQ残差、およびコードブックは、埋め込み部92に供給される。
In the encoding unit 91 (FIG. 21), a predetermined frame stored in the
埋め込み部92(図23)では、符号化部91からの注目フレームについてのVQコード、VQ残差、コードブックが、VQコードメモリ111、VQ残差メモリ112、コードブックメモリ113に、それぞれ供給されて記憶される。そして、ラインシフト部114は、ステップS52において、VQ残差メモリ112にVQ残差が記憶された注目フレームのすべてのラインを処理したかどうかを判定する。
In the embedding unit 92 (FIG. 23), the VQ code, VQ residual, and code book for the frame of interest from the
ステップS52において、VQ残差メモリ112にVQ残差が記憶された注目フレームのすべてのラインを、まだ処理していないと判定された場合、ラインシフト部114は、注目フレームにおいて、まだ処理してないラインのうちの最も上部に位置するものを、新たに注目ラインとし、ステップS53に進む。
If it is determined in step S52 that all the lines of the target frame for which the VQ residual is stored in the VQ
ステップS53では、ラインシフト部114は、注目ラインの、VQ残差を画素値とする各画素を、付加情報に対応する画素数だけ右シフトし、これにより、注目ラインに付加情報を埋め込んで、圧縮部115に供給する。その後は、ステップS52に戻り、以下、同様の処理が繰り返される。
In step S53, the
そして、ステップS52において、VQ残差メモリ112にVQ残差が記憶された注目フレームのすべてのラインを処理したと判定された場合、ステップS54に進み、圧縮部115は、VQコードメモリ111に記憶された注目フレームについてのVQコードを読み出すとともに、コードブックメモリ113に記憶された注目フレームについてのコードブックを読み出す。そして、圧縮部115は、そのVQコードおよびコードブック、さらには、ラインシフト部114からの付加情報が埋め込まれたVQ残差を圧縮し、MUX116に供給する。
If it is determined in step S52 that all lines of the frame of interest in which the VQ residual is stored in the VQ
MUX116は、ステップS55において、圧縮部115からのVQコード、VQ残差、およびコードブックを多重化して出力し、ステップS56に進む。
In step S55, the
ステップS56では、符号化部91において、次に符号化すべきフレームがあるかどうかがが判定され、あると判定された場合、その、次に符号化すべきフレームが、新たに注目フレームとされ、ステップS51に戻り、以下、同様の処理が繰り返される。
In step S56, it is determined whether or not there is a frame to be encoded next in the
また、ステップS56において、次に符号化すべきフレームがないと判定された場合、埋め込み符号化処理を終了する。 If it is determined in step S56 that there is no next frame to be encoded, the embedded encoding process is terminated.
次に、図26は、埋め込み圧縮符号化器11が図19に示したように構成される場合の、図1の復号器12の構成例を示している。
Next, FIG. 26 shows a configuration example of the
図19の埋め込み部92が出力する埋め込み符号化データは、符号化ルール復元部121に供給される。
The embedded encoded data output from the embedding
符号化ルール復元部121は、埋め込み符号化データを、図19の符号化部91における符号化ルールにしたがって符号化された符号化データに復元し、これにより、埋め込み符号化データに埋め込まれていた付加情報を復号する。
The encoding
即ち、符号化ルール復元部121は、埋め込み符号化データに対して、パラメータコントローラ124から供給されるパラメータに基づく操作を施すことにより、符号化データの候補(以下、適宜、仮符号化データという)を求める。さらに、符号化ルール復元部121は、埋め込み符号化データを仮符号化データに復元する操作に基づいて、埋め込み符号化データに埋め込まれていた付加情報の候補(以下、仮復号付加情報という)を復号する。そして、仮符号化データは、復号部122および判定部123に、仮復号付加情報は、判定部123に供給される。
In other words, the encoding
復号部122は、符号化ルール復元部121からの仮符号化データに対して、図19の符号化部91における符号化ルールに基づく復号処理を施すことにより、元の画素値の候補(以下、適宜、仮復号画素値という)を復号する。この仮復号画素値は、判定部123に供給される。
The
判定部123は、パラメータコントローラ124を制御することにより、1つ以上の値のパラメータを、符号化ルール復元部121に供給させ、その1つ以上の値のパラメータそれぞれに対応して得られる1つ以上の仮復号画素値の中から、正しい(元の画素値に一致する)仮復号画素値を判定する。さらに、判定部123は、1つ以上の仮復号画素値それぞれに付随して、符号化ルール復元部121から供給される1つ以上の仮復号付加情報の中から、正しい復号画素値が得られたときのものを、正しい復号付加情報として選択し、正しい仮復号画素値と仮復号付加情報を、画素値と付加情報の最終的な復号結果(復号画素値と復号付加情報)として、それぞれ出力する。
The
パラメータコントローラ124は、判定部123の制御にしたがい、埋め込み符号化データを操作するための所定のパラメータを、符号化ルール復元部121に供給する。
The
次に、図27のフローチャートを参照して、図26の復号器12の処理(復号処理)について説明する。
Next, processing (decoding processing) of the
判定部123は、まず最初に、ステップS61において、パラメータコントローラ124を制御することにより、符号化ルール復元部121に与えるパラメータを設定する。これにより、パラメータコントローラ126は、判定部123の制御にしたがったパラメータを、符号化ルール復元部121に供給する。
First, the
符号化ルール復元部121は、ステップS62において、埋め込み符号化データに対して、パラメータコントローラ124から供給されるパラメータに基づく操作を施すことにより、仮符号化データに変換し、復号部122および判定部123に供給する。さらに、符号化ルール復元部121は、埋め込み符号化データを仮符号化データに復元する操作、つまりは、パラメータコントローラ124からのパラメータに基づいて、埋め込み符号化データに埋め込まれていた付加情報を復号し、仮復号付加情報として、判定部123に供給する。
In step S62, the encoding
復号部122は、ステップS63において、符号化ルール復元部121からの仮符号化データを、図19の符号化部91における符号化ルールに基づいて復号し、その復号の結果得られる画素値を、仮復号画素値として、判定部123に供給する。
In step S63, the
判定部123は、ステップS64において、復号部122からの仮復号画素値が、正しい復号結果であるかどうか(元の画素値に一致しているかどうか)を判定し、一致していないと判定した場合、ステップS61に戻る。この場合、判定部123は、ステップS61において、パラメータコントローラ124に出力させるパラメータとして、新たな値を設定し、以下、同様の処理を繰り返す。
In step S64, the
一方、ステップS64において、復号部122からの仮復号画素値が、正しい復号結果であると判定された場合、ステップS65に進み、判定部123は、その仮復号画素値を、元の画素値の復号結果である復号画素値として出力する。さらに、判定部123は、その復号画素値が得られたときの仮復号付加情報を、埋め込まれていた付加情報の復号結果である復号付加情報として出力し、ステップS66に進む。
On the other hand, when it is determined in step S64 that the temporary decoded pixel value from the
ステップS66では、まだ復号すべき埋め込み符号化データがあるかどうかが判定され、あると判定された場合、ステップS61に戻り、その復号すべき埋め込み符号化データを対象に、以下、同様の処理が繰り返される。 In step S66, it is determined whether there is still embedded encoded data to be decoded. If it is determined that there is, the process returns to step S61, and the same processing is performed for the embedded encoded data to be decoded. Repeated.
また、ステップS66において、復号すべき埋め込み符号化データがないと判定された場合、復号処理を終了する。 If it is determined in step S66 that there is no embedded encoded data to be decoded, the decoding process ends.
次に、図28は、図19の埋め込み部92が図23に示したように構成される場合の、図26の符号化ルール復元部121の構成例を示している。
Next, FIG. 28 illustrates a configuration example of the encoding
図23のMUX116が出力するデータは、DEMUX131に供給され、DEMUX131は、そこに供給されるデータを、圧縮されたVQコード、VQ残差、およびコードブックに分離し、伸張部132に供給する。伸張部132は、DEMUX131からの、圧縮されたVQコード、VQ残差、コードブックを伸張し、その伸張後のVQコード、VQ残差、コードブックを、VQコードメモリ133、VQ残差メモリ134、コードブックメモリ135にそれぞれ供給する。
Data output from the
VQコードメモリ133、VQ残差メモリ134、コードブックメモリ135は、伸張部132からのVQコード、VQ残差、コードブックを、それぞれ、フレーム単位で記憶する。
The
ラインシフト部136は、VQ残差メモリ134に記憶されたフレームの各ラインを、例えば、上から下方向に、順次、注目ラインとし、その注目ラインについて、VQ残差メモリ134に記憶されたVQ残差を読み出す。さらに、ラインシフト部136は、注目ラインを構成する画素数を、xとすると、0乃至xの範囲の整数値を、パラメータコントローラ124(図26)から、パラメータとして受信し、そのパラメータに対応する画素数だけ、注目ラインのVQ残差を左シフトする。そして、ラインシフト部136は、そのシフト後の各ラインのVQ残差を、VQコードメモリ133に記憶されたVQコード、およびコードブックメモリ135に記憶されたコードブックとともに、仮符号化データとして出力する。
The
さらに、ラインシフト部136は、パラメータコントローラ124からのパラメータの値を、仮復号付加情報として出力する。
Further, the
次に、図29は、図19の符号化部91が図21に示したように構成される場合の、図26の復号部122の構成例を示している。
Next, FIG. 29 illustrates a configuration example of the
復号部122は、符号化ルール復元部121から供給される符号化データとしての1フレームのVQコード、VQ残差、およびコードブックに基づき、ベクトル逆量子化を行うことにより、画素値を復号する。
The
即ち、ベクトル逆量子化部141には、VQコードおよびコードブックが供給されるようになっており、ベクトル逆量子化部141は、VQコードに対応するセントロイドベクトルを、コードブックから検出し、そのセントロイドベクトルを、加算部142に供給する。加算部142には、ベクトル逆量子化部141からセントロイドベクトルが供給される他、VQ残差としての差分ベクトルも供給されるようになっており、加算部142は、セントロイドベクトルと差分ベクトルとを加算する。そして、加算部142は、その加算の結果得られるベクトルの各成分を、R,G,B値とする画素値を、仮復号画素値として出力する。
That is, the vector
次に、図30は、符号化ルール復元部121と復号部122が、図28と図29に示したようにそれぞれ構成される場合の、図26の判定部123の構成例を示している。
Next, FIG. 30 illustrates a configuration example of the
メモリ151には、符号化ルール復元部121からの仮復号付加情報と、復号部122からの仮復号画素値が供給されるようになっており、メモリ151は、その仮復号付加情報と仮復号画素値を一時記憶するとともに、正誤判定部154の制御にしたがい、記憶した仮復号付加情報と仮復号画素値を読み出し、それぞれを、復号付加情報と復号画素値として出力する。
The
符号化部152には、符号化ルール復元部121が出力する仮符号化データのうちのコードブックと、復号部122が出力する仮復号画素値が供給されるようになっており、符号化部152は、仮復号画素値を、図19の符号化部91と同様に符号化する。即ち、符号化部152は、仮復号画素値を、符号化ルール復元部121からのコードブックを用いてベクトル量子化し、その結果得られるVQコードとVQ残差を、比較部153に供給する。ここで、以下、適宜、仮復号画素値をベクトル量子化して得られるVQコードとVQ残差を、それぞれ、仮VQコードと仮VQ残差という。
The
比較部153には、符号化部152が出力する仮VQコードおよび仮VQ残差の他、復号部122が出力する仮符号化データのうちのVQコードおよびVQ残差が供給されるようになっている。比較部153は、仮VQコードと、仮符号化データのVQコードとを比較するとともに、仮VQ残差と、仮符号化データのVQ残差とを比較し、それぞれの比較結果を、正誤判定部154に供給する。
In addition to the temporary VQ code and the temporary VQ residual output from the
正誤判定部154は、パラメータコントローラ124を制御することにより、パラメータコントローラ124に、ラインシフトを行うビット数を、パラメータとして、符号化ルール復元部121に供給させる。また、正誤判定部154は、比較部153からの仮VQコードと仮符号化データのVQコードとの比較結果、および仮VQ残差と仮符号化データのVQ残差との比較結果に基づいて、仮復号画素値が復号結果として正しいかどうかを判定し、その判定結果に基づき、メモリ151からの仮復号画素値および仮復号付加情報の読み出しを制御する。
The
次に、図31を参照して、図30の正誤判定部154が、仮復号画素値が復号結果として正しいかどうかを判定する判定原理について説明する。
Next, with reference to FIG. 31, a description will be given of the determination principle by which the correctness /
符号化部91(図19)では、RGB空間においてベクトル量子化が行われるから、そのベクトル量子化に用いられるセントロイドベクトルは、R成分、B成分、およびG成分の3つの成分から構成される。いま、このR成分、B成分、およびG成分からなるセントロイドベクトルを、(R,G,B)と表すとともに、説明を簡単にするために、コードブックにおけるセントロイドベクトルのR成分、B成分、およびG成分が、いずれも10の倍数で表されるものとすると、R,B,G成分が、例えば、それぞれ102,103,99の画素値(以下、適宜、画素値(102,103,99)と表す)は、セントロイドベクトル(100,100,100)との距離を最も短くするから、セントロイドベクトル(100,100,100)に対応するVQコードにベクトル量子化される。ここで、セントロイドベクトル(100,100,100)に対応するVQコードを、例えば、0とする。 In the encoding unit 91 (FIG. 19), vector quantization is performed in the RGB space, so that the centroid vector used for the vector quantization is composed of three components: an R component, a B component, and a G component. . Now, the centroid vector composed of the R component, the B component, and the G component is expressed as (R, G, B), and in order to simplify the explanation, the R component and the B component of the centroid vector in the codebook Assuming that the G component and the G component are all expressed by multiples of 10, the R, B, and G components are, for example, pixel values of 102, 103, and 99 (hereinafter, pixel values (102, 103, 99) is vector-quantized into a VQ code corresponding to the centroid vector (100, 100, 100) since the distance from the centroid vector (100, 100, 100) is the shortest. Here, the VQ code corresponding to the centroid vector (100, 100, 100) is set to 0, for example.
この場合、VQ残差は、画素値(102,103,99)から、セントロイドベクトル(100,100,100)を減算して、(2,3,−1)となる。従って、画素値(102,103,99)は、VQコード0と、VQ残差(2,3,−1)に符号化される。
In this case, the VQ residual is (2, 3, -1) by subtracting the centroid vector (100, 100, 100) from the pixel value (102, 103, 99). Accordingly, the pixel value (102, 103, 99) is encoded into
そして、このようにして符号化部91で得られる符号化データとしてのVQコード0と、VQ残差(2,3,−1)をベクトル逆量子化すると、図31(A)に示すように、VQコード0に対応するセントロイドベクトル(100,100,100)と、VQ残差(2,3,−1)とを加算することにより、画素値(102,103,99)が得られ、従って、元の画素値に正しく復号される。
Then, when vector inverse quantization is performed on the
さらに、この復号された画素値(102,103,99)を、再度ベクトル量子化すると、図31(A)に示すように、やはり、VQコード0と、VQ残差(2,3,−1)が得られる。
Further, when the decoded pixel values (102, 103, 99) are vector quantized again, as shown in FIG. 31A, the
以上から、符号化データとしてのVQコードとVQ残差を復号し、正しい復号結果を得て、その復号結果を再度符号化(ここでは、ベクトル量子化)すると、その符号化の結果得られるVQコードとVQ残差は、符号化データとしてのVQコードとVQ残差に、それぞれ一致する。 As described above, when the VQ code and the VQ residual as encoded data are decoded, a correct decoding result is obtained, and the decoding result is encoded again (here, vector quantization), the VQ obtained as a result of the encoding is obtained. The code and the VQ residual coincide with the VQ code and the VQ residual as encoded data, respectively.
一方、符号化部91で得られる符号化データとしてのVQコード0と、VQ残差(2,3,−1)のうちの、VQ残差(2,3,−1)について、上述したようにラインシフトが行われることにより付加情報が埋め込まれると、VQコード0と、VQ残差(2,3,−1)に対応する画素のVQ残差には、他の画素について得られたVQ残差が割り当てられる。いま、この、他の画素のVQ残差が、例えば、図31(B)に示すように、(10,11,12)であったとすると、VQコード0と、VQ残差(10,11,12)は、図31(B)に示すように、VQコード0に対応するセントロイドベクトル(100,100,100)と、VQ残差(10,11,12)とを加算することにより、画素値(110,111,112)に復号され、従って、元の画素値(102,103,99)には、正しく復号されない。
On the other hand, VQ residual (2, 3, -1) out of
従って、この正しく復号されない画素値(110,111,112)を、再度ベクトル量子化しても、図31(B)に示すように、符号化データとしてのVQコード0またはVQ残差(2,3,−1)と一致するVQコードまたはVQ残差は得られない。
Therefore, even if the pixel values (110, 111, 112) that are not correctly decoded are subjected to vector quantization again, as shown in FIG. 31B,
即ち、いまの場合、コードブックにおけるセントロイドベクトルのR成分、B成分、およびG成分は、いずれも10の倍数で表されるものとしてあるから、画素値(110,111,112)との距離を最も短くするセントロイドベクトルは、(110,110,110)となる。従って、セントロイドベクトル(110,110,110)を表すVQコードを、例えば、1とすると、画素値(110,111,112)は、VQコード1と、VQ残差(0,1,2)(=(110,111,112)−(110,110,110))にベクトル量子化され、この場合、VQコードも、また、VQ残差も、元の符号化データであるVQコード0またはVQ残差(10,11,12)に一致しない。
That is, in this case, since the R component, B component, and G component of the centroid vector in the codebook are all expressed by multiples of 10, the distance from the pixel value (110, 111, 112) The shortest centroid vector is (110, 110, 110). Therefore, if the VQ code representing the centroid vector (110, 110, 110) is, for example, 1, the pixel value (110, 111, 112) is the
以上から、図28のラインシフト部136で、パラメータにしたがってシフトされる画素数が、付加情報に一致していない場合、即ち、仮符号化データが、付加情報が埋め込まれる前の符号化データに一致していない場合には、そのような仮符号化データから得られる仮復号画素値を再度符号化して得られるVQコードとVQ残差が、仮符号化データとしてのVQコードとVQ残差に、それぞれ一致せず、これにより、仮符号化データを復号して得られる仮復号画素値が、正しい復号結果でないことを判定することができる。
From the above, when the number of pixels shifted in accordance with the parameters in the
一方、図28のラインシフト部136で、パラメータにしたがってシフトされる画素数が、付加情報に一致している場合、即ち、仮符号化データが、付加情報が埋め込まれる前の符号化データに一致している場合には、そのような仮符号化データから得られる仮復号画素値を再度符号化して得られるVQコードとVQ残差が、仮符号化データとしてのVQコードとVQ残差に、それぞれ一致し、これにより、仮符号化データを復号して得られる仮復号画素値が、正しい復号結果であることを判定することができる。
On the other hand, in the
次に、図32のフローチャートを参照して、符号化ルール復元部121、復号部122、判定部123が、図28乃至図30にそれぞれ示したように構成される場合の、図26の復号器12の復号処理について説明する。
Next, referring to the flowchart of FIG. 32, the decoder of FIG. 26 in the case where the encoding
復号処理では、符号化ルール復元部121のDEMUX131が、そこに供給されるデータを、圧縮されたVQコード、VQ残差、およびコードブックに分離し、伸張部132に供給する。伸張部132は、ステップS71において、DEMUX131からの、圧縮されたVQコード、VQ残差、コードブックを伸張し、その伸張後のVQコード、VQ残差、コードブックを、VQコードメモリ133、VQ残差メモリ134、コードブックメモリ135にそれぞれ供給して記憶させる。
In the decoding process, the
その後、ステップS72において、判定部123(図30)の正誤判定部154は、パラメータコントローラ124(図26)を制御することにより、所定の値のパラメータを設定し、そのパラメータを、符号化ルール復元部121に供給させる。
Thereafter, in step S72, the
ここで、正誤判定部154は、例えば、各フレームの各ラインについて、ステップS72の処理が行われるごとに、0から、1ラインの画素数までの範囲の整数値を、順次、パラメータの値として設定する。
Here, the
符号化ルール復元部121は、パラメータコントローラ124から、パラメータを受信すると、ステップS73において、ラインシフト部136が、そのパラメータに対応する画素数だけ、注目ラインのVQ残差を左シフトし、その左シフト後のVQ残差を、VQコードメモリ133に記憶された注目ラインのVQコード、およびコードブックメモリ135に記憶されたコードブックとともに、仮符号化データとして、復号部122に供給する。さらに、ラインシフト部136は、注目ラインをシフトした画素数を、仮復号付加情報として、判定部123に供給する。
When the encoding
復号部122は、ステップS74において、符号化ルール復元部121からの仮符号化データとしてのVQコード、VQ残差、およびコードブックに基づいて、ベクトル逆量子化を行うことにより、注目ラインの画素値の復号を行い、その復号の結果得られる仮復号画素値を、判定部123に供給する。
In step S74, the
判定部123(図30)では、符号化ルール復元部121が出力する仮復号付加情報と、復号部122が出力する仮復号画素値が、メモリ151に記憶される。さらに、判定部123では、ステップS75において、符号化部152が、復号部122からの仮復号画素値をベクトル量子化し、その結果得られる仮VQコードと仮VQ残差を、比較部153に供給する。
In the determination unit 123 (FIG. 30), the provisional decoding additional information output from the encoding
比較部153は、注目ラインについて、符号化部152からの仮VQコードと、仮符号化データとしてのVQコードとを比較するとともに、符号化部152からの仮VQ残差と、仮符号化データとしてのVQ残差とを比較し、それぞれの比較結果を、正誤判定部154に供給する。正誤判定部154は、ステップS76において、注目ラインについて、仮VQコードと、仮符号化データとしてのVQコードとが一致し、かつ仮VQ残差と、仮符号化データとしてのVQ残差とが一致しているかどうかを判定し、いずれかが、または両方が一致していないと判定した場合、即ち、直前のステップS72で設定したパラメータの値が、付加情報に一致していない場合、ステップS72に戻り、新たな値のパラメータが設定され、以下、同様の処理が繰り返される。
The
また、ステップS76において、仮VQコードと、仮符号化データとしてのVQコードとが一致し、かつ仮VQ残差と、仮符号化データとしてのVQ残差とが一致していると判定された場合、即ち、直前のステップS72で設定したパラメータの値が、付加情報に一致しており、従って、符号化データが復元されるとともに、仮復号付加情報として、元の付加情報が正しく復号された場合、ステップS77に進み、正誤判定部154は、メモリ151を制御することにより、そこに記憶された注目ラインの各画素の仮復号画素値と、仮復号付加情報を、正しい復号結果である復号画素値と復号付加情報として、それぞれ出力させ、ステップS78に進む。
In step S76, it is determined that the temporary VQ code matches the VQ code as the temporary encoded data, and the temporary VQ residual matches the VQ residual as the temporary encoded data. In this case, that is, the parameter value set in the immediately preceding step S72 matches the additional information. Therefore, the encoded data is restored, and the original additional information is correctly decoded as provisional decoding additional information. In this case, the process proceeds to step S77, and the
ステップS78では、次に復号すべきラインがあるかどうかが判定され、あると判定された場合、ステップS72に戻り、その、次に復号すべきラインを、新たに注目ラインとして、以下、同様の処理が繰り返される。 In step S78, it is determined whether or not there is a line to be decoded next. When it is determined that there is a line, the process returns to step S72, and the line to be decoded next is newly set as a noticed line. The process is repeated.
また、ステップS78において、次に復号すべきラインがないと判定された場合、復号処理を終了する。 If it is determined in step S78 that there is no line to be decoded next, the decoding process ends.
なお、図32の復号処理は、各フレームについて行われる。 Note that the decoding process of FIG. 32 is performed for each frame.
以上のように、符号化データを得るための符号化ルールを、付加情報に基づいて破壊し、その破壊した符号化ルールによって符号化された埋め込み符号化データに対して、所定の操作を施すことにより、仮符号化データを得て、その仮符号化データを復号し、その復号結果を符号化して得られるものが、仮符号化データに一致するかどうかを判定することによって、符号化ルールが破壊される前の符号化データを復元するようにしたので、この符号化ルールの破壊および復元を利用して、符号化データのデータ量を増加させることなく、付加情報を埋め込むとともに、復号を行うことができる。 As described above, the encoding rule for obtaining the encoded data is destroyed based on the additional information, and a predetermined operation is performed on the embedded encoded data encoded by the destroyed encoding rule. Thus, the provisional encoded data is obtained, the provisional encoded data is decoded, and the result obtained by encoding the decoding result is determined to match the provisionally encoded data. Since the encoded data before being destroyed is restored, the destruction and restoration of this encoding rule is used to embed additional information and perform decoding without increasing the data amount of the encoded data. be able to.
ここで、本件出願人は、例えば、画像の相関性等を利用して、付加情報を画像に埋め込む手法を先に提案している。即ち、先に提案した方法は、例えば、フレームを構成するラインを、付加情報に基づいて入れ替え、その入れ替え後のフレームのラインを、元のフレームにおいて近接しているラインどうしの相関が高いことを利用して、元の位置に戻すものであるが、この相関を利用した方法では、場合によって、付加情報を埋め込むことが困難であることがあった。即ち、相関を利用した方法は、簡単には、付加情報が埋め込まれたフレームのあるラインに注目して、その注目ラインとの相関が最も高いラインを、注目ラインの隣に入れ替えることにより、ラインを、すべて、元の位置に戻すものであるが、画像によっては、注目ラインとの相関が最も高いラインが、注目ラインの隣に位置すべきラインではないことがあり、このようなラインについては、付加情報を埋め込むことにより、ラインを入れ替えてしまうと、相関を利用して、元の位置に戻すことができないため、付加情報を埋め込むことが困難であった。 Here, the applicant of the present application has previously proposed a method of embedding additional information in an image using, for example, image correlation. That is, in the method proposed previously, for example, the lines constituting the frame are replaced based on the additional information, and the line of the frame after the replacement is highly correlated with the adjacent lines in the original frame. It is used to return to the original position, but in the method using this correlation, it may be difficult to embed additional information in some cases. That is, the method using the correlation is simply to pay attention to a line with a frame in which additional information is embedded, and replace the line having the highest correlation with the target line next to the target line. However, depending on the image, the line with the highest correlation with the target line may not be the line that should be located next to the target line. If the line is replaced by embedding the additional information, it is difficult to embed the additional information because the correlation cannot be used to return to the original position.
これに対して、上述した手法では、そのような復号の失敗がない。 On the other hand, in the above-described method, there is no such decoding failure.
なお、図26の実施の形態では、復号器12を、符号化ルール復元部122と復号部122との組を1系統だけ設けて構成し、パラメータコントローラ124から出力するパラメータを順次変えることにより、各値のパラメータに対応する仮符号化データを順次得るようにしたが、復号器12は、例えば、図33に示すように、M系統の符号化ルール復元部1211乃至121Mと復号部1221乃至122Mを設けて構成し、各系統の符号化ルール復元部121m(m=1,2,・・・,M)に、異なる値のパラメータを与えて、各値のパラメータに対応する仮符号化データを同時に得るようにすることが可能である。
In the embodiment of FIG. 26, the
また、上述の場合には、図19の符号化部91に、ベクトル量子化を行わせるようにしたが、符号化部91には、ベクトル量子化以外の、例えば、予測符号化等を行わせることが可能である。そして、この場合、埋め込み部92では、予測符号化による予測残差を、付加情報に基づいて操作することにより、付加情報を埋め込むようにすることが可能である。
In the above-described case, the
さらに、上述の場合には、各ラインのVQ残差を、付加情報に基づいてシフトすることにより、その付加情報を埋め込むようにしたが、付加情報は、その他、例えば、VQ残差を表す値のビット列をシフトしたりすること等によって埋め込むことが可能である。 Further, in the above-described case, the VQ residual of each line is shifted based on the additional information to embed the additional information. However, the additional information is, for example, a value representing the VQ residual. Can be embedded by shifting or the like.
また、上述の場合には、フレームごとに、コードブックを作成し、符号化データに含めるようにしたが、コードブックは、あらかじめ作成しておき、埋め込み圧縮符号化器11と復号器12それぞれにおいて記憶しておくようにすることが可能である。さらに、コードブックは、複数フレームごとや、1フレームの所定の領域ごとに作成することも可能である。
In the above-described case, a code book is created for each frame and included in the encoded data. However, the code book is created in advance, and the embedded
次に、上述した一連の処理は、ハードウェアにより行うこともできるし、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータ等にインストールされる。 Next, the series of processes described above can be performed by hardware or software. When a series of processing is performed by software, a program constituting the software is installed in a general-purpose computer or the like.
そこで、図34は、上述した一連の処理を実行するプログラムがインストールされるコンピュータの一実施の形態の構成例を示している。 Therefore, FIG. 34 shows a configuration example of an embodiment of a computer in which a program for executing the above-described series of processing is installed.
プログラムは、コンピュータに内蔵されている記録媒体としてのハードディスク205やROM203に予め記録しておくことができる。
The program can be recorded in advance in a
あるいはまた、プログラムは、フロッピー(登録商標)ディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体211に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体211は、いわゆるパッケージソフトウエアとして提供することができる。
Alternatively, the program is stored in a
なお、プログラムは、上述したようなリムーバブル記録媒体211からコンピュータにインストールする他、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータに無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送し、コンピュータでは、そのようにして転送されてくるプログラムを、通信部208で受信し、内蔵するハードディスク205にインストールすることができる。
The program is installed on the computer from the
コンピュータは、CPU(Central Processing Unit)202を内蔵している。CPU202には、バス201を介して、入出力インタフェース210が接続されており、CPU202は、入出力インタフェース210を介して、ユーザによって、キーボードや、マウス、マイク等で構成される入力部207が操作等されることにより指令が入力されると、それにしたがって、ROM(Read Only Memory)203に格納されているプログラムを実行する。あるいは、また、CPU202は、ハードディスク205に格納されているプログラム、衛星若しくはネットワークから転送され、通信部208で受信されてハードディスク205にインストールされたプログラム、またはドライブ209に装着されたリムーバブル記録媒体211から読み出されてハードディスク205にインストールされたプログラムを、RAM(Random Access Memory)204にロードして実行する。これにより、CPU202は、上述したフローチャートにしたがった処理、あるいは上述したブロック図の構成により行われる処理を行う。そして、CPU202は、その処理結果を、必要に応じて、例えば、入出力インタフェース210を介して、LCD(Liquid CryStal Display)やスピーカ等で構成される出力部206から出力、あるいは、通信部208から送信、さらには、ハードディスク205に記録等させる。
The computer includes a CPU (Central Processing Unit) 202. An input /
ここで、本明細書において、コンピュータに各種の処理を行わせるためのプログラムを記述する処理ステップは、必ずしもフローチャートとして記載された順序に沿って時系列に処理する必要はなく、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含むものである。 Here, in this specification, the processing steps for describing a program for causing a computer to perform various types of processing do not necessarily have to be processed in time series according to the order described in the flowchart, but in parallel or individually. This includes processing to be executed (for example, parallel processing or processing by an object).
また、プログラムは、1のコンピュータにより処理されるものであっても良いし、複数のコンピュータによって分散処理されるものであっても良い。さらに、プログラムは、遠方のコンピュータに転送されて実行されるものであっても良い。 Further, the program may be processed by a single computer, or may be processed in a distributed manner by a plurality of computers. Furthermore, the program may be transferred to a remote computer and executed.
なお、本実施の形態では、画像データを符号化の対象としたが、符号化の対象とするデータは、画像データに限定されるものではなく、音声データ(オーディオデータ)や、コンピュータのプログラム等の各種のデータを採用することが可能である。 In this embodiment, image data is a target for encoding. However, data to be encoded is not limited to image data, and audio data (audio data), a computer program, etc. It is possible to adopt various types of data.
1 符号化装置, 2 復号装置, 3 記録媒体, 4 伝送媒体, 11
埋め込み圧縮符号化器, 12 復号器, 21 フレームメモリ, 22 付加情報メモリ, 23 可変長符号化部, 24 変換テーブル作成部, 25 符号化ルール破壊部, 26 MUX, 31 頻度テーブル作成部, 32 ハフマン木作成部, 33 ハフマンテーブル作成部, 34 符号化部,
41 符号化ルール破壊部, 51 DEMUX, 52 可変長復号部, 53 ハフマンテーブル生成部, 54 逆変換テーブル作成部, 55 符号化ルール復元部, 56 可変長復号部, 61 ハフマン木作成部, 62 ハフマンテーブル作成部, 63 復号部, 71 頻度テーブル作成部, 72 ハフマン木作成部, 73 ハフマンテーブル作成部, 81 比較部, 82 符号対応付け部, 91 符号化部, 92 埋め込み部, 101 フレームメモリ, 102 コードブック作成部, 103 ベクトル量子化部, 111 VQコードメモリ, 112 VQ残差メモリ, 113 コードブックメモリ, 114 ラインシフト部, 115 圧縮部, 116 MUX, 121,1211乃至121M 符号化ルール復元部, 122,1221乃至122M 復号部, 123 判定部, 124 パラメータコントローラ,
131 DEMUX, 132 伸張部, 133 VQコードメモリ, 134 VQ残差メモリ, 135 コードブックメモリ, 136 ラインシフト部, 141 ベクトル逆量子化部, 142 加算部, 151 メモリ,
152 符号化部, 153 比較部, 154 正誤判定部, 201 バス, 202 CPU, 203 ROM, 204 RAM, 205 ハードディスク, 206 出力部, 207 入力部, 208 通信部, 209 ドライブ, 210 入出力インタフェース, 211 リムーバブル記録媒体
DESCRIPTION OF
Embedded compression encoder, 12 decoder, 21 frame memory, 22 additional information memory, 23 variable length encoding unit, 24 conversion table creation unit, 25 coding rule destruction unit, 26 MUX, 31 frequency table creation unit, 32 Huffman Tree creation part, 33 Huffman table creation part, 34 encoding part,
41 Coding rule destruction unit, 51 DEMUX, 52 Variable length decoding unit, 53 Huffman table generation unit, 54 Inverse conversion table creation unit, 55 Coding rule restoration unit, 56 Variable length decoding unit, 61 Huffman tree creation unit, 62 Huffman Table creation unit, 63 decoding unit, 71 frequency table creation unit, 72 Huffman tree creation unit, 73 Huffman table creation unit, 81 comparison unit, 82 code association unit, 91 coding unit, 92 embedding unit, 101 frame memory, 102 Codebook creation unit, 103 vector quantization unit, 111 VQ code memory, 112 VQ residual memory, 113 codebook memory, 114 line shift unit, 115 compression unit, 116 MUX, 121, 121 1 to 121 M coding rule restoration parts, 122, 122 1 to 122 M decoder, 1 Third determining unit, 124 parameter controller,
131 DEMUX, 132 decompression unit, 133 VQ code memory, 134 VQ residual memory, 135 codebook memory, 136 line shift unit, 141 vector inverse quantization unit, 142 addition unit, 151 memory,
152 encoding unit, 153 comparison unit, 154 correctness determination unit, 201 bus, 202 CPU, 203 ROM, 204 RAM, 205 hard disk, 206 output unit, 207 input unit, 208 communication unit, 209 drive, 210 I / O interface, 211 Removable recording medium
Claims (7)
前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データを生成する埋め込み手段と
を備えるデータ処理装置。 Encoding means for quantizing the first data and outputting the resulting quantization code and quantization error as encoded data;
Embedded encoded data in which the second data is embedded by shifting the correspondence between each value of the quantization code as the encoded data and a quantization error by an operation amount corresponding to the second data A data processing apparatus comprising: an embedding means for generating
第1のデータを、量子化し、その結果得られる量子化コードと量子化誤差を、符号化データとして出力し、
前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データを生成する
ステップを含むデータ処理方法。 Data processing device
The first data is quantized, and the resulting quantization code and quantization error are output as encoded data,
Embedded encoded data in which the second data is embedded by shifting the correspondence between each value of the quantization code as the encoded data and a quantization error by an operation amount corresponding to the second data A data processing method including generating a step.
前記符号化データとしての量子化コードの各値と量子化誤差との対応関係を、第2のデータに対応する操作量でシフトすることにより、前記第2のデータが埋め込まれた埋め込み符号化データを生成する埋め込み手段と
して、コンピュータを機能させるためのプログラムが記録された記録媒体。 Encoding means for quantizing the first data and outputting the resulting quantization code and quantization error as encoded data;
Embedded encoded data in which the second data is embedded by shifting the correspondence between each value of the quantization code as the encoded data and a quantization error by an operation amount corresponding to the second data A recording medium on which is recorded a program for causing a computer to function as an embedding means for generating an image.
所定のコードブックに応じて、前記仮の符号化データから、仮の復号データを復号する仮復号データ復号手段と、
前記量子化コードと量子化誤差と、前記仮復号データ復号手段により復号された仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かを判定する判定手段と
を備え、
前記仮符号化データ復号手段は、前記判定手段による判定結果に応じて前記操作量を変更して再び仮の符号化データを復号し、
前記判定手段は、前記仮の符号化データが正しいと判定したとき、前記操作量に対応するデータを前記第2のデータとして出力し、前記仮復号データ復号手段からの仮の復号データを真の復号データとして出力する
データ処理装置。 Each value of the quantization code and the quantization error in the embedded encoded data in which the second data is embedded in the encoded data including the quantization code and the quantization error obtained by quantizing the first data Temporary encoded data decoding means for decoding temporary encoded data by shifting the correspondence relationship with a specific operation amount,
Temporary decoded data decoding means for decoding temporary decoded data from the temporary encoded data according to a predetermined code book;
By comparing the quantization code and the quantization error with the quantization error obtained by re-encoding the provisional decoded data decoded by the provisional decoded data decoding unit and the quantization error, Determining means for determining whether or not the encoded data is correct,
The temporary encoded data decoding means changes the manipulated variable according to the determination result by the determination means and decodes the temporary encoded data again,
When the determination means determines that the provisional encoded data is correct, the determination means outputs data corresponding to the manipulated variable as the second data, and the provisional decoded data from the provisional decoded data decoding means is Data processing device that outputs as decrypted data.
請求項4に記載のデータ処理装置。 The data processing apparatus according to claim 4, wherein the first data is image data.
第1のデータを量子化することにより得られる量子化コードと量子化誤差を含む符号化データに第2のデータが埋め込まれた埋め込み符号化データにおける、前記量子化コードの各値と量子化誤差との対応関係を、特定の操作量でシフトすることにより、仮の符号化データを復号する仮符号化データ復号ステップと、
所定のコードブックに応じて、前記仮の符号化データから、仮の復号データを復号する仮復号データ復号ステップと、
前記量子化コードと量子化誤差と、前記仮復号データ復号ステップにより復号された仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かを判定する判定ステップと
を含み、
前記仮符号化データ復号ステップにおいて、前記判定ステップによる判定結果に応じて前記操作量を変更して再び仮の符号化データを復号し、
前記判定ステップにおいて、前記仮の符号化データが正しいと判定したとき、前記操作量に対応するデータを前記第2のデータとして出力し、前記仮復号データ復号ステップで復号した仮の復号データを真の復号データとして出力する
データ処理方法。 Data processing device
Each value of the quantization code and the quantization error in the embedded encoded data in which the second data is embedded in the encoded data including the quantization code and the quantization error obtained by quantizing the first data A temporary encoded data decoding step for decoding the temporary encoded data by shifting the correspondence relationship with a specific operation amount;
Temporary decoded data decoding step for decoding temporary decoded data from the temporary encoded data according to a predetermined codebook;
By comparing the quantization code and the quantization error with the quantization error obtained by re-encoding the temporary decoded data decoded in the temporary decoded data decoding step and the temporary error, A determination step for determining whether or not the encoded data is correct,
In the temporary encoded data decoding step, the operation amount is changed according to the determination result in the determination step and the temporary encoded data is decoded again,
In the determination step, when it is determined that the temporary encoded data is correct, the data corresponding to the manipulated variable is output as the second data, and the temporary decoded data decoded in the temporary decoded data decoding step is true. Data processing method to output as decrypted data.
所定のコードブックに応じて、前記仮の符号化データから、仮の復号データを復号する仮復号データ復号手段と、
前記量子化コードと量子化誤差と、前記仮復号データ復号手段により復号された仮の復号データを再度符号化することにより得られた量子化コードと量子化誤差とを比較することにより、前記仮の符号化データが正しいか否かを判定する判定手段と
を備え、
前記仮符号化データ復号手段は、前記判定手段による判定結果に応じて前記操作量を変更して再び仮の符号化データを復号し、
前記判定手段は、前記仮の符号化データが正しいと判定したとき、前記操作量に対応するデータを前記第2のデータとして出力し、前記仮復号データ復号手段からの仮の復号データを真の復号データとして出力する
データ処理装置として、コンピュータを機能させるためのプログラムが記録された記録媒体。 Each value of the quantization code and the quantization error in the embedded encoded data in which the second data is embedded in the encoded data including the quantization code and the quantization error obtained by quantizing the first data Temporary encoded data decoding means for decoding temporary encoded data by shifting the correspondence relationship with a specific operation amount,
Temporary decoded data decoding means for decoding temporary decoded data from the temporary encoded data according to a predetermined code book;
By comparing the quantization code and the quantization error with the quantization error obtained by re-encoding the provisional decoded data decoded by the provisional decoded data decoding unit and the quantization error, Determining means for determining whether or not the encoded data is correct,
The temporary encoded data decoding means changes the manipulated variable according to the determination result by the determination means and decodes the temporary encoded data again,
When the determination unit determines that the temporary encoded data is correct, the determination unit outputs the data corresponding to the operation amount as the second data, and the temporary decoded data from the temporary decoded data decoding unit is A recording medium on which a program for causing a computer to function as a data processing device to output as decoded data is recorded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008160003A JP4507130B2 (en) | 2008-06-19 | 2008-06-19 | Data processing apparatus, data processing method, and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008160003A JP4507130B2 (en) | 2008-06-19 | 2008-06-19 | Data processing apparatus, data processing method, and recording medium |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000319418A Division JP4214440B2 (en) | 2000-10-19 | 2000-10-19 | Data processing apparatus, data processing method, and recording medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008283701A true JP2008283701A (en) | 2008-11-20 |
JP4507130B2 JP4507130B2 (en) | 2010-07-21 |
Family
ID=40144084
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008160003A Expired - Fee Related JP4507130B2 (en) | 2008-06-19 | 2008-06-19 | Data processing apparatus, data processing method, and recording medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4507130B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11243489A (en) * | 1998-02-26 | 1999-09-07 | Matsushita Electric Ind Co Ltd | Image processing method and image processor thereof |
-
2008
- 2008-06-19 JP JP2008160003A patent/JP4507130B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11243489A (en) * | 1998-02-26 | 1999-09-07 | Matsushita Electric Ind Co Ltd | Image processing method and image processor thereof |
Also Published As
Publication number | Publication date |
---|---|
JP4507130B2 (en) | 2010-07-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4214440B2 (en) | Data processing apparatus, data processing method, and recording medium | |
KR100552666B1 (en) | Encoding/decoding apparatus for coordinate interpolator, and recordable medium containing coordinate interpolator encoded bit stream | |
JP5258664B2 (en) | Image coding apparatus, method and program, and image decoding apparatus, method and program | |
US7738711B2 (en) | Coding apparatus and method, decoding apparatus and method, data processing system, storage medium, and signal | |
JP2000059743A (en) | Image processing unit, and image processing method and serving medium thereof | |
JP2002325170A (en) | Image processing unit and its method, and program code, storage medium | |
JP4768728B2 (en) | Method and apparatus for encoding a block of values | |
JP2000184181A (en) | Encoder, encoding method, decoder, decoding method, recording medium and data processor | |
JP4556087B2 (en) | DATA PROCESSING DEVICE, DATA PROCESSING METHOD, PROGRAM, AND PROGRAM RECORDING MEDIUM | |
JP2000232365A (en) | Encoding device, encoding method, decoding device, decoding method, recording medium and data processor | |
JP4254003B2 (en) | Embedding device and embedding method, decoding device and decoding method, and recording medium | |
JP4507130B2 (en) | Data processing apparatus, data processing method, and recording medium | |
JP4556147B2 (en) | Decoding device, decoding method, recording medium, and data processing device | |
JP2007028658A (en) | Data processing apparatus, data processing method, and program | |
JP2006074338A (en) | Data concealing device, concealed data extraction device, data concealing method, concealed data extraction method, and program for them | |
JP2002077585A (en) | Apparatus and method for processing data as well as recording medium | |
JP2003248838A (en) | Method and device for encoding and decoding key value data of coordinate interpolator | |
Kraichingrith | HIGH CAPACITY IMAGE STEGANOGRAPHY TOLERATING IMAGE COMPRESSION | |
JP2000101827A (en) | Digital video coding device and decoding device using watermarking and its method | |
JP2006121460A (en) | Method for embedding electronic watermark and method for extracting the same | |
JP4548434B2 (en) | Data processing apparatus, data processing method, and recording medium | |
JP2003125194A (en) | Data processing apparatus, data processing method, program and recording medium | |
JP2005057454A (en) | Verification device | |
JP2001285650A (en) | Data processing apparatus, data processing method, and recording medium | |
JP2006166075A (en) | Image encoder and image encoding program, and image decoder and image decoding program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100114 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100304 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100408 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100421 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130514 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130514 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |