JP2007221389A - 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 PDF

Info

Publication number
JP2007221389A
JP2007221389A JP2006038632A JP2006038632A JP2007221389A JP 2007221389 A JP2007221389 A JP 2007221389A JP 2006038632 A JP2006038632 A JP 2006038632A JP 2006038632 A JP2006038632 A JP 2006038632A JP 2007221389 A JP2007221389 A JP 2007221389A
Authority
JP
Japan
Prior art keywords
data
color difference
component
quantization
dct coefficient
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
Application number
JP2006038632A
Other languages
Japanese (ja)
Inventor
Kenki Ihara
健喜 井原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Software Co Ltd
Original Assignee
Fujifilm Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Software Co Ltd filed Critical Fujifilm Software Co Ltd
Priority to JP2006038632A priority Critical patent/JP2007221389A/en
Publication of JP2007221389A publication Critical patent/JP2007221389A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To prevent deterioration in image quality, an increase in data quantity to be embedded in image data and scale-up of a file in embedding optional data into the image data. <P>SOLUTION: A data inserting section 15 decides a Zth coefficient position (start position) at which data insertion starts for a DCT coefficient of a Y-component, depending on the coefficient positions of the EOBs of Cb and Cr components, and inserts data at the start position. By embedding data from the DCT coefficient of Y data at a coefficient position equivalent to a color difference EOB, frequencies having extreme noise power are not overlapped in luminance and color difference, and noise power summed in luminance and color difference can come within a range of noise power in which deterioration in image quality is not detected. <P>COPYRIGHT: (C)2007,JPO&INPIT

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)。
特開2003−289435号公報 特開2000−151973号公報 特開2002−330279号公報 特許庁標準技術集「JPEG符号化列に対するステガノグラフィ」インターネットURL[http://www.jpo.go.jp/shiryou/s_sonota/hyoujun_gijutsu/denshi_sukashi/2_e_2.htm] 「埋込位置の特定を必要としないJPEG画像へのデータ埋込法」、電子情報通信学会論文誌2005/10Vol.J88−D−II No.10 pp.2037−2045、(社)電子情報通信学会 「JPEG符号化列へのバイナリデータのデータ埋込法」、電子情報通信学会論文誌2000/6Vol.J83−D−II No.6 pp.1469−1476、(社)電子情報通信学会
Moreover, image quality degradation may occur due to data embedding. As a technique for preventing this, for example, there is a technique in which a place where an image is embedded is positioned at the highest frequency of the DCT coefficient (Patent Document 3, Non-Patent Document). 3).
JP 2003-289435 A JP 2000-151973 A JP 2002-330279 A JPO Standard Technology Collection “Steganography for JPEG Coded Sequences” Internet URL [http://www.jpo.go.jp/shiryou/s_sonota/hyoujun_gijutsu/denshi_sukashi/2_e_2.htm] “Data Embedding Method in JPEG Image That Does Not Need Specification of Embedding Position”, IEICE Transactions 2005/10 Vol. J88-D-II No. 10 pp. 2037-2045, The Institute of Electronics, Information and Communication Engineers “Data Embedding Binary Data in JPEG Coded Sequence”, IEICE Transactions 2000/6 Vol. J83-D-II No. 6 pp. 1469-1476, The Institute of Electronics, Information and Communication Engineers

特許文献1、非特許文献1および特許文献2の技術では、1マクロブロックにつき1ビットしかデータを埋め込むことができず、埋め込めるデータ量が限られてしまう。非特許文献2の技術でも、埋め込めるデータ量が限られる。また、特許文献3および非特許文献3のようにすると、EOB(End of Block)符号が消滅するため、符号化効率が低下し、JPEGファイルが非常に大きくなる。   In the techniques of Patent Document 1, Non-Patent Document 1, and Patent Document 2, only one bit can be embedded per macroblock, and the amount of data that can be embedded is limited. Even in the technique of Non-Patent Document 2, the amount of data that can be embedded is limited. Further, as in Patent Document 3 and Non-Patent Document 3, since the EOB (End of Block) code disappears, the encoding efficiency is reduced and the JPEG file becomes very large.

本発明は、画像データへの任意データの埋め込みに際して、画質劣化の防止、画像データへ埋め込むデータ量の増大化、ファイルの長大化防止を目的とする。   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.

本発明は、画像データを輝度成分および色差成分に変換するYC変換部と、輝度成分および色差成分をそれぞれ複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するDCT変換部と、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定する量子化部と、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化する符号化部とを備える画像圧縮符号化装置に関する。   In the present invention, a YC conversion unit that converts image data into a luminance component and a color difference component, and a block that divides the luminance component and the color difference component into a plurality of blocks, respectively, and DCT (discrete cosine transform) coefficients are calculated for each block. A DCT transform unit that performs a rounding of a division result value that is a value obtained by dividing the DCT coefficient of each block by a corresponding quantization width, and a quantization unit that determines a quantization representative value of each DCT coefficient, The present invention relates to an image compression encoding apparatus including a quantization data table that stores quantization representative values and an encoding unit that encodes the quantization data table.

この画像圧縮符号化装置において、量子化部は、YC変換部の変換した色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定した上、開始位置からデータ挿入を終了する所定の高周波数側の方の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、輝度成分のDCT係数の量子化代表値に任意のデータを挿入する。   In this image compression coding apparatus, the quantizing unit determines the position of the DCT coefficient of the luminance component corresponding to the EOB (End of Block) of the color difference component converted by the YC converting unit, and the position on the low frequency side where data insertion is started. And a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position which is a predetermined high frequency side where the data insertion is ended by the corresponding quantization width. By changing the rounding direction of a certain division result value, each least significant bit of the quantized representative value is changed to a bit constituting arbitrary data to be inserted, and is arbitrarily set as a quantized representative value of the DCT coefficient of the luminance component Insert the data.

この発明によると、画像データを分割することで得られたブロックごとに算出された各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.

また、輝度成分に関するデータ埋め込みの開始位置を示す情報は色差成分のEOB相当位置に定まるから、これを別途データ化しで画像ファイルのヘッダ部に埋め込んだり、予め符号化側・復号化側でデータ埋め込み開始位置を固定的に決めておいたりする必要がない。   Since the information indicating the data embedding start position related to the luminance component is determined at the EOB equivalent position of the chrominance component, this is converted into data separately and embedded in the header portion of the image file, or the data is embedded in advance on the encoding side / decoding side. There is no need to fix the starting position.

また、色差の変化は輝度の変化に比べて鈍感であるという人の視覚特性を考慮して、色差成分の量子化幅は輝度成分の量子化幅よりも大きく設定されているのが通常であるから、色差成分のEOBに相当する輝度成分のDCT係数の位置は、輝度成分のEOBの位置よりも低周波数側にある。このため、輝度成分の本来のEOB以降にデータが挿入されることで輝度成分のEOBが高周波数側に移動しゼロランレングスが発生する確率が低くなり符号化効率が低下することもない。   Also, considering the human visual characteristic that the change in color difference is insensitive compared to the change in luminance, the quantization width of the color difference component is usually set larger than the quantization width of the luminance component. Therefore, the position of the DCT coefficient of the luminance component corresponding to the EOB of the color difference component is on the lower frequency side than the position of the EOB of the luminance component. For this reason, when data is inserted after the original EOB of the luminance component, the probability that the luminance component EOB moves to the high frequency side and zero run length occurs is reduced, and the encoding efficiency is not lowered.

なお、万一、あるMCU(最小符号化単位)の色差成分のEOBの位置に相当する輝度成分の位置が輝度成分のEOBの位置と同じかそれよりも高周波数側にあった場合は、そのMCUの輝度成分にデータを挿入しないようにする。こうすれば、輝度成分のEOBが高周波数側に移動しゼロランレングスが発生する確率が低くなり符号化効率が低下することもない。   If the position of the luminance component corresponding to the EOB position of the color difference component of a certain MCU (minimum coding unit) is the same as or higher than the position of the EOB of the luminance component, Data is not inserted into the luminance component of the MCU. By doing this, the probability that the EOB of the luminance component moves to the high frequency side and zero run length occurs is reduced, and the coding efficiency is not lowered.

以上のようにして決定された開始位置から輝度成分のDCT係数にデータが挿入された場合において、さらに、データ挿入を開始する所定の低周波数側の係数位置である開始位置からデータ挿入を終了する所定の高周波数側の係数位置である終了位置までの色差成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、色差成分のDCT係数の量子化代表値に任意のデータを挿入したとする。   When data is inserted into the DCT coefficient of the luminance component from the start position determined as described above, the data insertion is further terminated from the start position which is a predetermined low frequency side coefficient position where data insertion is started. By changing the rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the color difference component up to the end position, which is the predetermined high frequency side coefficient position, by the corresponding quantization width, the quantization representative value is maximized. It is assumed that each lower 1 bit is changed to a bit constituting arbitrary data to be inserted, and arbitrary data is inserted into the quantized representative value of the DCT coefficient of the color difference component.

この場合、色差成分のEOBに相当する輝度成分のDCT係数の位置からデータ埋め込みをすることによって、雑音電力が突出するDCT係数の周波数が輝度と色差で重ならず、輝度と色差で合算した雑音電力を、画質劣化を検知されない雑音電力の範囲内に収めることができる。   In this case, by embedding data from the position of the DCT coefficient of the luminance component corresponding to the EOB of the color difference component, the frequency of the DCT coefficient at which the noise power protrudes does not overlap with the luminance and the color difference, but the noise combined with the luminance and the color difference. The power can be kept within a range of noise power in which image quality deterioration is not detected.

YC変換部は、画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crに変換し、量子化部は、DCT係数の直流成分の位置を原点としてDCT係数の交流成分の水平方向の周波数成分の位置およびDCT係数の交流成分の垂直方向の周波数成分の位置を示す2次元座標系(x,y)において、YC変換部の変換した青み色差成分CbのEOB(End of Block)および赤み色差成分CrのEOB(End of Block)の内高周波数側の方の位置(X,Y)に相当する輝度成分の位置を開始位置に決定するとよい。   The YC conversion unit converts the image data into a luminance component Y, a blue color difference component Cb, and a red color difference component Cr, and the quantization unit uses the position of the DC component of the DCT coefficient as the origin and the horizontal frequency of the AC component of the DCT coefficient. In the two-dimensional coordinate system (x, y) indicating the position of the component and the frequency component in the vertical direction of the alternating current component of the DCT coefficient, the EOB (End of Block) and the reddish color difference of the blue color difference component Cb converted by the YC conversion unit The position of the luminance component corresponding to the position (X, Y) on the inner high frequency side of the EOB (End of Block) of the component Cr may be determined as the start position.

例えば、YC変換部が、画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crにそれぞれ4:1:1の割合で変換する場合は、量子化部は、2次元座標系における位置(X,Y)に相当する輝度成分の位置(X/2,Y/2)を開始位置に決定するとよい。   For example, when the YC conversion unit converts the image data into the luminance component Y, the blue color difference component Cb, and the red color difference component Cr at a ratio of 4: 1: 1, respectively, the quantization unit is positioned in the two-dimensional coordinate system ( The position (X / 2, Y / 2) of the luminance component corresponding to (X, Y) may be determined as the start position.

あるいは、YC変換部が、画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crにそれぞれ水平方向に4:2:2の割合で変換する場合は、量子化部は、2次元座標系における位置(X,Y)に相当する輝度成分の位置(X/2,Y)を開始位置に決定するとよい。   Alternatively, when the YC conversion unit converts the image data into the luminance component Y, the blue color difference component Cb, and the red color difference component Cr in a horizontal ratio of 4: 2: 2, respectively, the quantization unit is a two-dimensional coordinate system. The position (X / 2, Y) of the luminance component corresponding to the position (X, Y) at is preferably determined as the start position.

本発明に係るデータ挿入装置は、画像データ色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定した上、開始位置からデータ挿入を終了する所定の高周波数側の方の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、輝度成分のDCT係数の量子化代表値に任意のデータを挿入する。   The data insertion device according to the present invention determines the position of the DCT coefficient of the luminance component corresponding to the EOB (End of Block) of the color difference component of the image data as a start position that is a position on the low frequency side where data insertion is started. The rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position which is a predetermined high frequency side where data insertion is ended, divided by the corresponding quantization width, By changing, the least significant one bit of the quantized representative value is changed to a bit constituting arbitrary data to be inserted, and arbitrary data is inserted into the quantized representative value of the DCT coefficient of the luminance component.

また本発明は、画像データを輝度成分および色差成分に変換するYC変換部と、輝度成分および色差成分をそれぞれ複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するDCT変換部と、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定する量子化部と、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化する符号化部とを備える画像圧縮符号化装置で用いられる画像圧縮符号化方法に関する。   In the present invention, a YC converter that converts image data into a luminance component and a color difference component, and a block that divides the luminance component and the color difference component into a plurality of blocks, respectively, and a DCT (discrete cosine transform) coefficient for each block are provided. A DCT transform unit to be calculated, a quantization unit that determines a quantization representative value of each DCT coefficient by rounding a division result value obtained by dividing the DCT coefficient of each block by a corresponding quantization width, and each DCT coefficient The present invention relates to an image compression encoding method used in an image compression encoding apparatus that includes a quantization data table that stores the quantized representative values of and a coding unit that encodes the quantization data table.

この方法は、YC変換部の変換した色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定するステップと、開始位置からデータ挿入を終了する所定の高周波数側の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、輝度成分のDCT係数の量子化代表値に任意のデータを挿入するステップと、データ挿入を開始する所定の低周波数側の係数位置である開始位置からデータ挿入を終了する所定の高周波数側の係数位置である終了位置までの色差成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、色差成分のDCT係数の量子化代表値に任意のデータを挿入するステップとを含む。   In this method, the step of determining the position of the DCT coefficient of the luminance component corresponding to the EOB (End of Block) of the color difference component converted by the YC conversion unit as a start position that is a low frequency side position at which data insertion is started; The rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position, which is a predetermined high frequency side position at which data insertion ends, is divided by the corresponding quantization width. Thus, each of the least significant 1 bit of the quantized representative value is changed to a bit constituting arbitrary data to be inserted, and the arbitrary data is inserted into the quantized representative value of the DCT coefficient of the luminance component, and data insertion Corresponding to each of the DCT coefficients of the color difference components from the start position which is a predetermined low frequency side coefficient position to start data to the end position which is a predetermined high frequency side coefficient position to end data insertion By changing the rounding direction of the division result value that is a value divided by the quantization width, each least significant bit of the quantized representative value is changed to a bit constituting arbitrary data to be inserted, and the DCT coefficient of the color difference component Inserting arbitrary data into the quantized representative value.

また、本発明に係るデータ挿入方法は、画像データの色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定するステップと、開始位置からデータ挿入を終了する所定の高周波数側の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、輝度成分のDCT係数の量子化代表値に任意のデータを挿入するステップとを含む。   In the data insertion method according to the present invention, the position of the DCT coefficient of the luminance component corresponding to the EOB (End of Block) of the color difference component of the image data is set to the start position that is the position on the low frequency side where data insertion is started. A rounding of a division result value that is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position that is a predetermined high frequency side position at which data insertion is terminated by the corresponding quantization width Changing the direction to change each least significant bit of the quantized representative value to a bit constituting arbitrary data to be inserted, and inserting the arbitrary data into the quantized representative value of the DCT coefficient of the luminance component Including.

本発明によると、輝度成分に関するデータ埋め込みの開始位置を示す情報を別途データ化しで画像ファイルのヘッダ部に埋め込んだり、予め符号化側・復号化側でデータ埋め込み開始位置を固定的に決めておいたりする必要がない。   According to the present invention, information indicating the data embedding start position relating to the luminance component is separately converted into data and embedded in the header portion of the image file, or the data embedding start position is fixedly determined in advance on the encoding side and decoding side. There is no need to go.

また、輝度成分の本来のEOB以降にデータが挿入されることで輝度成分のEOBが高周波数側に移動しゼロランレングスが発生する確率が低くなり符号化効率が低下することもない。   In addition, since the data is inserted after the original EOB of the luminance component, the probability that the EOB of the luminance component moves to the high frequency side and zero run length occurs is reduced, and the encoding efficiency is not lowered.

さらに、輝度成分と色差成分の両方のDCT係数にデータを挿入したとしても、雑音電力が突出するDCT係数の周波数が輝度と色差で重ならず、輝度と色差で合算した雑音電力を、画質劣化を検知されない雑音電力の範囲内に収めることができる。   Furthermore, even if data is inserted into the DCT coefficients for both the luminance component and the color difference component, the frequency of the DCT coefficient at which the noise power is prominent does not overlap with the luminance and the color difference, and the noise power that is the sum of the luminance and the color difference is degraded. Can be kept within the range of noise power that is not detected.

以下、添付した図面を参照し本発明の好ましい実施の形態を説明する。   Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.

図1は本発明の好ましい第1の実施形態に係る画像圧縮符号化装置のブロック図である。詳細は省略するが、本実施形態で述べる画像圧縮符号化装置の各ブロックはプログラム制御によっても実現可能である。   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)、「青み」成分を表す色差信号(CbないしU)及び「赤み」成分を表す色差信号(CrないしV)のYCbCrの色空間に変換して画像データを出力する。   The image data creation unit 11 performs gamma correction of the image signal output from the image signal output unit 10 such as an analog front end built in the digital still camera, defective pixel interpolation by pixel interpolation, white balance correction, image signal Data for each color of RGB representing a subject image is generated by performing processing such as sharpening of the image, correction of the influence of camera shake, and color space conversion from the CMYG color space to the RGB color space, and linearity by a 3 × 3 matrix The image data is converted into a YCbCr color space of a luminance signal (Y) representing luminance, a color difference signal (Cb to U) representing a “blue” component, and a color difference signal (Cr to V) representing a “red” component by conversion. Output.

RGBからYCbCrの色空間への変換には、
Y=aR+bG+cB (ただしa+b+c=1)
を用いるのが一般的である。
For conversion from RGB to YCbCr color space,
Y = aR + bG + cB (where a + b + c = 1)
Is generally used.

例えば、CCIR601では、a=0.299,b=0.587,C=0.114として、
Y=0.299R+0.587G+0.114B
としている。
For example, in CCIR601, a = 0.299, b = 0.587, C = 0.114,
Y = 0.299R + 0.587G + 0.114B
It is said.

色差としては、
Cb=B−Y
Cr=R−Y
や、
Cr=p(R−Y)
Cb=q(B−Y) (p、qは定数)
として求めるのが一般的である。
As color difference,
Cb = BY
Cr = R−Y
Or
Cr = p (R−Y)
Cb = q (BY) (p and q are constants)
It is common to ask for

CCIR601では後者の場合、p=0.5/0.701=0.713、q=0.5/0.886=0.564を推奨している。以後の説明において、特に断らない限りp、qは任意の定数とする。   CCIR601 recommends p = 0.5 / 0.701 = 0.713 and q = 0.5 / 0.886 = 0.564 in the latter case. In the following description, p and q are arbitrary constants unless otherwise specified.

画像データ作成部11によるR,G,B信号からY,Cb,Crの映像信号への変換は、人間の目は輝度の変化には敏感だが、色の変化には鈍感だという特性を利用し、輝度Yにより多くの情報を与えて色の情報量を抑えるために行われる。この変換は、Y,U,Vのサンプリングする比率によって、YCbCr4:1:1、YCbCr4:2:2、YCbCr4:2:0などの名称で呼ばれる。   The conversion from the R, G, B signals to the Y, Cb, Cr video signals by the image data creation unit 11 uses the characteristic that the human eye is sensitive to changes in luminance but insensitive to changes in color. This is done to give more information to the luminance Y and to suppress the amount of color information. This conversion is called by names such as YCbCr4: 1: 1, YCbCr4: 2: 2, YCbCr4: 2: 0, etc., depending on the sampling ratio of Y, U, and V.

YCbCr4:4:4は、Y,Cb,Crを同じ割合で変換する。即ち、1ピクセルあたりR,G,Bそれぞれ8ビット、合計8+8+8=24ビットで色表現されるRGB信号をYCbCr系に座標変換し、水平方向の4ピクセルに対して輝度Y、色差Cb、Crを4ピクセル全て取る。YCbCr4:4:4フォーマット変換後のY,Cb,Cr信号1ピクセルあたりのビット数は8+8+8=24ビット(圧縮率1)であり、1ピクセルあたりのデータ量は変わらない。YCbCr4:4:4フォーマットは医療や映画などの特殊な分野に用いられる。   YCbCr4: 4: 4 converts Y, Cb, and Cr at the same rate. That is, RGB signals expressed in color with 8 bits each for R, G, B per pixel, and a total of 8 + 8 + 8 = 24 bits are coordinate-converted into YCbCr system, and luminance Y and color differences Cb, Cr are calculated for 4 pixels in the horizontal direction. Take all 4 pixels. The number of bits per Y, Cb, Cr signal after YCbCr4: 4: 4 format conversion is 8 + 8 + 8 = 24 bits (compression ratio 1), and the data amount per pixel does not change. The YCbCr4: 4: 4 format is used for special fields such as medicine and movies.

YCbCr4:2:2は、画素を構成する色差信号Cb、Crのデータ量を水平方向にそれぞれ1/2に間引く。即ち、水平方向の4ピクセルに対して輝度Yを4ピクセル全て取るが、色差Cb、Crは2ピクセルずつ取る。このため、YCbCr4:2:2フォーマット変換後のY,Cb,Cr信号1ピクセルあたりのビット数は8+4+4=16ビットとなる(圧縮率2/3)。YCbCr4:2:2フォーマットは一般にテレビ局のスタジオ内やプロユースで用いられる。   YCbCr4: 2: 2 thins out the data amounts of the color difference signals Cb and Cr constituting the pixel by half in the horizontal direction. That is, all four pixels of luminance Y are obtained for four pixels in the horizontal direction, but two pixels of color differences Cb and Cr are obtained. For this reason, the number of bits per pixel of Y, Cb, Cr signals after YCbCr 4: 2: 2 format conversion is 8 + 4 + 4 = 16 bits (compression rate 2/3). The YCbCr 4: 2: 2 format is generally used in television studios and professional use.

YCbCr4:1:1(4:2:0)は、YCbCr4:2:2の色差信号Cb、Crを垂直方向に1/2間引く。YCbCr4:1:1フォーマット変換後のY,Cb,Cr信号1ピクセルあたりのビット数は8+2+2=12ビットとなる(圧縮率1/2)。YCbCr4:1:1はJPEG、MPEG4方式などの符号化器で慣用され、データ量は1ピクセルあたり1/2減少する。   YCbCr4: 1: 1 (4: 2: 0) thins out the color difference signals Cb and Cr of YCbCr4: 2: 2 by 1/2 in the vertical direction. The number of bits per pixel of Y, Cb, Cr signals after YCbCr4: 1: 1 format conversion is 8 + 2 + 2 = 12 bits (compression ratio 1/2). YCbCr4: 1: 1 is commonly used in encoders such as JPEG and MPEG4 systems, and the amount of data is reduced by 1/2 per pixel.

画像データ作成部11により変換されたY,Cb,Crの映像信号のフォーマットは、YCbCr4:4:4、YCbCr4:2:2、YCbCr4:1:1のいずれであってもよい。   The format of the Y, Cb, and Cr video signals converted by the image data creation unit 11 may be any of YCbCr4: 4: 4, YCbCr4: 2: 2, and YCbCr4: 1: 1.

DCT処理部12は、画像データ作成部11から出力された画像データを8×8要素からなる複数のブロック(ここでは説明の便宜上64個のブロックとする)に分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)を行う。DCT処理部12は、DCT係数を格納した8×8のテーブル形式のDCT係数テーブルをブロック毎に作成し、量子化部13に出力する。   The DCT processing unit 12 divides the image data output from the image data creation unit 11 into a plurality of blocks each consisting of 8 × 8 elements (here, 64 blocks for convenience of explanation), and each block DCT (Discrete Cosine Transform) is performed. The DCT processing unit 12 creates a DCT coefficient table in an 8 × 8 table format storing DCT coefficients for each block, and outputs the DCT coefficient table to the quantization unit 13.

