JP2007221388A - Data inserting device and method, and image compressing coding device and method - Google Patents
Data inserting device and method, and image compressing coding device and method Download PDFInfo
- Publication number
- JP2007221388A JP2007221388A JP2006038631A JP2006038631A JP2007221388A JP 2007221388 A JP2007221388 A JP 2007221388A JP 2006038631 A JP2006038631 A JP 2006038631A JP 2006038631 A JP2006038631 A JP 2006038631A JP 2007221388 A JP2007221388 A JP 2007221388A
- Authority
- JP
- Japan
- Prior art keywords
- value
- quantization
- data
- eob
- dct
- 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.)
- Pending
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 technique of embedding arbitrary data in compression-encoded still image data or moving image data.
画像データ圧縮の分野において、種々の圧縮アルゴリズムが提案されている。例えば、JPEG圧縮の場合、オリジナル画像データを離散コサイン変換(DCT)し、ビット配分を決定して量子化を行う。ベースライン方式の場合、量子化データをハフマン符号化により符号化して符号化データを得る。 Various compression algorithms have been proposed in the field of image data compression. For example, in the case of JPEG compression, the original image data is subjected to discrete cosine transform (DCT), bit allocation is determined, and quantization is performed. In the case of the baseline method, the quantized data is encoded by Huffman encoding to obtain encoded data.
この圧縮符号化された画像データに対して任意のデータを付加する技術として、ステガノグラフィ(Steganography)がある。ステガノグラフィは、付加情報(メッセージや画像など)を画像等に対して直接、重畳する処理を実行するものであり、例えば、画像情報の各画素の値を示すビット情報の最下位ビットにデータを入れたり(特許文献1)、あるいはマクロブロックの量子化されたY成分のDCT係数を変更したり(非特許文献1)、あるいは量子化されたDCT係数の和をある値で割った余りで埋め込みデータを表す(非特許文献2)など、様々な態様のものがある。 As a technique for adding arbitrary data to the compression-encoded image data, there is steganography. Steganography is a process that directly superimposes additional information (messages, images, etc.) on images, etc. For example, data is inserted into the least significant bit of bit information indicating the value of each pixel of image information. (Patent Document 1), or changing the DCT coefficient of the quantized Y component of the macroblock (Non-Patent Document 1), or embedding data by the remainder obtained by dividing the sum of the quantized DCT coefficients by a certain value (Non-Patent Document 2) representing various aspects.
なお、ステガノグラフィに類似する情報埋め込み技術として、電子透かし(Watermark)がある。例えば、DCT係数ブロック群の中から電子透かしを埋め込むDCT係数ブロック(埋込ブロック)を一つ以上選択し、選択された埋込ブロックそれぞれに対して、電子透かしを構成する一つのビットを埋め込む(特許文献2)。ただしこの技術は、画像自体の情報付加や著作権管理に使われ、電子透かしとして埋め込まれるデータの量が少なく、データ改変などに対して耐性が要求される。また、埋め込まれたデータの抽出が100%可能とは限らず、これらの点でステガノグラフィと異なる。 As an information embedding technique similar to steganography, there is a digital watermark. For example, one or more DCT coefficient blocks (embedded blocks) for embedding a digital watermark are selected from the DCT coefficient block group, and one bit constituting the digital watermark is embedded in each selected embedded block ( Patent Document 2). However, this technique is used for information addition and copyright management of the image itself, and the amount of data embedded as a digital watermark is small, and resistance to data modification is required. Also, extraction of embedded data is not necessarily 100% possible, and differs from steganography in these respects.
また、データの埋め込みにより画質劣化が生じることがあるが、これを防止する技術としては、例えば、画像を埋め込む場所をDCT係数の最高周波数の位置にするものがある(特許文献3、非特許文献3)。
特許文献1、非特許文献1および特許文献2の技術では、1マクロブロックにつき1ビットしかデータを埋め込むことができず、埋め込めるデータ量が限られてしまう。非特許文献2の技術でも、埋め込めるデータ量が限られる。また、特許文献3および非特許文献3のようにすると、EOB(End of Block)符号が消滅するため、符号化効率が低下し、JPEGファイルが非常に大きくなる。
In the techniques of
本発明は、画像データへの任意データの埋め込みに際して、画質劣化の防止、画像データへ埋め込むデータ量の増大化、ファイルの長大化防止を目的とする。 An object of the present invention is to prevent image quality deterioration, increase the amount of data to be embedded in image data, and prevent an increase in file length when embedding arbitrary data in image data.
本発明に係るデータ挿入装置は、画像データを分割して得られた複数のブロック毎に算出されたDCT(離散コサイン変換)係数を入力するDCT係数入力部と、DCT係数入力部に入力されたDCT係数の内、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更するデータ挿入部と、を備える。 A data insertion device according to the present invention inputs a DCT coefficient input unit that inputs DCT (discrete cosine transform) coefficients calculated for each of a plurality of blocks obtained by dividing image data, and is input to the DCT coefficient input unit. Of the DCT coefficients, the DCT coefficients from the start position, which is a predetermined low frequency side coefficient position at which data insertion is started, to the end position, which is a low frequency side coefficient position by one coefficient position from EOB (End of Block). Each of the least significant 1 bits of the quantized representative value, which is a value obtained by rounding the division result value obtained by dividing each by the corresponding quantization width, is changed to a bit constituting arbitrary data to be inserted, and A data insertion unit that changes the quantization representative value of the DCT coefficient of the EOB to a value closer to the division result value of the DCT coefficient of the EOB of −1 or 1.
この発明によると、画像データを分割することで得られたブロックごとに算出された各DCT係数の最下位1ビットを任意のデータのビットに変更することで、画像データを埋め込む。従来技術のように、各ブロックに1ビットのデータを挿入するのではなく、各DCT係数に1ビットずつデータを挿入できるから、画像データに挿入できるデータ量が格段に増加する。 According to the present invention, the image data is embedded by changing the least significant 1 bit of each DCT coefficient calculated for each block obtained by dividing the image data to a bit of arbitrary data. Instead of inserting 1-bit data into each block as in the prior art, it is possible to insert 1-bit data into each DCT coefficient, which greatly increases the amount of data that can be inserted into image data.
また、後述するように、データを挿入する可能性のある範囲のDCT係数の量子化幅を、データを挿入することを想定しない通常の量子化幅より1/2以下の小さい値に設定すれば、各DCT係数の変位は高々1ビットであるから、画質に与える影響が少ない。 In addition, as will be described later, if the quantization width of the DCT coefficient in the range where data is likely to be inserted is set to a value smaller than 1/2 of a normal quantization width where no data is assumed to be inserted, Since the displacement of each DCT coefficient is 1 bit at most, the influence on the image quality is small.
しかも、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更するから、挿入ビット「0」とEOB以下の量子化代表値0の列とを区別できる。 In addition, since the quantization representative value of the EOB DCT coefficient is changed to a value closer to the division result value of the EOB DCT coefficient of −1 or 1, the quantization representative of the insertion bit “0” and the EOB or less is represented. A column with a value of 0 can be distinguished.
なお、本来のEOBの量子化代表値が終了マーカーに変更されることで、新たなEOBは本来のEOBよりも1係数位置分高周波数側に繰り上がるが、従来技術のようにEOB自体が消滅してしまうのではなく、たかだか1係数位置分ずれるだけであるため、ゼロランレングスの減少による符号化効率の低下、符号量の増加は大きくない。 The original EOB quantized representative value is changed to the end marker, so that the new EOB is moved up by one coefficient position from the original EOB, but the EOB itself disappears as in the prior art. However, since it is only shifted by one coefficient position, the decrease in coding efficiency and the increase in code amount due to the decrease in zero run length are not large.
データ挿入部は、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数に対応する量子化幅の1/2以下の所定値でEOBのDCT係数を除算した値と近い方の値に変更することが好ましい。 The data insertion unit is a value obtained by dividing the quantization representative value of the EOB DCT coefficient by −1 or 1 by a predetermined value equal to or less than ½ of the quantization width corresponding to the EOB DCT coefficient. It is preferable to change to a value closer to.
こうすれば、量子化代表値を非零のデータ終了マーカーに変更することによる誤差の雑音電力は、EOBのDCT係数の量子化誤差の雑音電力と同じかそれ未満となる。 By doing this, the noise power of the error due to changing the quantization representative value to a non-zero data end marker is equal to or less than the noise power of the quantization error of the DCT coefficient of the EOB.
本発明は、画像データを複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するDCT変換部と、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定する量子化部と、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化する符号化部とを備える画像圧縮符号化装置に関する。 In the present invention, image data is divided into a plurality of blocks, and a DCT transform unit that calculates DCT (discrete cosine transform) coefficients for each block, and a DCT coefficient of each block is divided by a corresponding quantization width A quantization unit that determines a quantization representative value of each DCT coefficient by rounding a division result value that is a value, a quantization data table that stores the quantization representative value of each DCT coefficient, and creates a quantization data table. The present invention relates to an image compression encoding apparatus including an encoding unit for encoding.
ここで、量子化部は、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更する。 Here, the quantization unit starts from a start position that is a predetermined low frequency side coefficient position where data insertion is started to an end position that is a coefficient position that is one coefficient position lower than EOB (End of Block). Change each of the least significant 1 bit of the quantized representative value, which is a value obtained by rounding the division result value obtained by dividing each DCT coefficient by the corresponding quantization width, to a bit constituting arbitrary data to be inserted. In addition, the quantization representative value of the DCT coefficient of EOB is changed to a value closer to the division result value of DCT coefficient of EOB, which is −1 or 1.
本発明に係るデータ挿入方法は、画像データを分割して得られた複数のブロック毎に算出されたDCT(離散コサイン変換)係数を入力するステップと、DCT係数入力部に入力されたDCT係数の内、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更するステップと、を含む。 The data insertion method according to the present invention includes a step of inputting a DCT (discrete cosine transform) coefficient calculated for each of a plurality of blocks obtained by dividing image data, and a step of inputting a DCT coefficient input to a DCT coefficient input unit. Among them, each DCT coefficient from the start position which is a predetermined low frequency side coefficient position where data insertion starts to the end position which is a low frequency side coefficient position by one coefficient position from EOB (End of Block) is supported. The least significant 1 bit of the quantized representative value that is a value obtained by rounding the division result value that is a value divided by the quantization width to be changed is changed to a bit that constitutes arbitrary data to be inserted, and the DCT of the EOB Changing the coefficient representative quantization value to a value closer to the division result value of the DCT coefficient of EOB among −1 or 1.
本発明に係る画像圧縮符号化方法は、画像データを複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するステップと、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定するステップと、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、EOBのDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更するステップと、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化するステップと、を含む。 An image compression encoding method according to the present invention performs block formation by dividing image data into a plurality of blocks, calculates DCT (discrete cosine transform) coefficients for each block, and a quantum corresponding to the DCT coefficients of each block. Rounding a division result value, which is a value divided by the quantization width, and determining a quantized representative value of each DCT coefficient, and starting from a start position that is a predetermined low frequency side coefficient position at which data insertion is started, EOB (End Quantization representative value that is a value obtained by rounding a division result value that is a value obtained by dividing each of the DCT coefficients up to the end position that is a coefficient position on the lower frequency side by one coefficient position than of the block). Each of the least significant 1 bits is changed to a bit constituting arbitrary data to be inserted, and the quantization representative value of the DCT coefficient of EOB is set to −1 or 1, which is the DCT coefficient of EOB. A step of changing to a value closer to the division result value of the number, and a step of creating a quantized data table storing the quantized representative value of each DCT coefficient and encoding the quantized data table.
本発明によると、EOB(End of Block)のDCT係数の量子化代表値を、−1または1のうち、EOBのDCT係数の除算結果値と近い方の値に変更するから、挿入ビット「0」とEOB以下の量子化代表値0の列とを区別できる。 According to the present invention, the quantization representative value of the DCT coefficient of EOB (End of Block) is changed to a value closer to the division result value of the DCT coefficient of EOB of −1 or 1, so that the insertion bit “0” ”And a column of quantization representative value 0 below EOB can be distinguished.
以下、添付した図面を参照し本発明の好ましい実施の形態を説明する。 Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
<第1実施形態>
図1は本発明の好ましい第1の実施形態に係る画像圧縮符号化装置のブロック図である。詳細は省略するが、本実施形態で述べる画像圧縮符号化装置の各ブロックはプログラム制御によっても実現可能である。
<First Embodiment>
FIG. 1 is a block diagram of an image compression coding apparatus according to the first preferred embodiment of the present invention. Although details are omitted, each block of the image compression encoding apparatus described in the present embodiment can also be realized by program control.
画像データ作成部11は、デジタルスチルカメラに内蔵されたアナログフロントエンドなどの画像信号出力部10から出力された画像信号のガンマ補正、画素補間法による欠陥画素の補間、ホワイトバランスの補正、画像信号の鮮鋭化、手振れによる影響の補正、CMYGの色空間からRGBの色空間への色空間変換等の処理を行って被写体像を表すRGBの各色毎のデータを生成し、3×3行列による線形変換により輝度を表す輝度信号(Y)、「青み」成分を表す色差信号(U)及び「赤み」成分を表す色差信号(V)のYUVの色空間に変換して画像データを出力する。
The image
YUVの色空間への変換には例えば、Y=0.2990R+0.5870G+0.1140B U=−0.1687R−0.3313G+0.5000B+128 V=0.5000R−0.4187G−0.0813B+128という変換式を用いることができる。 For example, Y = 0.2990R + 0.5870G + 0.1140B U = −0.1687R−0.3313G + 0.5000B + 128 V = 0.5000R−0.4187G−0.0813B + 128 is used for conversion to the color space of YUV. be able to.
なお、白黒画像はU=V=0として考えればよく、本発明はカラー画像、白黒画像の両方に適用できる。 A black and white image may be considered as U = V = 0, and the present invention can be applied to both a color image and a black and white image.
DCT処理部12は、画像データ作成部11から出力された画像データを8×8要素からなる複数のブロック(ここでは説明の便宜上64個のブロックとする)に分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)を行う。DCT処理部12は、DCT係数を格納した8×8のテーブル形式のDCT係数テーブルをブロック毎に作成し、量子化部13に出力する。
The
量子化部13は、DCT処理部12から出力されたブロック毎のDCT係数テーブルの各DCT係数を、量子化表の対応する区間幅(量子化幅あるいは量子化ステップと呼ばれる)で割り、その値の少数以下の桁を丸めることで、各DCT係数を量子化する。
The
量子化代表値Qは、例えば、x:量子化前のDCT係数の値、Δ:量子化幅、g:四捨五入・切捨て・切り上げなどの丸め演算をおこなう関数とすると、 The quantized representative value Q is, for example, x: a value of a DCT coefficient before quantization, Δ: a quantization width, g: a function that performs rounding operations such as rounding, rounding down, and rounding up.
で表される。ミッドトレッド型の線形量子化では、gは四捨五入の丸め処理を行う関数である。JPEGなどでは、 It is represented by In the mid-tread linear quantization, g is a function that performs rounding processing. In JPEG etc.
とΔを別々に符号化している。本明細書では説明の便宜上、数2で求まる値、すなわちDCT係数を量子化した値を量子化代表値と呼ぶ。
And Δ are encoded separately. In the present specification, for convenience of explanation, a value obtained by
DCT処理部12は、このようにして決定されたDCT係数の量子化代表値を格納した8×8のテーブル形式の量子化データテーブルをブロック毎に作成し、エントロピー符号化部14に出力する。
The
エントロピー符号化部14は、量子化部13から出力されたブロック毎の量子化データテーブルをハフマン符号表などを用いてエントロピー符号化し、ビットストリームを出力する。この際、最高周波数の係数位置まで連続するゼロの量子化代表値の列の長さ(ゼロランレングス)を考慮した符号化を行なうことにより、ビット数が効果的に低減される。
The
符号化データにはEOB(エンドオブブロック)のコードが付加される。ここで、EOBとは、ブロック内の後続の量子化代表値は全てゼロであるという意味のコードである。 An EOB (end of block) code is added to the encoded data. Here, EOB is a code meaning that all subsequent quantized representative values in the block are zero.
DCTを行って得られるDCT係数テーブルにおいては、左上に画質の劣化が顕在化しやすい低い空間周波数のDCT係数が配置され、右下に向かうほど画質の劣化が顕在化しにくい高い空間周波数のDCT係数が配置される。 In the DCT coefficient table obtained by performing DCT, a low spatial frequency DCT coefficient in which deterioration of image quality is likely to be manifested is arranged in the upper left, and a high spatial frequency DCT coefficient in which degradation of image quality is less likely to be apparent toward the lower right. Be placed.
図2は、量子化データテーブルに格納されている量子化代表値をエントロピー符号化する順序及びエントロピー復号化された量子化代表値を量子化データテーブルに格納する順序を表す図である。図示するように、量子化代表値を左上から右下に向かってジグザグの順序でエントロピー符号化又は格納することから、この順序を一般にジグザグ順序あるいはジグザグシーケンスという。従って、例えばこのジグザグ順序の順にエントロピー復号化を行うと、低い空間周波数のDCT係数を表す量子化代表値ほど先に復元される。ゼロの量子化代表値の列の先頭には、EOBが付加されている。 FIG. 2 is a diagram illustrating the order in which the quantized representative values stored in the quantized data table are entropy-encoded and the order in which the entropy-decoded quantized representative values are stored in the quantized data table. As shown in the drawing, the quantized representative values are entropy-encoded or stored in the zigzag order from the upper left to the lower right, and this order is generally called a zigzag order or zigzag sequence. Therefore, for example, when entropy decoding is performed in the order of the zigzag order, the quantized representative value representing the DCT coefficient having a lower spatial frequency is restored earlier. EOB is added to the head of the column of zero quantized representative values.
以下、データを挿入しない場合にY成分の画像データのDCT係数D(m)を割る通常の区間幅を第1の量子化ステップQ1(m)で表し、データを挿入する場合にY成分の画像データのDCT係数D(m)を割る区間幅を第2の量子化ステップQ2(m)で表す(mはジグザグ順序を示す添え字であり、0≦m≦63)。また、第1の量子化ステップQ1(m)による量子化によって定まったEOBを本来のEOBと呼び、本来のEOBの量子化代表値のジグザグスキャンの順番をX(0≦X≦63)とする。また、第1の量子化ステップQ1(m)によるDCT係数D(m)の量子化で求められた量子化代表値をR1(m)で表す。また、第2の量子化ステップQ2(m)によるDCT係数D(m)の量子化で求められた量子化代表値をR2(m)で表す。 Hereinafter, the normal interval width for dividing the DCT coefficient D (m) of the Y component image data when no data is inserted is represented by the first quantization step Q1 (m), and when the data is inserted, the Y component image is displayed. A section width for dividing the DCT coefficient D (m) of the data is represented by a second quantization step Q2 (m) (m is a subscript indicating a zigzag order, and 0 ≦ m ≦ 63). Also, the EOB determined by the quantization in the first quantization step Q1 (m) is called an original EOB, and the order of the zigzag scan of the original EOB quantization representative value is X (0 ≦ X ≦ 63). . Further, the representative quantization value obtained by the quantization of the DCT coefficient D (m) in the first quantization step Q1 (m) is represented by R1 (m). Further, the representative quantization value obtained by the quantization of the DCT coefficient D (m) in the second quantization step Q2 (m) is represented by R2 (m).
また、第2の量子化ステップQ2(m)による量子化によって定まり、かつ本来のEOBの位置よりも1つ分高周波数側のEOBを新たなEOBと呼び、新たなEOBの量子化代表値のジグザグスキャンの順番をW(0≦W≦63)とする。 Also, an EOB that is determined by quantization in the second quantization step Q2 (m) and is one frequency higher than the original EOB position is called a new EOB, and a new EOB quantization representative value is obtained. The order of zigzag scanning is W (0 ≦ W ≦ 63).
データ挿入部15は、挿入したい任意のデータのビット列の埋め込みを開始するY成分画像データの量子化代表値R2(Z)からビット列の埋め込みを終了する量子化代表値R2(Y)までの各々の最下位1ビットに、データのビット列の先頭から順に1ビットずつ埋め込む(0≦Z≦m≦Y≦X≦63)。
The
具体的には、データ挿入部15は、DCT係数D(m)に対応する量子化ステップQ1(m)と量子化代表値R1(m)を破棄した上、DCT係数D(m)に対応する量子化ステップをQ2(m)に設定し、除算結果値D(m)/Q2(m)の丸め演算結果値の偶奇性(パリティ)が埋め込むデータビットの値(0または1)と対応するように除算結果値D(m)/Q2(m)の丸め方向を設定し、設定した丸め方向に除算結果値D(m)/Q2(m)を丸めた値を、DCT係数D(m)の量子化代表値R2(m)にすることで、各量子化代表値R2(m)にビットの挿入を行う。
Specifically, the
詳細は省略するが、U・V成分にも、Y成分と同様にしてデータ埋め込みができるのはいうまでもない。 Although details are omitted, it goes without saying that data can be embedded in the U / V component in the same manner as the Y component.
以下では説明の簡略のため、あるブロックのある1つの量子化代表値R2(m)についてのデータ挿入について説明するが、複数ブロックのそれぞれの量子化代表値R2(m)について、同様にデータ挿入ができる。 In the following, for the sake of simplicity, data insertion for one quantized representative value R2 (m) of a block will be described, but data insertion is similarly performed for each quantized representative value R2 (m) of a plurality of blocks. Can do.
本明細書ではデータ挿入を開始するZ番目の係数位置は固定(すなわちZは所定の値)であるものとするが、無論、様々なパラメータに応じて可変にしてもよい。データ挿入を終了するY番目の係数位置は、本来のEOBの1つ前の係数位置(Y=X-1)であることが好ましく、本来のEOBの位置に依存して変化する。これは、本来のEOB以降にビットを挿入することで、ゼロランレングスが短くなり、符号化効率が低下するのを防止するためである。本来のEOBの位置がデータ埋め込み開始位置(ジグザグスキャン順序がZ番目の係数位置)よりも低周波数側であれば、データ挿入は行わない。 In the present specification, the Z-th coefficient position at which data insertion is started is assumed to be fixed (that is, Z is a predetermined value), but may be variable according to various parameters. The Y-th coefficient position at which data insertion is completed is preferably the coefficient position immediately before the original EOB (Y = X−1), and changes depending on the original EOB position. This is to prevent the zero run length from being shortened and the encoding efficiency from being lowered by inserting bits after the original EOB. If the original EOB position is on the lower frequency side than the data embedding start position (zigzag scan order Z-th coefficient position), data insertion is not performed.
従来例では、1マクロブロックにつき1ビットしかデータ挿入できないが、本実施形態では、1マクロブロックの各量子化代表値R2(m)(0≦Z≦m≦Y≦63)に1ビットずつデータを挿入することができるから、従来例よりも挿入できるデータ量が格段に増加する。 In the conventional example, only one bit of data can be inserted per macroblock. However, in this embodiment, one bit of data is assigned to each quantized representative value R2 (m) (0 ≦ Z ≦ m ≦ Y ≦ 63) of one macroblock. Therefore, the amount of data that can be inserted is significantly increased as compared with the conventional example.
図3は、データ挿入部15によるビット挿入の一例を示す。この図では、説明の便宜上、第2の量子化ステップQ2(m)は第1の量子化ステップQ1(m)と同じく1であり(Q1(m)=Q2(m)=1)、かつ除算結果値D(m)/Q2(m)は-0.5〜0.5の範囲内であるとする。
FIG. 3 shows an example of bit insertion by the
データ挿入部15は、挿入すべきビット値が「0」、除算結果値D(m)/Q2(m)が-0.5<D(m)/Q2(m)≦0であるとすると、丸め方向を+∞側に設定し、量子化代表値を、R1(m)から、除算結果値D(m)/Q2(m)の最近傍の偶数R2(m)=0に変更する。また、挿入すべきビット値が「0」、除算結果値が0≦D(m)/Q2(m)<0.5であるとすると、丸め方向を-∞側に設定し、量子化代表値を、R1(m)から、を除算結果値D(m)/Q2(m)の最近傍の偶数R2(m)=0に変更する。これらの丸め演算はいわゆる四捨五入に相当し、量子化代表値をR1(m)からR2(m)に変更した際に生じる誤差は、第1の量子化ステップQ1(m)の半分(=0.5)未満であり、第1の量子化ステップQ1(m)による量子化の際の丸め誤差(除算結果値D(m)/Q1(m)の四捨五入による丸め誤差)と変わらない。
The
一方、挿入すべきビット値が「1」、除算結果値D(m)/Q2(m)が-0.5<D(m)/Q2(m)≦0であるとすると、丸め方向を-∞側に設定し、量子化代表値を、R1(m)から、除算結果値D(m)/Q2(m)の最近傍の奇数R2(m)=-1に変更する。また、挿入すべきビット値が「1」、除算結果値が0≦D(m)/Q2(m)<0.5であるとすると、丸め方向を+∞側に設定し、量子化代表値を、R1(m)から、除算結果値D(m)/Q2(m)の最近傍の奇数R2(m)=1に変更する。これらの丸め演算はいわゆる切り下げ、切り上げに相当し、量子化代表値をR1(m)からR2(m)に変更した際に生じる誤差は、第1の量子化ステップQ1(m)(=1)未満となり、第1の量子化ステップQ1(m)による量子化の際の丸め誤差(除算結果値D(m)/Q1(m)の四捨五入による丸め誤差)の倍となる。 On the other hand, if the bit value to be inserted is “1” and the division result value D (m) / Q2 (m) is −0.5 <D (m) / Q2 (m) ≦ 0, the rounding direction is set to −∞. And the quantization representative value is changed from R1 (m) to the nearest odd number R2 (m) = − 1 of the division result value D (m) / Q2 (m). Also, if the bit value to be inserted is “1” and the division result value is 0 ≦ D (m) / Q2 (m) <0.5, the rounding direction is set to + ∞, and the quantization representative value is From R1 (m), the odd number R2 (m) = 1 nearest to the division result value D (m) / Q2 (m) is changed. These rounding operations correspond to so-called rounding down and rounding up, and the error that occurs when the quantization representative value is changed from R1 (m) to R2 (m) is the first quantization step Q1 (m) (= 1). It becomes twice the rounding error (rounding error due to rounding of the division result value D (m) / Q1 (m)) at the time of quantization in the first quantization step Q1 (m).
このように、量子化代表値R2(m)に挿入するデータビットが0であれば量子化代表値R1(m)は除算結果値D(m)/Q2(m)の最近傍の偶数R2(m)に変更され、挿入するデータビットが1であれば量子化代表値R1(m)は除算結果値D(m)/Q2(m)の最近傍の奇数R2(m)に変更される。復号側では、量子化代表値R2(m)が偶数(すなわち最下位ビットが0)であればデータビット0が挿入されており、量子化代表値R2(m)が奇数(すなわち最下位ビットが1)であればデータビット0が挿入されていることを識別できる。 As described above, if the data bit to be inserted into the quantized representative value R2 (m) is 0, the quantized representative value R1 (m) is an even number R2 () nearest to the division result value D (m) / Q2 (m). If the data bit to be inserted is 1, the quantized representative value R1 (m) is changed to the nearest odd number R2 (m) of the division result value D (m) / Q2 (m). On the decoding side, if the quantized representative value R2 (m) is an even number (that is, the least significant bit is 0), data bit 0 is inserted, and the quantized representative value R2 (m) is an odd number (that is, the least significant bit is If 1), it can be identified that data bit 0 is inserted.
ところで、Q1(m)=Q2(m)とすると、R1(m)からR2(m)への量子化代表値への変更にともなう量子化誤差は、第1の量子化ステップQ1(m)による量子化の際に生じる誤差(量子化誤差)よりも大きくなり、画質劣化の原因となりうる。 By the way, when Q1 (m) = Q2 (m), the quantization error due to the change from R1 (m) to R2 (m) to the quantization representative value is due to the first quantization step Q1 (m). It becomes larger than an error (quantization error) that occurs during quantization, and may cause image quality degradation.
そこで本実施形態ではさらに、データ埋め込みによる量子化代表値の変更にともなう画質劣化を、第1の量子化ステップQ1(m)による量子化の量子化誤差の範囲内に収めるため、第2の量子化ステップQ2(m)を、第1の量子化ステップQ1(m)の1/2以下とする。 Therefore, in this embodiment, the second quantum is further reduced in order to keep the image quality degradation accompanying the change of the quantization representative value due to the data embedding within the quantization error of the quantization by the first quantization step Q1 (m). The quantization step Q2 (m) is set to 1/2 or less of the first quantization step Q1 (m).
すなわち、 That is,
を満足するよう第2の量子化ステップQ2(m)を予め設定しておく。 The second quantization step Q2 (m) is set in advance so as to satisfy
こうすると、第2の量子化ステップQ2(m)による量子化の量子化誤差は、第1の量子化ステップQ1(m)による量子化の量子化誤差と同一か、あるいはそれ未満となり、データビット挿入による画像劣化を発生しにくくすることができる。 Then, the quantization error of the quantization by the second quantization step Q2 (m) is equal to or less than the quantization error of the quantization by the first quantization step Q1 (m), and the data bit Image deterioration due to insertion can be made difficult to occur.
人間の知覚特性を表すCSF(Contrast Sensitivity Function)を元に決定された、最良のQ2(m)の値は、 The best Q2 (m) value determined based on the CSF (Contrast Sensitivity Function) representing human perception characteristics is
である。このQ2(m)の求め方は、後述の実施例で説明する。 It is. A method of obtaining this Q2 (m) will be described in an example described later.
ただし、数3や数4のように、量子化ステップQ2(m)がQ1(m)よりも小さい値だと、高周波数側における変更後の量子化代表値R2(m)が0でない値となる確率が高まり、第1の量子化ステップQ1(m)による量子化に比して新たなEOBまででゼロランレングスが発生する確率が落ちたり、ゼロランレングスが短くなる。このため、符号化の効率が低下してJPEGファイルが長大化する。
However, if the quantization step Q2 (m) is a value smaller than Q1 (m) as in
このため、本実施形態では、第2の量子化ステップQ2(m)を、低周波数側から高周波数側にかけてジグザグ順に順次増大させるようにする。 For this reason, in the present embodiment, the second quantization step Q2 (m) is sequentially increased in a zigzag order from the low frequency side to the high frequency side.
一例として、量子化ステップQ2(m)を、 As an example, quantization step Q2 (m)
とし、Q1(m)を小さくする分母を71/2から2へ順次変化させる。あるいは、 And the denominator for decreasing Q1 (m) is sequentially changed from 71/2 to 2. Or
とし、mがZとkとの間はQ1(m)を小さくする分母を71/2から1へ順次変化させ、mがk+1とYとの間はQ1(m)を小さくする分母を1(すなわちQ2(m)はQ1(m)と同じ値)にしてもよい。 When m is between Z and k, the denominator for decreasing Q1 (m) is sequentially changed from 71/2 to 1, and when m is between k + 1 and Y, the denominator for decreasing Q1 (m). May be set to 1 (that is, Q2 (m) is the same value as Q1 (m)).
元々、低周波数側から高周波数側の係数位置にかけて、徐々に0の量子化代表値が発生する確率が高くなるよう第1の量子化ステップQ1(m)は設定されている。これに関連させて、第1の量子化ステップQ1(m)に数5〜7のような「mの単調増加関数」を乗じた値を第2の量子化ステップQ2(m)とし、Q2(m)の値をジグザグ順に増大させる。こうすると、第2の量子化ステップQ2(m)による量子化により高周波数側での量子化代表値R2(m)が量子化代表値R1(m)に比して0以外の値となる確率が低くなり、データ挿入にともなってゼロランレングスが短くなりJPEGファイルが長大化するのを可及的に防げる。
Originally, the first quantization step Q1 (m) is set so that the probability that a quantized representative value of 0 is gradually generated increases from the low frequency side to the high frequency side coefficient position. In this connection, a value obtained by multiplying the first quantization step Q1 (m) by the “monotonically increasing function of m” as shown in
さて、上述のように、量子化代表値R2(m)が偶数であれば、その最下位ビットは0である。復号側からすると、新たなEOBの量子化代表値「0」と最も高い周波数側の係数位置の挿入ビット「0」との区別がつかなければならない。 As described above, if the quantized representative value R2 (m) is an even number, the least significant bit is 0. From the decoding side, a new EOB quantization representative value “0” must be distinguished from the insertion bit “0” of the highest frequency side coefficient position.
このため、本来のEOBのDCT係数D(X)の除算結果値D(X)/Q1(X)の量子化代表値R1(X)を、データ終了マーカーとして、−1または1のうち除算結果値D(X)/Q1(X)に最も近い方の値R2(X)に変更する。データ終了マーカーは、新たなEOBよりも1つ分低周波数側の係数位置にあるから、復号側は、低周波数側から順次DCT係数を復号化する際にデータ終了マーカーを検出することで、挿入ビット「0」とEOB(End of Block)以下のゼロ量子化代表値列とを区別できる。 Therefore, the division result of −1 or 1 is used with the quantization representative value R1 (X) of the division result value D (X) / Q1 (X) of the original EOB DCT coefficient D (X) as the data end marker. Change to the value R2 (X) closest to the value D (X) / Q1 (X). Since the data end marker is at a coefficient position one frequency lower than the new EOB, the decoding side inserts the data end marker by detecting the data end marker when sequentially decoding the DCT coefficient from the low frequency side. It is possible to distinguish between the bit “0” and the zero quantized representative value sequence below EOB (End of Block).
なお、本来のEOBの量子化代表値が終了マーカーに変更されることで、新たなEOBは本来のEOBよりも1つ分高周波数側の係数位置に繰り上がるが、従来技術のようにEOB自体が消滅してしまうのではなく、たかだか1係数位置ずれるだけであるため、ゼロランレングスの減少による符号化効率の低下、符号量の増加は大きくない。 The original EOB quantized representative value is changed to the end marker, so that the new EOB is moved up to the coefficient position one frequency higher than the original EOB, but the EOB itself as in the prior art. Is not eliminated, but is only shifted by one coefficient, so that the decrease in coding efficiency and the increase in code amount due to the decrease in zero run length are not large.
また、本来のEOBの量子化代表値が0から−1または1に変わることで、画質が劣化することも考えられる。このため、Q2(X)<Q1(X)を本来のEOBのDCT係数D(X)の量子化ステップに変更し、量子化代表値R1(X)を、−1または1のうち除算結果値D(X)/Q2(X)に最も近い方の値R2(X)に変更すれば、その分、本来のEOBを終了マーカーに変更することによる誤差が小さくなり、画質への影響も小さくなる。 It is also conceivable that the original EOB quantization representative value is changed from 0 to -1 or 1 to deteriorate the image quality. Therefore, Q2 (X) <Q1 (X) is changed to the original EOB DCT coefficient D (X) quantization step, and the quantized representative value R1 (X) is a division result value of -1 or 1. If you change to the value R2 (X) that is closest to D (X) / Q2 (X), the error due to changing the original EOB to the end marker will be reduced accordingly, and the effect on image quality will also be reduced. .
これは、復号側において終了マーカーから本来のEOBのDCT係数が、
データ終了マーカー×Q2(X)
によって逆量子化されるが、Q2(X)が小さければ小さいほど、本来のEOBのDCT係数=0に近づくからである。
This is because the DCT coefficient of the original EOB from the end marker on the decoding side is
Data end marker x Q2 (X)
This is because the smaller the Q2 (X), the closer to the original EOB DCT coefficient = 0.
特に、Q2(X)≦Q1(X)/2とすれば、量子化代表値R1(X)をデータ終了マーカーに変更することによる誤差は、第1の量子化ステップQ1(X)による量子化の量子化誤差と同じかそれ未満となる。 In particular, if Q2 (X) ≦ Q1 (X) / 2, the error caused by changing the quantized representative value R1 (X) to the data end marker is quantized by the first quantization step Q1 (X). The same or less than the quantization error of.
1.基本アルゴリズム
まず、図4に、データを秘匿する画像に非圧縮画像を使ったステガノグラフィのエンコーダーの例を示す。量子化器Qnで下位nビットが0になった再量子化値の下位nビットに、ランダマイザで白色化した秘匿データ系列を埋め込む。同時に、ディザとフィードバックフィルタF(z)で誤差拡散を行うことにより、画質劣化を知覚されることを極力防ぐ。人間の知覚特性は、例えば図5に示すCSF(Contrast Sensitivity Function)のような特性を有しており(表1、文献[1][2]を参照)、これから図6に示すような知覚されにくい雑音電力スペクトルの形状を仮定することができる。画質劣化を知覚されにくくするためには、この雑音電力スペクトルと再量子化誤差によって生じる雑音のパワースペクトルが相似形になることが望ましい。
1. Basic Algorithm First, FIG. 4 shows an example of a steganographic encoder using an uncompressed image as an image for concealing data. The secret data sequence whitened by the randomizer is embedded in the lower n bits of the requantized value in which the lower n bits become 0 by the quantizer Qn. At the same time, by performing error diffusion with dither and feedback filter F (z), the perception of image quality degradation is prevented as much as possible. The human perceptual characteristic has a characteristic such as CSF (Contrast Sensitivity Function) shown in FIG. 5, for example (see Table 1, documents [1] and [2]), and is perceived as shown in FIG. A difficult noise power spectrum shape can be assumed. In order to make it difficult to perceive image quality degradation, it is desirable that the noise power spectrum and the noise power spectrum caused by the requantization error have a similar shape.
つぎに、今回考案したJPEGデータにデータを秘匿する方法の概要を述べる。JPEGの符号化は図7に示す順序で処理が行われる。画素値にデータ秘匿を行ってもその後にDCT変換と量子化が施されるため、秘匿データが破壊される。そのため、画素値にデータ秘匿をするのではなく、DCT係数の量子化の際にデータを秘匿することを考える。なお、今回の研究では一つのDCT係数にたかだか1ビットのデータを秘匿することにする。これは、元来JPEG符号化が人間の知覚特性を利用して情報量圧縮しており、DCT係数に2ビット以上のデータを秘匿すると後述するように量子化雑音電力が大きくなって、画質劣化の知覚を防ぐことが困難になるためである。 Next, the outline of the method of concealing data in the JPEG data devised this time will be described. JPEG encoding is performed in the order shown in FIG. Even if data concealment is performed on the pixel value, since DCT conversion and quantization are performed thereafter, the concealed data is destroyed. Therefore, instead of concealing data in pixel values, consider concealing data when quantizing DCT coefficients. In this research, at most one bit of data is concealed in one DCT coefficient. This is because JPEG encoding originally compresses the amount of information using human perceptual characteristics, and concealing data of 2 bits or more in the DCT coefficient increases the quantization noise power as will be described later, resulting in deterioration in image quality. This is because it becomes difficult to prevent perception of the image.
図8に、通常の量子化を行うなら偶数の量子化代表値となるDCT係数に、データ秘匿を行う場合を示す。通常の量子化であれば最大の量子化誤差は量子化ステップの半分であるが、図8では最大で量子化ステップになる。これは通常の量子化で奇数の量子化代表値となるDCT係数の場合も同じである。平均量子化雑音電力についても述べておく。通常の量子化の量子化ステップをΔ、DCT係数xの生起確率を各量子化境界内で一様なp(x)、xの量子化代表値をq(x)とすると、平均雑音電力はMaxの量子化器より、 FIG. 8 shows a case where data concealment is performed on DCT coefficients that are even quantization representative values if normal quantization is performed. In the case of normal quantization, the maximum quantization error is half of the quantization step, but in FIG. 8, the maximum quantization error is achieved. The same applies to the case of DCT coefficients that are odd quantization representative values in normal quantization. The average quantization noise power is also described. If the quantization step of normal quantization is Δ, the probability of occurrence of the DCT coefficient x is uniform p (x) within each quantization boundary, and the quantization representative value of x is q (x), the average noise power is From Max's quantizer,
図8のようにデータ秘匿を行う場合、量子化ステップをδ、通常の量子化なら量子化代表値が偶数となる確率、奇数となる確率をそれぞれ1/2、埋め込むデータビット’0’,’1’の生起確率をそれぞれ1/2だとすると、平均雑音電力は When data concealment is performed as shown in FIG. 8, the quantization step is δ, and in the case of normal quantization, the probability that the quantized representative value is an even number, the probability that it is an odd number is 1/2, and the embedded data bits are '0', ' If each occurrence probability of 1 'is 1/2, the average noise power is
画像データはDCT変換によって既に周波数領域に変換されているため、DCT係数にデータ秘匿をしながら量子化した量子化雑音電力スペクトルが、直接図6のような形状になるように量子化ステップを決定してやる必要がある。 Since the image data has already been transformed into the frequency domain by DCT transformation, the quantization step is determined so that the quantized noise power spectrum quantized while concealing the data in the DCT coefficient is directly in the shape shown in FIG. I need to do it.
また、量子化ステップがJPEGデータサイズに及ぼす影響を考慮しなければならない。JPEG符号化では、DCT係数は図9に示すようにジグザグスキャンをして低域から高域に向かって線形量子化されるため、特に高域においてDCT係数の量子化値が連続して0になる確率が高い。量子化値として0が続けば、ハフマン符号化時にゼロランレングス符号によってJPEGデータサイズが小さくなる。しかし、量子化ステップが小さいと量子化値が0になる確率が減るため、ゼロランレングス符号によるJPEGデータサイズの減少があまり期待できなくなる。そのため、画質劣化の知覚を防ぐこととJPEGデータサイズが通常より大きくなることの両面を考慮し、量子化ステップとデータを秘匿するDCT係数の位置を決定する必要がある。 In addition, the influence of the quantization step on the JPEG data size must be considered. In JPEG encoding, DCT coefficients are zigzag scanned and linearly quantized from low to high as shown in FIG. 9, so that the quantized values of DCT coefficients are continuously set to 0 particularly in the high band. The probability of becoming high. If the quantization value continues to be 0, the JPEG data size is reduced by the zero-run length code during Huffman coding. However, if the quantization step is small, the probability that the quantized value becomes 0 decreases, so that it is difficult to expect a decrease in the JPEG data size due to the zero-run length code. Therefore, it is necessary to determine the quantization step and the position of the DCT coefficient that conceals the data in consideration of both the perception of image quality degradation and the fact that the JPEG data size becomes larger than usual.
2.輝度データへの秘匿
画像の輝度データに対して任意のデータの埋め込みを行う。埋め込みによる画像の劣化を知覚されにくくするため、以下のような工夫を行った。
1.CSFを検討することで知覚されにくいように埋め込みを行う。
2.埋め込みによって発生する最大の雑音電力を、埋め込みを行わない場合と同じレベルに抑える。
2. Confidentiality in luminance data Arbitrary data is embedded in luminance data of an image. In order to make it difficult to perceive image deterioration due to embedding, the following measures were taken.
1. Implant so that it is difficult to perceive by examining CSF.
2. The maximum noise power generated by embedding is suppressed to the same level as when no embedding is performed.
詳細は省略する。
2.2量子化雑音電力と画質劣化の関係
画像へのデータの埋め込みを行うと通常のJPEG圧縮による量子化誤差以上の誤差が発生する。その誤差から生じる雑音のパワーを埋め込みを行わない画像と等しくすることで、画像の劣化を知覚されにくくした。
Details are omitted.
2.2 Relationship between quantization noise power and image quality deterioration When data is embedded in an image, an error more than the quantization error caused by normal JPEG compression occurs. By making the noise power resulting from the error equal to the image without embedding, the deterioration of the image is less perceived.
数9にあるとおり、埋め込みによる誤差の平均雑音電力を通常の平均量子化雑音電力と等しくするには量子化ステップサイズを1/2にすれば良いが、次章の評価実験の結果、1/2では画像の劣化が知覚されやすいことがわかった。
As shown in
そこで、この原因が埋め込みによる最悪の雑音電力にあるのではないかと推測し、最悪の雑音電力を通常の平均量子化雑音電力と等しくなるような量子化ステップサイズを検討した。 Therefore, we inferred that the cause is the worst noise power due to embedding, and examined a quantization step size that makes the worst noise power equal to the normal average quantization noise power.
JPEG圧縮における量子化雑音電力は数8よりΔ2/12である。
Quantization noise power in the JPEG compression is delta 2/12 than the
データを埋め込んだ場合の誤差による平均雑音電力は数9より Average noise power due to error when data is embedded
(一重下線は埋め込み誤差なし、二重下線は埋め込み誤差あり)
ここで、埋め込み誤差が発生する場合のみを考えると、
(Single underline has no embedding error, double underline has embedding error)
Here, considering only the case where an embedding error occurs,
となる。埋め込みを行った場合の最大雑音電力と、埋め込みを行っていない場合の量子化雑音電力を等しくするための量子化ステップサイズは、 It becomes. The quantization step size for equalizing the maximum noise power with embedding and the quantization noise power with no embedding is:
となり、埋め込みを行う位置の量子化ステップサイズを埋め込まない場合の7-1/2にすれば良いことがわかる。 Thus, it can be seen that the quantization step size at the position where the embedding is performed should be 7 -1/2 in the case where the embedding is not performed.
しかし、埋め込む位置全ての量子化ステップサイズを7-1/2にすると圧縮率が下がり、ファイルサイズが大きくなってしまう。そこで、人の目の感度が高い周波数帯域では7-1/2とし、感度が低い周波数帯域では1/2の量子化ステップサイズとすることで、画質を維持しつつファイルサイズの増加を抑える。 However, if the quantization step size of all the embedding positions is set to 7 -1/2 , the compression rate is lowered and the file size is increased. Therefore, by setting the quantization step size to 7 -1/2 in the frequency band with high human eye sensitivity and 1/2 in the frequency band with low sensitivity, the increase in file size is suppressed while maintaining the image quality.
3.画質の主観評価
ステガノグラフィ画像と通常のJPEG画像間での画質の主観評価を行った。データの埋め込みにおいて画質と関わるのは、データの埋め込みを開始するDCT係数の位置(図10)なので、JPEGのQuality値と埋め込みを開始する位置を変化させた画像を用いて評価を行った。この評価で用いた画像は、埋め込む場所に対応する量子化ステップサイズを1/2にする手法で作成した。
3. Subjective evaluation of image quality Subjective evaluation of image quality between steganographic images and normal JPEG images was performed. Since data embedding relates to the image quality because the position of the DCT coefficient at which data embedding starts (FIG. 10), evaluation was performed using an image in which the JPEG Quality value and the embedding start position were changed. The image used in this evaluation was created by a method of halving the quantization step size corresponding to the embedding location.
ここで、JPEGのQuality値とは、JPEGの圧縮率に関わる数値(0〜100)である。大きいほど圧縮率が低く画像の劣化も少ない。IJGのエンコーダの場合、デフォルトのQuality値は75である。
■評価に用いた画像
25枚*16種類(埋め込み開始位置の変化、Qualityの変化(図11))
■評価者
6名
■評価方法
埋め込みを行っていないJPEG画像とJPEGステガノグラフィ画像を比較し、1〜6の数値で評価を行う。
1画質劣化が非常に気になる
…
5画質劣化が全く気にならない
6ステガノグラフィ画像のほうが画質が良い
図12に示すように、評価実験の結果、埋め込みによる画質の劣化が予想以上に知覚されることが判明した。そこで埋め込みによる平均最大雑音電力が、埋め込み無しのときの平均量子化雑音電力と等しくなるように量子化ステップサイズを7-1/2にする手法を用いて再度実験を行った。
Here, the JPEG Quality value is a numerical value (0 to 100) related to the JPEG compression rate. The larger the value is, the lower the compression rate and the less the deterioration of the image. For IJG encoders, the default Quality value is 75.
■ Image used for evaluation
25 sheets * 16 types (change in embedding start position, quality change (Fig. 11))
■ Evaluator
6 people ■ Evaluation method JPEG images without embedding and JPEG steganography images are compared, and evaluations are made with numbers from 1 to 6.
1I'm very worried about image quality degradation ...
5I don't mind image quality degradation at all
As shown in FIG. 12, as a result of the evaluation experiment, it was found that the deterioration of image quality due to embedding was perceived more than expected. Therefore, the experiment was performed again using a method of setting the quantization step size to 7 -1/2 so that the average maximum noise power by embedding becomes equal to the average quantization noise power without embedding.
この実験は、評価者1名、評価に使用した画像5枚*19種類(前回の16種類+各Qualityの通常JPEG画像)、同じ評価基準で行った。この結果、図13に示すように、量子化ステップサイズを1/2にしたときよりも知覚されにくくなっていることがわかる。また、埋め込み開始位置を20番以降にすれば評価得点が4.5以上になり、埋め込みを行っても画像の劣化がほぼ気にならないと判断できる。 This experiment was conducted with one evaluator, 5 images used for evaluation * 19 types (16 types in the previous time + normal JPEG images of each Quality), and the same evaluation criteria. As a result, as shown in FIG. 13, it is understood that it is less perceived than when the quantization step size is halved. Also, if the embedding start position is set to No. 20 or later, the evaluation score becomes 4.5 or more, and it can be determined that even if embedding is performed, degradation of the image is hardly noticed.
図14に、20番以降にデータを埋め込んだ場合の秘匿データ量とJPEGファイルサイズの増加を示す。 FIG. 14 shows the increase in the amount of confidential data and the JPEG file size when data is embedded after No. 20.
通常JPEG画像に対して各Qualityで最大15%程度の埋め込みを行うことができた。また、秘匿データ量に対してのJPEGファイルサイズの増加量は1.1倍〜1.7倍となった。Quality95の場合を除けば、埋め込み量を多くした場合の方が埋め込み効率が良いことがわかる。 It was possible to embed up to 15% at maximum for each JPEG image. Also, the increase in JPEG file size with respect to the amount of confidential data was 1.1 to 1.7 times. Except for the case of Quality95, it can be seen that the embedding efficiency is better when the embedding amount is increased.
図15は、512x512画素の標準画像Lenaにデータを埋め込んだ場合の秘匿データ量とJPEGファイルサイズの増加を示す。なお、非特許文献2「埋込位置の特定を必要としないJPEG画像へのデータ埋込法」におけるQ-factorと本実施例のQualityとの関係は、おおよそ次のとおりである。
FIG. 15 shows an increase in the amount of confidential data and the JPEG file size when data is embedded in a standard image Lena having 512 × 512 pixels. The relationship between the Q-factor and the quality of the present embodiment in
Quality82⇔Q-factor20
Quality28⇔Q-factor80
Quality15⇔Q-factor140
Quality9⇔Q-factor200
Quality82⇔Q-factor20
Quality28⇔Q-factor80
Quality15⇔Q-factor140
Quality9Q-factor200
<第2実施形態>
図16は本発明の好ましい第2の実施形態に係るデータ挿入機能付き画像圧縮符号化装置のブロック図である。この装置は、第1実施形態と異なり、復号化部21、再量子化部22、エントロピー符号化部23をさらに備える。再量子化部22は、データ挿入部15を含んでいる。画像信号出力部10、画像データ作成部11、DCT処理部12、量子化部13、エントロピー符号化部14は、第1実施形態と同様である。第1処理ブロック101は、画像信号出力部10、画像データ作成部11、DCT処理部12、量子化部13、エントロピー符号化部14を含む。第2処理ブロック102は、復号化部21、再量子化部22、エントロピー符号化部23を含む。第1処理ブロック101と第2処理ブロックとは必ずしも1つの装置に組み込む必要はなく、別々の装置に組み込まれてもよい。
Second Embodiment
FIG. 16 is a block diagram of an image compression coding apparatus with a data insertion function according to a preferred second embodiment of the present invention. Unlike the first embodiment, this apparatus further includes a
復号化部21は、エントロピー符号化部14の出力した符号化画像データのDCT係数D(m)を復号化する。データ挿入部15は、復号化部21の復号したDCT係数D(m)のうち、所定の開始位置のDCT係数D(Z)から本来のEOBの1つ分低周波数側(非零最高変換係数の1つ前)のDCT係数D(Y)=D(X-1)を、量子化部13の符号化画像データの量子化幅Q1(m)よりも小さい量子化幅Q2(m)で割った上、第1実施形態と同様に挿入データビットに応じて除算結果値D(m)/Q2(m)を丸めることで、最下位1ビットにデータビットを挿入しながらDCT係数D(m)を量子化する。この量子化によって定まった新たなEOBの1つ前の位置の量子化代表値が1または−1であれば変化させない。新たなEOB以降(非零最高変換係数より上)の位置の零値のDCT係数はそのまま零値としてデータビットを埋め込まない。
The
データ挿入部15が量子化幅Q2(m)を量子化幅Q1(m)よりも小さくするのは,データを挿入しながら量子化することによる画質劣化を極力防ぐためである。
The reason why the
再量子化部22は、データ挿入部15が量子化代表値を決定したDCT係数以外のDCT係数の各々を、対応する量子化幅Q1(m)で割って四捨五入の丸め演算を施して量子化代表値を求め、再び量子化する。
The
エントロピー符号化部23は、再量子化部22が使用した量子化幅の量子化テーブルと、再量子化部22が決定した量子化代表値を符号化する。
The
このように、第2処理ブロック102は、第1処理ブロック101でいったん圧縮符号化された画像データに、任意のデータを挿入して、再び圧縮符号化する。
In this way, the
<第3実施形態>
第2実施形態のデータ挿入機能付き画像圧縮符号化装置の再量子化部22は、量子化部13の量子化テーブルQ1に基づき、逆量子化用の基本的な量子化テーブルQ2bの調整値(Quality Factor)であるfを決定してもよい。
<Third Embodiment>
The
前提として、再量子化部22は、第2実施形態のようにデータを挿入しない場合のDCT係数を量子化する基本量子化ステップQb2(m)(0≦m<64)を含む基本的な量子化テーブルQb2を有しているとする。
As a premise, the
かつ、再量子化部22は、データを挿入する場合のDCT係数を量子化する基本量子化ステップQb3(m)(0≦m<64)を含む基本的な量子化テーブルQb3を有しているとする。
In addition, the
復号化部21は、量子化部13が量子化テーブルQ1に基づき量子化したDCT係数を、量子化テーブルQ1に基づき逆量子化した後、逆量子化したDCT係数と量子化テーブルQ1を再量子化部22に送る。
The
再量子化部22は、量子化テーブルQ1に基づきfを決定する。そして、再量子化部22は、実際にDCT係数を逆量子化するための量子化テーブルQ2を、Qb2(m)にfを一律に乗じることにより作成する。すなわち再量子化部22は、
Q2(m)=Qb2(m)×f(0≦m<64)
により量子化テーブルQ2を作成する。
The
Q2 (m) = Qb2 (m) × f (0 ≦ m <64)
To create a quantization table Q2.
かつ、本実施形態では、再量子化部22は、決定したfを基本量子化ステップQb3(m)に一律に乗じることにより、データ挿入のために使用する量子化テーブルQ3を作成する。
In the present embodiment, the
すなわち再量子化部22は、
Q3(m)=Qb3(m)×f(0≦m<64)
により量子化テーブルQ3を作成する。
That is, the
Q3 (m) = Qb3 (m) × f (0 ≦ m <64)
To create a quantization table Q3.
ただし、直流成分位置からデータ埋め込みを開始するDCT係数位置(Zの1つ低周波数側の係数位置Z-1)までの量子化ステップは、量子化テーブルQ2、Q3で共通するものとする。すなわち、
Q2(m)=Q3(m)(0≦m≦Z-1)
である。
However, the quantization steps from the DC component position to the DCT coefficient position where the data embedding starts (coefficient position Z-1 on the lower frequency side of Z) are common to the quantization tables Q2 and Q3. That is,
Q2 (m) = Q3 (m) (0 ≦ m ≦ Z-1)
It is.
データ挿入部15は、第1および第2実施形態と同様、復号化部21からの各DCT係数を量子化ステップQ3(m)(Z≦m≦Y)によって除算した値である除算結果値の丸め方向を挿入データの値に応じて変えることで、各DCT係数の最下位1ビットにデータを挿入する。
As in the first and second embodiments, the
復号化部21からの各DCT係数を量子化ステップQ2(m)によって除算して本来のEOBを決定した後、量子化ステップQ3(m)(Z≦m≦Y)を用いてデータを挿入してもよい。量子化ステップQ3(m)(Z≦m≦Y)の値は、量子化ステップQ2(m)の1/2以下とすることが好ましく、(7)-1/2以下とすることがさらに好ましい。
After each DCT coefficient from the
10:画像信号出力部、11:画像データ作成部、12:DCT処理部、13:量子化部、14:エントロピー符号化部、15:データ挿入部、21:復号化部、22:再量子化部、23:エントロピー符号化部 10: Image signal output unit, 11: Image data creation unit, 12: DCT processing unit, 13: Quantization unit, 14: Entropy coding unit, 15: Data insertion unit, 21: Decoding unit, 22: Requantization Part 23: Entropy encoding part
Claims (5)
前記DCT係数入力部に入力されたDCT係数の内、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、前記EOBのDCT係数の量子化代表値を、−1または1のうち、前記EOBのDCT係数の除算結果値と近い方の値に変更するデータ挿入部と、
を備えるデータ挿入装置。 A DCT coefficient input unit for inputting DCT (discrete cosine transform) coefficients calculated for each of a plurality of blocks obtained by dividing the image data;
Among the DCT coefficients input to the DCT coefficient input unit, the coefficient position on the low frequency side by one coefficient position from the start position, which is a predetermined low frequency side coefficient position at which data insertion is started, from EOB (End of Block) Arbitrary data to be inserted into each of the least significant 1 bits of the quantized representative value, which is a value obtained by rounding a division result value, which is a value obtained by dividing each of the DCT coefficients up to the end position by the corresponding quantization width A data insertion unit that changes the quantization representative value of the DCT coefficient of the EOB to a value closer to the division result value of the DCT coefficient of the EOB, of -1 or 1,
A data insertion device comprising:
前記量子化部は、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側のブロックである終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、前記EOBのDCT係数の量子化代表値を、−1または1のうち、前記EOBのDCT係数の除算結果値と近い方の値に変更する画像圧縮符号化装置。 A block that divides image data into a plurality of blocks, a DCT transform unit that calculates a DCT (discrete cosine transform) coefficient for each block, and a division that is a value obtained by dividing the DCT coefficient of each block by a corresponding quantization width A quantization unit that determines the quantization representative value of each DCT coefficient by rounding the result value, a quantization data table that stores the quantization representative value of each DCT coefficient, and a code that encodes the quantization data table An image compression encoding device comprising a conversion unit,
The quantization unit calculates DCT coefficients from a start position that is a predetermined low frequency side coefficient position at which data insertion is started to an end position that is a low frequency side block by one coefficient position from EOB (End of Block). Changing each of the least significant 1 bit of the quantized representative value that is a value obtained by rounding a division result value that is a value obtained by dividing each by a corresponding quantization width into a bit that constitutes arbitrary data to be inserted; An image compression coding apparatus that changes a quantization representative value of the DCT coefficient of the EOB to a value closer to a division result value of the DCT coefficient of the EOB, which is -1 or 1.
前記DCT係数入力部に入力されたDCT係数の内、データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側のブロックである終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、前記EOBのDCT係数の量子化代表値を、−1または1のうち、前記EOBのDCT係数の除算結果値と近い方の値に変更するステップと、
を含むデータ挿入方法。 Inputting DCT (discrete cosine transform) coefficients calculated for each of a plurality of blocks obtained by dividing the image data;
Among the DCT coefficients input to the DCT coefficient input unit, a block on the low frequency side by one coefficient position from the start position, which is a predetermined low frequency side coefficient position at which data insertion is started, from EOB (End of Block). Arbitrary data to be inserted into each of the least significant 1 bits of the quantized representative value, which is a value obtained by rounding a division result value obtained by dividing each DCT coefficient up to a certain end position by the corresponding quantization width, And changing the quantization representative value of the DCT coefficient of the EOB to a value closer to the division result value of the DCT coefficient of the EOB of −1 or 1,
Data insertion method including
各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定するステップと、
データ挿入を開始する所定の低周波数側の係数位置である開始位置からEOB(End of Block)よりも1係数位置分低周波数側の係数位置である終了位置までのDCT係数の各々を対応する量子化幅で除算した値である除算結果値を丸めた値である量子化代表値の最下位1ビットの各々を、挿入すべき任意のデータを構成するビットに変更するとともに、前記EOBのDCT係数の量子化代表値を、−1または1のうち、前記EOBのDCT係数の除算結果値と近い方の値に変更するステップと、
各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化するステップと、
を含む画像圧縮符号化方法。 Performing block formation to divide image data into a plurality of blocks, and calculating DCT (discrete cosine transform) coefficients for each block;
Determining a quantization representative value of each DCT coefficient by rounding a division result value that is a value obtained by dividing the DCT coefficient of each block by a corresponding quantization width;
Quantities corresponding to respective DCT coefficients from a start position which is a predetermined low frequency side coefficient position at which data insertion is started to an end position which is a low frequency side coefficient position by one coefficient position from EOB (End of Block). Each of the least significant 1 bits of the quantized representative value that is a value obtained by rounding the division result value that is a value divided by the conversion width is changed to a bit that constitutes arbitrary data to be inserted, and the DCT coefficient of the EOB Changing the quantization representative value of −1 or 1 to a value closer to the division result value of the DCT coefficient of the EOB.
Creating a quantized data table storing quantized representative values of each DCT coefficient and encoding the quantized data table;
A method for compressing and encoding images.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006038631A JP2007221388A (en) | 2006-02-15 | 2006-02-15 | Data inserting device and method, and image compressing coding device and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006038631A JP2007221388A (en) | 2006-02-15 | 2006-02-15 | Data inserting device and method, and image compressing coding device and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2007221388A true JP2007221388A (en) | 2007-08-30 |
Family
ID=38498172
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006038631A Pending JP2007221388A (en) | 2006-02-15 | 2006-02-15 | Data inserting device and method, and image compressing coding device and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2007221388A (en) |
-
2006
- 2006-02-15 JP JP2006038631A patent/JP2007221388A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4248241B2 (en) | Watermarking of compressed information signals | |
| US8995522B2 (en) | Method and system for rate control | |
| JP4273996B2 (en) | Image encoding apparatus and method, and image decoding apparatus and method | |
| KR101266577B1 (en) | The method and apparatus of processing an image | |
| JP4365957B2 (en) | Image processing method and apparatus and storage medium | |
| JP2014519215A (en) | Method and apparatus for lossy compression encoding data and corresponding method and apparatus for reconstructing data | |
| CN1241395C (en) | Method and device for processing compressed media signals | |
| JP2022069449A (en) | Inverse conversion A method for decoding a moving image that performs dynamic range conversion reduced by shift memory. | |
| CN100474928C (en) | Watermarking of a variable bit-rate signal | |
| Li et al. | A reversible data hiding scheme for JPEG images | |
| JP2007221387A (en) | Data inserting device and method, and image compressing coding device and method | |
| JP4919213B2 (en) | Digital watermark insertion method and detection method | |
| JP2007221388A (en) | Data inserting device and method, and image compressing coding device and method | |
| JP2019068385A (en) | Encoder, control method thereof, and control program, and imaging apparatus | |
| JP4939460B2 (en) | Image processing device | |
| JP4642509B2 (en) | Apparatus for embedding confidential information in compressed image data and apparatus for encoding confidential data | |
| CN100474884C (en) | Image processing device and image processing method | |
| JP4414328B2 (en) | Image processing apparatus and image processing apparatus | |
| JP4731972B2 (en) | Image encoding method and image encoding apparatus | |
| JP2007221389A (en) | Data inserting device and method, and image compressing coding device and method | |
| JP2007535262A (en) | How to watermark a compressed information signal | |
| JP2002209111A (en) | Image encoding apparatus, image communication system, and program recording medium | |
| CN119054278A (en) | Image encoding device and image encoding method | |
| JP2006279491A (en) | Image encoding device | |
| JP2007043495A (en) | Image processing apparatus and image processing method |