8×8ブロックは、縦方向に8画素、横方向に8画素の総数64画素のブロックを示している。画像フォーマット4:1:1の場合は、輝度情報Yの8×8ブロック4つと、色差情報CrないしCbの8×8ブロック各1つでMCU(最小符号化単位)が構成される。画像フォーマット4:2:2の場合は輝度情報Yの8×8ブロック4つと、色差情報CbないしCrの8×8ブロック各2つでMCUが構成される。画像フォーマット4:4:4の場合は輝度情報Yの8×8ブロック4つと、色差情報CbないしCrの8×8ブロック各4つでMCUが構成される。   The 8 × 8 block indicates a block of 64 pixels in total, which is 8 pixels in the vertical direction and 8 pixels in the horizontal direction. In the case of the image format 4: 1, 1: 1, an MCU (minimum coding unit) is configured by four 8 × 8 blocks of luminance information Y and one each of 8 × 8 blocks of color difference information Cr to Cb. In the case of the image format 4: 2: 2, the MCU is composed of four 8 × 8 blocks of luminance information Y and two each of 8 × 8 blocks of color difference information Cb to Cr. In the case of the image format 4: 4: 4, the MCU is composed of four 8 × 8 blocks of luminance information Y and four 8 × 8 blocks of color difference information Cb to Cr.

量子化部13は、DCT処理部12から出力されたブロック毎のDCT係数テーブルの各DCT係数を、量子化表の対応する区間幅(量子化幅あるいは量子化ステップと呼ばれる)で割り、その値の少数以下の桁を丸めることで、各DCT係数を量子化する。   The quantization unit 13 divides each DCT coefficient of the DCT coefficient table for each block output from the DCT processing unit 12 by a corresponding section width (referred to as a quantization width or a quantization step) of the quantization table, and the value Each DCT coefficient is quantized by rounding off the decimal places.

量子化代表値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.

Figure 2007221389
Figure 2007221389

で表される。ミッドトレッド型の線形量子化では、gは四捨五入の丸め処理を行う関数である。JPEGなどでは、   It is represented by In the mid-tread linear quantization, g is a function that performs rounding processing. In JPEG etc.

Figure 2007221389
Figure 2007221389

とΔを別々に符号化している。本明細書では説明の便宜上、数2で求まる値、すなわちDCT係数を量子化した値を量子化代表値と呼ぶ。 And Δ are encoded separately. In the present specification, for convenience of explanation, a value obtained by Equation 2, that is, a value obtained by quantizing a DCT coefficient is referred to as a quantized representative value.

DCT処理部12は、このようにして決定されたDCT係数の量子化代表値を格納した8×8のテーブル形式の量子化データテーブルをブロック毎に作成し、エントロピー符号化部14に出力する。   The DCT processing unit 12 creates an 8 × 8 table-format quantized data table storing the quantized representative values of the DCT coefficients determined in this way for each block, and outputs them to the entropy coding unit 14.

エントロピー符号化部14は、量子化部13から出力されたブロック毎の量子化データテーブルをハフマン符号表などを用いてエントロピー符号化し、ビットストリームを出力する。この際、最高周波数の係数位置まで連続するゼロの量子化代表値の列の長さ(ゼロランレングス)を考慮した符号化を行なうことにより、ビット数が効果的に低減される。   The entropy encoding unit 14 entropy-encodes the quantized data table for each block output from the quantization unit 13 using a Huffman code table or the like, and outputs a bit stream. At this time, the number of bits is effectively reduced by performing encoding in consideration of the length (zero run length) of a sequence of zero quantized representative values continuous up to the coefficient position of the highest frequency.

符号化データには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、CbまたはCr成分の画像データの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, when data is not inserted, a normal section width that divides the DCT coefficient D (m) of image data of Y, Cb, or Cr components is represented by the first quantization step Q1 (m), and when data is inserted. A section width for dividing the DCT coefficient D (m) of the Y component image 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、CbまたはCr成分画像データの量子化代表値R2(Z)からビット列の埋め込みを終了する量子化代表値R2 (Y)までの各々の最下位1ビットに、データのビット列の先頭から順に1ビットずつ埋め込む(0≦Z≦m≦Y≦X≦63)。   The data insertion unit 15 starts the embedding of a bit string of arbitrary data to be inserted from the quantized representative value R2 (Z) of the Y, Cb or Cr component image data, and finishes the embedding of the bit string. 1 bit is embedded in each least significant 1 bit in order from the beginning of the bit string of data (0 ≦ Z ≦ m ≦ Y ≦ X ≦ 63).

具体的には、データ挿入部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 data insertion unit 15 discards the quantization step Q1 (m) and the quantization representative value R1 (m) corresponding to the DCT coefficient D (m), and then corresponds to the DCT coefficient D (m). Set the quantization step to Q2 (m) so that the evenness (parity) of the rounding operation result value of the division result value D (m) / Q2 (m) corresponds to the data bit value (0 or 1) to be embedded Is set to the rounding direction of the division result value D (m) / Q2 (m), the value obtained by rounding the division result value D (m) / Q2 (m) in the set rounding direction is set to the DCT coefficient D (m) By setting the quantized representative value R2 (m), bits are inserted into each quantized representative value R2 (m).

以下では説明の簡略のため、あるブロックのある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.

本明細書では色差情報Cb、CrのDCT係数へのデータ挿入を開始するZ番目の係数位置は固定(すなわちZは所定の値)であるものとするが、無論、様々なパラメータに応じて可変にしてもよい。データ挿入を終了するY番目の係数位置(終了位置)は、本来のEOBの1つ前の係数位置(Y=X-1)であることが好ましく、本来のEOBの位置に依存して変化する。これは、本来のEOB以降にビットを挿入することで、ゼロランレングスが短くなり、符号化効率が低下するのを防止するためである。本来のEOBの位置がデータ埋め込み開始位置(ジグザグスキャン順序がZ番目の係数位置)よりも低周波数側であれば、データ挿入は行わない。   In this specification, the Z-th coefficient position at which data insertion into the DCT coefficients of the color difference information Cb and Cr starts is fixed (that is, Z is a predetermined value), but of course, it varies according to various parameters. It may be. The Yth coefficient position (end position) at which data insertion is terminated is preferably the coefficient position (Y = X-1) immediately before the original EOB, 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 1 bit of data can be inserted per block, but in this embodiment, 1 bit of data is inserted into each quantization representative value R2 (m) (0 ≦ Z ≦ m ≦ Y ≦ 63) of one block. 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 data insertion unit 15. In this figure, for convenience of explanation, the second quantization step Q2 (m) is 1 (Q1 (m) = Q2 (m) = 1) and is the same as the first quantization step Q1 (m). The result value D (m) / Q2 (m) is assumed to be within the range of -0.5 to 0.5.

データ挿入部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 data insertion unit 15 assumes that the bit value to be inserted is “0” and the division result value D (m) / Q2 (m) is −0.5 <D (m) / Q2 (m) ≦ 0. Is set to + ∞ side, and the quantization representative value is changed from R1 (m) to even R2 (m) = 0 in the nearest neighborhood of the division result value D (m) / Q2 (m). Also, if the bit value to be inserted is “0” 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), is changed to an even number R2 (m) = 0 in the nearest neighborhood of the division result value D (m) / Q2 (m). These rounding operations correspond to so-called rounding, and the error that occurs when the quantization representative value is changed from R1 (m) to R2 (m) is half of the first quantization step Q1 (m) (= 0.5). It is less than or equal to the rounding error at the time of quantization in the first quantization step Q1 (m) (rounding error due to rounding of the division result value D (m) / Q1 (m)).

一方、挿入すべきビット値が「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,

Figure 2007221389
Figure 2007221389

を満足するよう第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

Figure 2007221389
Figure 2007221389

である。 It is.

ただし、数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 Equation 3 or Equation 4, the quantized representative value R2 (m) after the change on the high frequency side is a non-zero value. The probability that a zero run length will occur until a new EOB is reduced or the zero run length is shortened as compared with the quantization in the first quantization step Q1 (m). For this reason, the encoding efficiency is lowered and the JPEG file is lengthened.

このため、本実施形態では、第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)

Figure 2007221389
Figure 2007221389

とし、Q1(m)を小さくする分母を71/2から2へ順次変化させる。あるいは、
And the denominator for decreasing Q1 (m) is sequentially changed from 71/2 to 2. Or

Figure 2007221389
Figure 2007221389

とし、Q1(m)を小さくする分母を71/2から1へ順次変化させてもよい。
あるいは、k<Yとなる定数kを予め設定しておき、
And the denominator for decreasing Q1 (m) may be sequentially changed from 71/2 to 1.
Alternatively, a constant k that satisfies k <Y is set in advance,

Figure 2007221389
Figure 2007221389

とし、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 Equations 5 to 7 is defined as a second quantization step Q2 (m), and Q2 ( Increase the value of m) in zigzag order. In this way, the probability that the quantized representative value R2 (m) on the high frequency side will be a value other than 0 compared to the quantized representative value R1 (m) due to the quantization in the second quantization step Q2 (m). As a result, the zero run length is shortened as data is inserted, and the JPEG file can be prevented from becoming too long.

さて、上述のように、量子化代表値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.

さて、本実施形態のデータ挿入部15は、Y成分のDCT係数に対してデータ挿入を開始するZ番目の係数位置(開始位置)を、Cb、Cr成分のEOBの係数位置に応じて決定する。   The data insertion unit 15 of the present embodiment determines the Z-th coefficient position (start position) at which data insertion is started for the Y-component DCT coefficient in accordance with the coefficient position of the Cb and Cr component EOB. .

具体的には、データ挿入部15は、CbデータのEOBの係数位置に相当するYデータのDCT係数の位置か、CrデータのEOBの係数位置に対応するYデータのDCT係数の位置のうち、高周波数の方の係数位置を開始位置に決定する。   Specifically, the data insertion unit 15 includes the position of the DCT coefficient of the Y data corresponding to the EOB coefficient position of the Cb data or the position of the DCT coefficient of the Y data corresponding to the coefficient position of the EOB of Cr data. The coefficient position of the higher frequency is determined as the start position.

図4は、4:1:1フォーマットの画像データにおける、CbデータのEOB、CrデータのEOBおよびYデータの開始位置の関係を示す。4:1:1フォーマットの画像データでは、1つの最小符号化単位(MCU)において、色差信号Cb、Crの1ブロックが輝度信号Yの4ブロックに相当する。色差信号のEOBの係数位置を、水平方向の周波数成分の位置xおよび垂直方向の周波数成分の位置yによって、
色差信号CbのEOB=(X1,Y1)
色差信号CrのEOB=(X2,Y2)
と表したとする。
FIG. 4 shows the relationship between the start positions of COB data EOB, Cr data EOB, and Y data in 4: 1: 1 format image data. In 4: 1: 1 format image data, one block of the color difference signals Cb and Cr corresponds to four blocks of the luminance signal Y in one minimum coding unit (MCU). The coefficient position of the EOB of the color difference signal is determined by the position x of the horizontal frequency component and the position y of the vertical frequency component.
EOB of color difference signal Cb = (X1, Y1)
EOB of color difference signal Cr = (X2, Y2)
It is assumed that

説明の簡略のため、例えば、色差信号CbのEOBの位置よりも色差信号CrのEOBの位置の方が高周波数側であるとすると(X1<X2,Y1<Y2)、色差信号のEOBの位置に相当する輝度信号の開始位置は、(X2/2,Y2/2)となる。   For the sake of simplicity, for example, assuming that the EOB position of the color difference signal Cr is higher in frequency than the EOB position of the color difference signal Cb (X1 <X2, Y1 <Y2), the position of the EOB of the color difference signal The start position of the luminance signal corresponding to is (X2 / 2, Y2 / 2).

図5は、4:2:2フォーマットの画像データにおける、CbデータのEOB、CrデータのEOBおよびYデータ開始位置の関係を示す。4:2:2フォーマット(色差データの間引き方向は水平方向とする)の画像データでは、1つの最小符号化単位(MCU)において、色差信号Cb、Crの2ブロックが輝度信号Yの4ブロックに相当する。色差信号のEOBの位置を、水平方向の周波数成分の位置(ブロック数)xおよび垂直方向の周波数成分の位置y(ブロック数)によって、
色差信号CbのEOB=(X1,Y1)
色差信号CrのEOB=(X2,Y2)
と表したとする。
FIG. 5 shows the relationship between the EOB of Cb data, the EOB of Cr data, and the Y data start position in 4: 2: 2 format image data. In the image data of 4: 2: 2 format (the thinning direction of color difference data is horizontal), two blocks of color difference signals Cb and Cr are changed to four blocks of luminance signal Y in one minimum coding unit (MCU). Equivalent to. The position of the EOB of the color difference signal is determined by the position (number of blocks) x of the frequency component in the horizontal direction and the position y (number of blocks) of the frequency component in the vertical direction.
EOB of color difference signal Cb = (X1, Y1)
EOB of color difference signal Cr = (X2, Y2)
It is assumed that

色差信号CbのEOBよりも色差信号CrのEOBの方が高周波数側であるとすると(X1<X2,Y1<Y2)、色差信号のEOBに相当する開始位置の位置は、(X2/2,Y2)となる。   If the EOB of the color difference signal Cr is higher in frequency than the EOB of the color difference signal Cb (X1 <X2, Y1 <Y2), the position of the start position corresponding to the EOB of the color difference signal is (X2 / 2, Y2).

データ挿入部15は、Y成分のDCT係数にデータを挿入し、かつ色差信号Cbと色差信号Crの双方にデータを挿入する場合、Y成分のDCT係数に関して、上述のように開始位置を決定し、開始位置からデータを挿入する。   When inserting data into both the color difference signal Cb and the color difference signal Cr, the data insertion unit 15 determines the start position for the Y component DCT coefficient as described above. Insert data from the start position.

なお、データ挿入部15は、Y成分のDCT係数にデータを挿入し、かつ色差信号Cbのみにデータを挿入する場合は、色差信号CrのEOB=(0,0)として開始位置を決定し、開始位置からデータを挿入する。同様に、データ挿入部15は、Y成分のDCT係数にデータを挿入し、かつ色差信号Crのみにデータを挿入する場合は、色差信号CbのEOB=(0,0)として開始位置を決定し、開始位置からデータを挿入する。これは、データ挿入を行わない方の色差成分の雑音電力を開始位置の決定の際に考慮する必要がないからである。   The data insertion unit 15 determines the start position as EOB = (0, 0) of the color difference signal Cr when inserting data into the DCT coefficient of the Y component and inserting data only into the color difference signal Cb. Insert data from the start position. Similarly, the data insertion unit 15 determines the start position as EOB = (0,0) of the color difference signal Cb when inserting data into the DCT coefficient of the Y component and inserting data only into the color difference signal Cr. Insert data from the start position. This is because it is not necessary to consider the noise power of the color difference component for which data insertion is not performed when determining the start position.

また、データ挿入部15は、あるMCUの輝度信号に関して決定された開始位置が、本来のEOBの位置と同じかそれよりも高周波数側であれば、データ挿入を行わない。こうすれば、本来のEOBの位置以降の位置にデータが埋め込まれてEOBが高周波数側に移動しゼロランレングスが発生する確率が低くなり符号化効率が低下することもない。   Further, the data insertion unit 15 does not perform data insertion if the start position determined with respect to the luminance signal of a certain MCU is the same as or higher than the original EOB position. In this way, there is no possibility that the data is embedded at a position after the original EOB position, the EOB moves to the high frequency side, and zero run length is generated, and the coding efficiency is not lowered.

また、データ挿入部15は、あるMCUの輝度信号に関して決定された開始位置が、終了位置よりも高周波数側に存在する場合、そのMCUの輝度信号にはデータ挿入を行わない。   Further, when the start position determined for the luminance signal of a certain MCU exists on the higher frequency side than the end position, the data insertion unit 15 does not insert data into the luminance signal of that MCU.

このように開始位置を決定した上でデータ挿入を行う効果は、次のとおりである。   The effect of inserting data after determining the start position in this way is as follows.

エントロピー符号化14によって符号化されるべき本来の輝度Y、色差CbおよびCrに、データ挿入部15がデータを挿入することにより、輝度Y、色差CbおよびCrにそれぞれ雑音成分ey、pecr、qecbが加わり、Y’, Cr’, Cb’に変化したとする(p、qは定数)。 The data insertion unit 15 inserts data into the original luminance Y, color differences Cb and Cr to be encoded by the entropy encoding 14, so that noise components e y , pe cr , Assume that qe cb is added and changes to Y ′, Cr ′, and Cb ′ (p and q are constants).

すなわち、
Y’=Y+ey
Cr’=Cr+p・ecr
Cb’=Cb+p・ecb
とする。
That is,
Y '= Y + e y
Cr '= Cr + p ・ e cr
Cb '= Cb + p ・ e cb
And

このとき、不図示の復号化装置側でデコードされる色情報R’、G’、B’は以下のようになる。   At this time, the color information R ′, G ′, and B ′ decoded on the decoding device side (not shown) are as follows.

R’=Y’+Cr’/p=Y+R-Y+ey+ecr=R+ey+ecr
G’=Y’-(a/p・Cr’+c/q・Cb’)/b=Y-(a/p・Cr+c/q・Cb)/b+ey-(a・ecr+c・ecb)/b=G+ey-(a・ecr+c・ecb)/b
B’=Y’+Cb’/q=Y+B-Y+ey+ecr=B+ey+ecb
R '= Y' + Cr '/ p = Y + R-Y + e y + e cr = R + e y + e cr
G '= Y'-(a / p ・ Cr '+ c / q ・ Cb') / b = Y- (a / p ・ Cr + c / q ・ Cb) / b + e y- (a ・ e cr + c ・ e cb ) / b = G + e y- (a ・ e cr + c ・ e cb ) / b
B '= Y' + Cb '/ q = Y + B-Y + e y + e cr = B + e y + e cb

人間の視覚特性に近い色空間の一つ、HSVを使うと、明度(明るさ)はRGBのうち最も大きいものである。上記R’G’B’の中で最も大きいものを明度とし、データ挿入されたDCT係数の周波数に応じて変化する雑音成分を、輝度によるeyと色差によるec(ecr、ecbまたは-(aecr+c ecbb)/b)を使ってey+ecと表すことにする。このとき、eyとecとが互いに無相関だとすると、雑音電力はE[ey ]+E[ec ]である。 When HSV, one of the color spaces close to human visual characteristics, is used, brightness (brightness) is the largest among RGB. The largest of the above R′G′B ′ is the brightness, and the noise component that changes according to the frequency of the DCT coefficient into which the data has been inserted is expressed as e y by luminance and e c (e cr , e cb or by color difference). -(ae cr + ce cbb ) / b) is used to express e y + e c . At this time, if e y and e c are uncorrelated with each other, the noise power is E [e y 2 ] + E [e c 2 ].

図6に示すように、雑音電力が突出するDCT係数の周波数が輝度Yと色差Cで重なっていると、輝度Yと色差Cの合計の雑音電力が、画質劣化を検知されない雑音電力の範囲Zを超えてしまう場合がある。   As shown in FIG. 6, when the frequency of the DCT coefficient at which the noise power protrudes overlaps with the luminance Y and the color difference C, the total noise power of the luminance Y and the color difference C is within the noise power range Z in which image quality degradation is not detected. May be exceeded.

ある周波数で突出している雑音電力を合わせても雑音電力の許容範囲に収めるために、データを挿入すべき輝度、色差のDCT係数の量子化幅を小さくすることも考えられる。しかし、JPEGやMPEG等の圧縮規格上小さくするにも限界があるし、ファイルサイズ増大を招く弊害も大きい。   In order to keep the noise power that protrudes at a certain frequency within the allowable range of noise power, it is also conceivable to reduce the quantization width of the DCT coefficient of luminance and color difference into which data is to be inserted. However, there is a limit to the reduction in compression standards such as JPEG and MPEG, and the adverse effect of increasing the file size is great.

このため、図7に示すように、本実施形態では、色差成分のEOBに相当する輝度成分のDCT係数からデータ埋め込みをすることによって、雑音電力が突出する周波数が輝度と色差で重ならず、輝度Yと色差Cで合算した雑音電力Sを、画質劣化を検知されない雑音電力Zの範囲内に収めることができる。   For this reason, as shown in FIG. 7, in this embodiment, by embedding data from the DCT coefficient of the luminance component corresponding to the color difference component EOB, the frequency at which the noise power protrudes does not overlap with the luminance and the color difference. The noise power S added by the luminance Y and the color difference C can be kept within the range of the noise power Z in which no image quality deterioration is detected.

画像圧縮符号化装置のブロック図Block diagram of image compression encoding device JPEGデータ量子化におけるデータ挿入の概念説明図Conceptual diagram of data insertion in JPEG data quantization 量子化代表値の最下位1ビット変更によるデータ挿入の概念説明図Conceptual illustration of data insertion by changing the least significant 1 bit of the quantized representative value 色差EOBに相当する輝度DCT係数位置(4:1:1)の一例を示す図The figure which shows an example of the brightness | luminance DCT coefficient position (4: 1: 1) equivalent to color difference EOB. 色差EOBに相当する輝度DCT係数位置(4:2:2)の一例を示す図The figure which shows an example of the brightness | luminance DCT coefficient position (4: 2: 2) equivalent to color difference EOB. 輝度雑音レベルと色差雑音レベルの合計が雑音電力の許容範囲を超える状態を示す図Diagram showing the state where the sum of luminance noise level and color difference noise level exceeds the allowable range of noise power 色差EOBに相当する位置の輝度DCT係数からデータが挿入されることでEOB輝度雑音レベルと色差雑音レベルの合計が雑音電力の許容範囲内に収まる状態を概念的に示す図The figure which shows notionally the state where the sum of an EOB brightness | luminance noise level and a color difference noise level is settled in the tolerance | permissible_range of noise power by inserting data from the brightness | luminance DCT coefficient of the position corresponded to color difference EOB.

符号の説明Explanation of symbols

10:画像信号出力部、11:画像データ作成部、12:DCT処理部、13:量子化部、14:エントロピー符号化部、15:データ挿入部 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

Claims (8)

画像データを輝度成分および色差成分に変換するYC変換部と、輝度成分および色差成分をそれぞれ複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するDCT変換部と、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定する量子化部と、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化する符号化部とを備える画像圧縮符号化装置であって、
前記量子化部は、前記YC変換部の変換した色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定した上、前記開始位置からデータ挿入を終了する所定の高周波数側の方の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで前記量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、前記輝度成分のDCT係数の量子化代表値に前記任意のデータを挿入する画像圧縮符号化装置。
A YC conversion unit that converts image data into a luminance component and a color difference component, and a DCT conversion unit that blocks each of the luminance component and the color difference component into a plurality of blocks and calculates a DCT (discrete cosine transform) coefficient for each block A quantization unit that determines 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, and a quantization representative value of each DCT coefficient A compression data encoding device comprising a coding unit that creates a quantized data table that stores and encodes the quantized data table,
The quantization unit determines a position of a DCT coefficient of a luminance component corresponding to an EOB (End of Block) of a color difference component converted by the YC conversion unit as a start position that is a low frequency side position at which data insertion is started. In addition, a division result value that is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position that is a predetermined high-frequency side where the data insertion ends is divided by the corresponding quantization width. By changing the rounding direction, each least significant bit of the quantized representative value is changed to a bit constituting arbitrary data to be inserted, and the arbitrary data is converted into the quantized representative value of the DCT coefficient of the luminance component. An image compression encoding device for inserting the image.
前記YC変換部は、前記画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crに変換し、
前記量子化部は、前記DCT係数の直流成分の位置を原点として前記DCT係数の交流成分の水平方向の周波数成分の位置および前記DCT係数の交流成分の垂直方向の周波数成分の位置を示す2次元座標系(x,y)において、前記YC変換部の変換した青み色差成分CbのEOB(End of Block)および赤み色差成分CrのEOB(End of Block)の内高周波数側の方の位置(X,Y)に相当する輝度成分の位置を開始位置に決定する請求項1に記載の画像圧縮符号化装置。
The YC converter converts the image data into a luminance component Y, a blue color difference component Cb, and a red color difference component Cr,
The quantization unit is a two-dimensional indicating a position of a horizontal frequency component of the AC component of the DCT coefficient and a position of a vertical frequency component of the AC component of the DCT coefficient with the position of the DC component of the DCT coefficient as an origin. In the coordinate system (x, y), the position on the inner high frequency side of the EOB (End of Block) of the blue color difference component Cb and the EOB (End of Block) of the red color difference component Cr converted by the YC conversion unit (X , Y) The image compression encoding apparatus according to claim 1, wherein a position of a luminance component corresponding to Y, Y) is determined as a start position.
前記YC変換部は、前記画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crにそれぞれ4:1:1の割合で変換し、
前記量子化部は、前記2次元座標系における前記位置(X,Y)に相当する輝度成分の位置(X/2,Y/2)を開始位置に決定する請求項2に記載の画像圧縮符号化装置。
The YC converter converts the image data into a luminance component Y, a blue color difference component Cb, and a red color difference component Cr at a ratio of 4: 1: 1,
The image compression code according to claim 2, wherein the quantization unit determines a position (X / 2, Y / 2) of a luminance component corresponding to the position (X, Y) in the two-dimensional coordinate system as a start position. Device.
前記YC変換部は、前記画像データを輝度成分Y、青み色差成分Cbおよび赤み色差成分Crにそれぞれ水平方向に4:2:2の割合で変換し、
前記量子化部は、前記2次元座標系における前記位置(X,Y)に相当する輝度成分の位置(X/2,Y)を開始位置に決定する請求項2に記載の画像圧縮符号化装置。
The YC conversion unit converts the image data into a luminance component Y, a blue color difference component Cb, and a red color difference component Cr in a horizontal ratio of 4: 2: 2, respectively.
The image compression encoding apparatus according to claim 2, wherein the quantization unit determines a position (X / 2, Y) of a luminance component corresponding to the position (X, Y) in the two-dimensional coordinate system as a start position. .
前記量子化部は、データ挿入を開始する所定の低周波数側の係数位置である開始位置からデータ挿入を終了する所定の高周波数側の係数位置である終了位置までの色差成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで前記量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、前記色差成分のDCT係数の量子化代表値に前記任意のデータを挿入する請求項1〜4のいずれかに記載の画像圧縮符号化装置。   Each of the quantizers each of the DCT coefficients of the color difference components from a start position which is a predetermined low frequency side coefficient position where data insertion is started to an end position which is a predetermined high frequency side coefficient position which ends data insertion. By changing the rounding direction of the division result value, which is a value obtained by dividing the value by the corresponding quantization width, to change the least significant 1 bit of the quantized representative value to bits constituting arbitrary data to be inserted, The image compression encoding apparatus according to claim 1, wherein the arbitrary data is inserted into a quantized representative value of a DCT coefficient of the color difference component. 画像データの色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定した上、前記開始位置からデータ挿入を終了する所定の高周波数側の方の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで前記量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、前記輝度成分のDCT係数の量子化代表値に前記任意のデータを挿入するデータ挿入装置。   The position of the DCT coefficient of the luminance component corresponding to the EOB (End of Block) of the color difference component of the image data is determined as the start position on the low frequency side where data insertion is started, and data insertion is performed from the start position. The quantization is performed by changing the rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the luminance component up to the end position, which is a position on the predetermined high frequency side to be ended, by the corresponding quantization width. A data insertion device that changes each least significant bit of a representative value to a bit constituting arbitrary data to be inserted, and inserts the arbitrary data into a quantized representative value of a DCT coefficient of the luminance component. 画像データを輝度成分および色差成分に変換するYC変換部と、輝度成分および色差成分をそれぞれ複数のブロックに分割するブロック化を行い、ブロック毎にDCT(離散コサイン変換)係数を算出するDCT変換部と、各ブロックのDCT係数を対応する量子化幅で除算した値である除算結果値を丸めることで各DCT係数の量子化代表値を決定する量子化部と、各DCT係数の量子化代表値を格納した量子化データテーブルを作成し、量子化データテーブルを符号化する符号化部とを備える画像圧縮符号化装置で用いられる画像圧縮符号化方法あって、
前記YC変換部の変換した色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定するステップと、
前記開始位置からデータ挿入を終了する所定の高周波数側の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで前記量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、前記輝度成分のDCT係数の量子化代表値に前記任意のデータを挿入するステップと、
を含む画像圧縮符号化方法。
A YC conversion unit that converts image data into a luminance component and a color difference component, and a DCT conversion unit that blocks each of the luminance component and the color difference component into a plurality of blocks and calculates a DCT (discrete cosine transform) coefficient for each block A quantization unit that determines 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, and a quantization representative value of each DCT coefficient An image compression encoding method used in an image compression encoding apparatus including an encoding unit that encodes the quantization data table,
Determining a position of a DCT coefficient of a luminance component corresponding to an EOB (End of Block) of a color difference component converted by the YC conversion unit as a start position which is a position on a low frequency side where data insertion is started;
The rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position, which is a predetermined high frequency side position where data insertion ends, is divided by the corresponding quantization width. Changing each of the least significant 1 bit of the quantized representative value to a bit constituting arbitrary data to be inserted, and inserting the arbitrary data into the quantized representative value of the DCT coefficient of the luminance component; ,
A method for compressing and encoding images.
画像データの色差成分のEOB(End of Block)に相当する輝度成分のDCT係数の位置を、データ挿入を開始する低周波数側の位置である開始位置に決定するステップと、
前記開始位置からデータ挿入を終了する所定の高周波数側の位置である終了位置までの輝度成分のDCT係数の各々を対応する量子化幅で除算した値である除算結果値の丸め方向を変更することで前記量子化代表値の最下位1ビットの各々を挿入すべき任意のデータを構成するビットに変更し、前記輝度成分のDCT係数の量子化代表値に前記任意のデータを挿入するステップと、
を含むデータ挿入方法。
Determining the position of the DCT coefficient of the luminance component corresponding to EOB (End of Block) of the color difference component of the image data as a start position which is a position on the low frequency side where data insertion is started;
The rounding direction of the division result value, which is a value obtained by dividing each of the DCT coefficients of the luminance component from the start position to the end position that is a predetermined high frequency side position at which data insertion is ended, divided by the corresponding quantization width is changed. Changing each of the least significant 1 bit of the quantized representative value to a bit constituting arbitrary data to be inserted, and inserting the arbitrary data into the quantized representative value of the DCT coefficient of the luminance component; ,
Data insertion method including
JP2006038632A 2006-02-15 2006-02-15 Data inserting device and method, and image compressing coding device and method Pending JP2007221389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006038632A JP2007221389A (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
JP2006038632A JP2007221389A (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
JP2007221389A true JP2007221389A (en) 2007-08-30

Family

ID=38498173

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006038632A Pending JP2007221389A (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) JP2007221389A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170045153A (en) * 2017-01-10 2017-04-26 (주)다올소프트 Method for Inserting Copyright's Information based on Virtual Insertion
KR20170045154A (en) * 2017-01-31 2017-04-26 (주)다올소프트 Method for Inserting Copyright's Information into Video Content based on Virtual Insertion

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170045153A (en) * 2017-01-10 2017-04-26 (주)다올소프트 Method for Inserting Copyright's Information based on Virtual Insertion
KR101871796B1 (en) * 2017-01-10 2018-06-28 (주)다올소프트 Method for Inserting Copyright's Information based on Virtual Insertion
KR20170045154A (en) * 2017-01-31 2017-04-26 (주)다올소프트 Method for Inserting Copyright's Information into Video Content based on Virtual Insertion
KR101871797B1 (en) * 2017-01-31 2018-06-28 (주)다올소프트 Method for Inserting Copyright's Information into Video Content based on Virtual Insertion

Similar Documents

Publication Publication Date Title
US7822282B2 (en) Moving image coding apparatus, moving image decoding apparatus, control method therefor, computer program, and computer-readable storage medium
TWI711301B (en) Video decoding method, computer software, machine-readable non-transitory storage medium, encoding apparatus, video decoding apparatus, and video capture, display, transmission, reception and/or storage apparatus
KR101223983B1 (en) Bitrate reduction techniques for image transcoding
EP3080988B1 (en) Parameter derivation for entropy coding of a syntax element
WO2010004726A1 (en) Image coding method, image decoding method, image coding device, image decoding device, program, and integrated circuit
JP4360416B2 (en) Image compression method, image compression apparatus, and program
US20080193028A1 (en) Method of high quality digital image compression
JP6502739B2 (en) Image coding apparatus, image processing apparatus, image coding method
US20070019875A1 (en) Method of further compressing JPEG image
US8315471B2 (en) Image processor
US9148672B2 (en) Method and apparatus for residue transform
EP2222087A1 (en) Bit depth upscaling in RGB colour space for reducing propagation of errors due to transformation to YUV colour space
US10477219B2 (en) Image-processing apparatus and lossless image compression method using intra-frame prediction
US20070025630A1 (en) Method and apparatus of image compression
US8712170B2 (en) Image-processing method and program, and image-processing apparatus
US20040006582A1 (en) Digital image coding device and method
US8233729B2 (en) Method and apparatus for generating coded block pattern for highpass coefficients
US20060278725A1 (en) Image encoding and decoding method and apparatus, and computer-readable recording medium storing program for executing the method
JP3469438B2 (en) Image signal processing method and apparatus, recording medium
JP5309046B2 (en) Encoding device and program
JP2007221389A (en) Data inserting device and method, and image compressing coding device and method
JP2016092589A (en) Encoder and control method therefor
US8494293B2 (en) Image processor
US20040252894A1 (en) Image compression apparatus and image processing system
JP2007221387A (en) Data inserting device and method, and image compressing coding device and method