JP2010016529A - Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein - Google Patents

Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein Download PDF

Info

Publication number
JP2010016529A
JP2010016529A JP2008173377A JP2008173377A JP2010016529A JP 2010016529 A JP2010016529 A JP 2010016529A JP 2008173377 A JP2008173377 A JP 2008173377A JP 2008173377 A JP2008173377 A JP 2008173377A JP 2010016529 A JP2010016529 A JP 2010016529A
Authority
JP
Japan
Prior art keywords
data
digital watermark
dct
jpeg
embedding
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
JP2008173377A
Other languages
Japanese (ja)
Inventor
Atsushi Katayama
淳 片山
Akira Kitahara
亮 北原
Harumi Kawamura
春美 川村
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2008173377A priority Critical patent/JP2010016529A/en
Publication of JP2010016529A publication Critical patent/JP2010016529A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for embedding a digital watermark for alteration detection, which is capable of detecting alteration of video images by embedding the digital watermark without spoiling the beauty. <P>SOLUTION: An input video image is subjected to YCbCr conversion, down-sampling, DCT, and DCT coefficient quantization in normal JPEG coding process (S31, S32), and redundancy is given to digital watermark data to obtain error detection code data (S33, S34), and this data is converted to encrypted code data (S35) by a prescribed encryption method, and DCT blocks of a selected color component are divided into groups (S36, S37), and the encrypted code data is embedded into the DCT block belonging to each group (S41), and entropy compression of quantization coefficients after the completion of embedding is performed in the same manner as the normal JPEG coding process, and the result is shaped so as to conform to a prescribed JPEG format, and thus JPEG coding is completed (S42, S43). <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、デジタル映像記録装置に係り、改ざん検出用電子透かし埋め込み方法、装置、プログラムおよび電子透かしを用いた改ざん検出方法、装置、プログラムならびにそれらプログラムを記録した記録媒体に関する。   The present invention relates to a digital video recording apparatus, and more particularly to an alteration detection digital watermark embedding method, apparatus, program, falsification detection method using an electronic watermark, apparatus, program, and a recording medium on which these programs are recorded.

近年、デジタルカメラやカメラ付き携帯電話機の普及により、誰もが手軽にデジタル写真映像を撮影できるようになった。デジタルカメラやカメラ付き携帯電話機でのデジタル映像の保持方式はその圧縮率の高さと画質のトレードオフ性が良好であることから、JPEG符号化形式がデファクトスタンダードとなっている。一部の機種ではJPEG2000符号化や非圧縮映像で保持することができるものもあるが、最も普及しているのはJPEG符号化方式である。   In recent years, with the widespread use of digital cameras and camera-equipped mobile phones, it has become possible for anyone to easily take digital photo images. The digital video holding method in a digital camera or a camera-equipped mobile phone has a high compression ratio and a good trade-off between image quality, so the JPEG encoding format is the de facto standard. Some models can hold JPEG2000 encoded or uncompressed video, but the most popular is the JPEG encoding method.

デジタルカメラ、特にカメラ付き携帯電話機は手軽に撮影可能なため、これを用いて撮影したデジタル映像を動産担保の証拠としたり、交通事故の証拠としたり、建築現場での工程証明としたり、ゴミ処理場で正しく処理した証明としたりしたいというニーズがある。またデジタルカメラではないが類似するものとしてはドライブレコーダーがあり、撮影された映像は交通事故の参考証拠として用いられる。   Digital cameras, especially camera-equipped mobile phones, can be easily photographed, so digital images taken with them can be used as evidence of personal property security, evidence of traffic accidents, process proofs at construction sites, and garbage disposal. There is a need to make a proof that was correctly processed in the field. A similar but not digital camera is a drive recorder, and the video taken is used as reference evidence of a traffic accident.

これに対して、証拠性を高めるために、デジタル映像に電子透かしを付加し、電子透かしが壊れずに入っているかどうかで映像の信憑性を高める手段が提案されている(非特許文献1参照)。
「その他参考情報JPEG」,2008年6月19日検索,インターネットURL<http://www.jpo.go.jp/shiryou/s_sonota/hyoujun_gijutsu/denshi_sukashi/1_a_4_1.htm> 「お絵描き研究室:JPEG(原理編1,2,3)」,2008年6月19日検索,インターネットURL<http://webs.lanset.com/crazy17/jp/lab/jpeg1.htm> 書籍「やり直しのための工業数学,情報通信と信号解析・暗号,誤り訂正符号,積分変換」,三谷政昭著,CQ出版社,ISBN4−7898−3318−6 仕様書「128ビットブロック暗号Camelliaアルゴリズム仕様書 第2.0版」,青木和麻呂他著,日本電信電話株式会社,三菱電機株式会社,2001年9月26日 仕様書,“Announcing the ADVACED ENCRYPTION STANDARD(AES)”,Federal Information Processing Standards Publication 197,November 26,2001
On the other hand, in order to enhance the evidence, a means for adding a digital watermark to a digital video and improving the credibility of the video depending on whether the digital watermark is not broken is proposed (see Non-Patent Document 1). ).
“Other Reference Information JPEG”, searched on June 19, 2008, Internet URL <http: // www. jpo. go. jp / shiryou / s_sonota / hyyoujun_gijutsu / denshi_sukawa / 1 / 1_a_4_1. htm> “Drawing Laboratory: JPEG (Principle 1, 2, 3)”, retrieved on June 19, 2008, Internet URL <http: // webs. lanset. com / crazy17 / jp / lab / jpeg1. htm> Book “Industrial Mathematics for Redoing, Information Communication and Signal Analysis / Cryptography, Error Correcting Code, Integral Transformation”, Masaaki Mitani, CQ Publisher, ISBN 4-7898-3318-6 Specification “128-bit block cipher Camellia algorithm specification version 2.0”, Kazuo Aoki et al., Nippon Telegraph and Telephone Corporation, Mitsubishi Electric Corporation, September 26, 2001 Specification, “Announcing the ADVACED ENCRYPTION STANDARD (AES)”, Federal Information Processing Standards Publication 197, November 26, 2001

しかしながら、デジタル映像は複製や編集が容易であるという性質があるために、映像が改ざんされていないかを証明するのが難しく、法律上は参考証拠に留まっており、決定的な証拠にはなり得ないという問題があった。   However, because digital video has the property of being easily duplicated and edited, it is difficult to prove whether the video has been tampered with. There was a problem of not getting.

また、非特許文献1に記載の方法では量子化係数のゼロラン部直前に値の大きな(>1)透かしデータを埋め込むため透かし埋め込みによる画質劣化が大きいという問題があった。画質劣化が大きいと証拠写真としての信憑性が下がるため望ましくない。   Further, the method described in Non-Patent Document 1 has a problem that image quality deterioration due to watermark embedding is large because watermark data having a large value (> 1) is embedded immediately before the zero-run portion of the quantization coefficient. Large deterioration in image quality is undesirable because it reduces the authenticity of evidence photographs.

本発明は上記課題を解決するものであり、その目的は、改ざん検出用の電子透かしを美観を損ねることなく埋め込むことができ、映像の改ざんを検出することができる改ざん検出用電子透かし埋め込み方法、装置、プログラムおよび電子透かしを用いた改ざん検出方法、装置、プログラムならびにそれらプログラムを記録した記録媒体を提供することにある。   The present invention solves the above-mentioned problems, and its purpose is to embed a digital watermark for falsification detection without damaging the aesthetics, and to detect a falsification of a video, It is an object to provide an apparatus, a program, and a falsification detection method using an electronic watermark, an apparatus, a program, and a recording medium on which the program is recorded.

本発明は、通常のJPEG符号化およびJPEG復号化の技術(非特許文献2参照)と密接に関わっている。   The present invention is closely related to ordinary JPEG encoding and JPEG decoding techniques (see Non-Patent Document 2).

通常のJPEG符号化工程は、図1(a)のフローチャートに沿って実行される。まず、デジタル映像を入力し(ステップS11)、画像をYCbCr(輝度スカラ(Y)・色相ベクトル(CbCr))変換する(ステップS12)。   A normal JPEG encoding process is executed according to the flowchart of FIG. First, a digital video is input (step S11), and the image is converted to YCbCr (luminance scalar (Y) / hue vector (CbCr)) (step S12).

次にステップS13においてダウンサンプリング処理によりCb,Crの情報を削減した後、DCT(Discrate Cosine Transform;離散コサイン変換)処理を行ってDCT係数を得る(ステップS14)。   In step S13, Cb and Cr information is reduced by down-sampling processing, and then DCT (Discrete Cosine Transform) processing is performed to obtain DCT coefficients (step S14).

次にDCT係数を量子化し(ステップS15)、エントロピー圧縮を行い(ステップS16)、所定のJPEGフォーマット、例えばJFIF(JPEG File Interchange Format)に適合するよう整形を行う(ステップS17)。   Next, the DCT coefficient is quantized (step S15), entropy compression is performed (step S16), and shaping is performed so as to conform to a predetermined JPEG format, for example, JFIF (JPEG File Interchange Format) (step S17).

また通常のJPEG復号化工程は図1(b)のフローチャートに沿って実行される。まずJPEG符号化されたデジタル映像データを入力し(ステップS21)、JFIF形式からデータ列へ整形する(ステップS22)。   The normal JPEG decoding process is executed according to the flowchart of FIG. First, JPEG-encoded digital video data is input (step S21), and the JFIF format is converted into a data string (step S22).

次にステップS23においてエントロピー復号し、逆量子化(ステップS24)および逆DCT(ステップS25)を行った後、必要があれば色空間変換を行う(ステップS26)。   Next, entropy decoding is performed in step S23, inverse quantization (step S24) and inverse DCT (step S25) are performed, and color space conversion is performed if necessary (step S26).

本発明における映像への電子透かし埋め込み方法は、映像を8×8サンプリング画素のブロック(DCTブロックと呼ぶ)に分けて各々のブロックに1bitを割り当てて電子透かしデータを誤り検出符号化かつ暗号化したbitを埋め込むことが基本である。   In the method of embedding a digital watermark in a video according to the present invention, the video is divided into blocks of 8 × 8 sampling pixels (referred to as DCT blocks), and 1 bit is assigned to each block, and the digital watermark data is encoded with error detection encoding and encryption. It is basic to embed bits.

電子透かしデータのbitは直接DCTブロックへは対応させずに、一度誤り検出符号化して冗長性を持たせてから対応させる。誤り検出符号を用いることにより、何も埋め込んでいないのに偶然埋め込んだことと同じ結果が得られることを防ぐ、および復号時に元の電子透かしデータを知ることなく誤り(改ざん)の有無を知るという2つのメリットが得られる。   The bit of the digital watermark data does not correspond directly to the DCT block but is made to correspond after error detection coding is performed once to provide redundancy. By using an error detection code, it is possible to prevent obtaining the same result as if it was accidentally embedded even if nothing was embedded, and to know whether there was an error (falsification) without knowing the original digital watermark data at the time of decoding Two benefits are obtained.

映像に含まれるDCTブロックの総数は一般に大きい(VGA映像の輝度成分で4800個)ので、DCTブロックをグループに分けて1グループ中で独立に誤り検出符号化するようにする。これにより、誤りがあった場合はその誤りが含まれるグループを特定でき、誤り(改ざん)の場所を知るというメリットが得られる
DCTブロック内の量子化係数の変調方法では、量子化係数の絶対値の最大値と、その最大値を除いた量子化係数中から乱数発生手段により1つ選んだ基準値を用いる。量子化係数の絶対値の最大値に−Kあるいは0あるいはK(Kは任意の正奇数)を加える操作により基準値との差分の偶奇を調整する。この方法の利点は元々値の大きい係数に小変分のみを与えるため量子化係数の変化が少なく、埋め込み後の美観に影響を与え難い点である。DCTブロック内の量子化係数を変調する方式は参考文献1のものも含めて複数あるが、いずれも変調による量子化係数の変化が大きく、美観的には不利となる。
Since the total number of DCT blocks included in a video is generally large (4800 luminance components of VGA video), DCT blocks are divided into groups and error detection coding is performed independently in one group. As a result, if there is an error, the group including the error can be specified, and the merit of knowing the location of the error (falsification) can be obtained. In the modulation method of the quantization coefficient in the DCT block, the absolute value of the quantization coefficient is obtained. And a reference value selected by the random number generation means from the quantization coefficients excluding the maximum value. The even / odd difference from the reference value is adjusted by adding −K, 0, or K (K is an arbitrary positive / odd number) to the maximum absolute value of the quantization coefficient. The advantage of this method is that only a small variation is given to a coefficient having a large value, so that the change of the quantization coefficient is small, and the aesthetic appearance after embedding is hardly affected. Although there are a plurality of methods for modulating the quantization coefficient in the DCT block, including the one in Reference Document 1, the change in the quantization coefficient due to the modulation is large, which is aesthetically disadvantageous.

本発明の、請求項1に記載の改ざん検出用電子透かし埋め込み方法は、映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、映像入力手段が映像を入力するステップと、JPEG符号化手段が、前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うステップと、電子透かしデータ入力手段が、埋め込む電子透かしデータを入力するステップと、電子透かしデータ誤り検出符号化手段が、前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとするステップと、暗号化手段が、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとするステップと、色成分選択手段が、前記暗号化済み符号データを埋め込む色成分を選択するステップと、DCTブロックグループ分割手段が、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするステップと、最大値選択手段が、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶステップと、基準値選択手段が、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶステップと、暗号化済み符号データ埋め込み手段が、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加える暗号化済み符号データ埋め込みステップと、前記余りグループのDCTブロックには所定の0と1からなるパターンを前記暗号化済み符号データ埋め込みステップと同じ方法で埋め込む余りグループデータ埋め込みステップと、JPEG符号化手段が、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程と同様にエントロピー圧縮し、所定のJPEGフォーマットに適合するように整形してJPEG符号化を完了させるステップとを備えることを特徴としている。   The falsification detection digital watermark embedding method according to claim 1 of the present invention is a system for embedding a falsification detection digital watermark simultaneously with JPEG encoding of a video, and a step of inputting video by JPEG encoding. Means for performing a YCbCr conversion process, a downsampling process, a DCT process and a DCT coefficient quantization process in a normal JPEG encoding process on the input video; and a digital watermark data input means A step of inputting, a step of digital watermark data error detection encoding means, adding the redundancy to the input digital watermark data by a predetermined error detection encoding method to obtain error detection code data, and encryption means Is a code that has already been encrypted by a predetermined encryption method. A color component selecting unit selecting a color component to embed the encoded code data; and a DCT block group dividing unit encoding the DCT block of the selected color component into encoded code data The number of bits is divided into groups equal to the number of bits, and the remaining DCT blocks are grouped into only one group, and the maximum value selecting means includes the quantization coefficients of the DCT blocks belonging to the divided groups. The step of selecting a value having the maximum absolute value from the reference value, and the reference value selecting means 1 based on the random number value obtained from the predetermined random number generating means, from the quantization coefficient excluding the one having the maximum absolute value of the quantization coefficient If the encrypted code data embedding means is a DCT block that embeds bit 0 of the encrypted code data If the DCT block embeds bit 1 of the encoded code data so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number, the maximum value of the quantization coefficient of the DCT block and the Encrypted code data embedding step of adding any of −K, 0, K (K is an arbitrary positive / odd number) to the maximum value of the quantized coefficient absolute value so that the difference between the reference values becomes an odd number, and the remainder A remainder group data embedding step for embedding a predetermined pattern of 0 and 1 in the DCT block of the group by the same method as the encrypted code data embedding step, and a JPEG encoding means, Entropy compression is performed in the same way as the normal JPEG encoding process, and the JPEG encoding is completed by shaping it so that it conforms to the predetermined JPEG format. And a step of finishing.

また請求項2に記載の改ざん検出用電子透かし埋め込み方法は、請求項1において、前記通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うステップと、前記埋め込む電子透かしデータを入力するステップとの間に、JPEG符号化手段が、前記量子化係数を圧縮し所定のJPEGフォーマットに適合するよう整形するステップと、データ整形・エントロピー復号手段が、前記JPEGフォーマットに対してデータ整形およびエントロピー復号を行ってDCT係数値を得るステップとを実行することを特徴としている。   Further, the falsification detecting digital watermark embedding method according to claim 2 is characterized in that, in claim 1, performing a YCbCr conversion process, a downsampling process, a DCT process and a DCT coefficient quantization process in the normal JPEG encoding process; Between the step of inputting the digital watermark data to be embedded, the step of JPEG encoding means compressing the quantized coefficient so as to conform to a predetermined JPEG format, and the data shaping / entropy decoding means include the JPEG And performing a data shaping and entropy decoding on the format to obtain a DCT coefficient value.

また、請求項3に記載の電子透かしを用いた改ざん検出方法は、請求項1又は2に記載の改ざん検出用電子透かし埋め込み方法によって改ざん検出用電子透かしが埋め込まれ、JPEG符号化された映像から、電子透かしを検出して映像が改ざんされたかどうかを調べるシステムにおいて、映像入力手段が、前記JPEG符号化映像を入力するステップと、JPEG復号化手段が、前記入力されたJPEG符号化映像に対して、通常のJPEG復号化工程におけるデータ整形処理およびエントロピー復号処理を行うステップと、色成分選択手段が、前記誤り検出符号データが埋め込まれた色成分を選択するステップと、DCTブロックグループ分割手段が、前記選択した色成分のDCTブロックを前記暗号化済み符号化データのbit数と同じ個数ずつDCTブロックを含むグループに分割するステップと、最大値選択手段が、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶステップと、基準値選択手段が、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶステップと、最大値と基準値の差からビットデータを得る手段が、前記最大値と基準値の差が偶数なら0を、奇数なら1を各々出力するステップと、暗号復号化手段が、前記出力された0又は1を所定の暗号復号化の入力bitとして対応付け暗号復号化を行うステップと、誤り検出復号手段が、前記暗号復号化したデータに対し所定の誤り検出復号化を行い、誤りの有無と、誤り有りの場合は誤りの発生したDCTブロックを含むグループと、誤り無しの場合は埋め込まれた電子透かしデータとを得るステップと、JPEG復号化手段が、前記入力されたJPEG符号化映像を通常のJPEG復号化工程を行って映像とするステップと、表示手段が、前記復号された映像と共に前記誤りの有無と誤りの発生したグループに属するDCTブロックの位置を目立つように表示するステップとを備えることを特徴としている。   According to a third aspect of the present invention, there is provided a method for detecting falsification using a digital watermark from a JPEG-encoded image in which the falsification detection digital watermark is embedded by the falsification detection digital watermark embedding method according to claim 1 or 2. In the system for detecting whether the video has been falsified by detecting a digital watermark, a step in which video input means inputs the JPEG encoded video, and a JPEG decoding means applies to the input JPEG encoded video. A step of performing data shaping processing and entropy decoding processing in a normal JPEG decoding step, a step of selecting a color component in which the error detection code data is embedded, and a step of dividing a DCT block group The DCT block of the selected color component is the same as the number of bits of the encrypted encoded data. A step of dividing the number into groups including DCT blocks, a step of selecting a maximum value from a quantization coefficient of a DCT block belonging to each of the divided groups, and a reference value selection; Means for selecting one reference value from the quantized coefficients excluding the one having the maximum absolute value of the quantized coefficient based on the random number value obtained from the predetermined random number generating means; and the difference between the maximum value and the reference value Means for obtaining bit data from the step of outputting 0 if the difference between the maximum value and the reference value is an even number, and 1 if the difference is an odd number; The step of performing the corresponding encryption / decryption as the input bit of the error, and the error detection / decryption means performs the predetermined error detection / decryption on the encrypted / decrypted data, and if there is an error and there is an error, A group including the generated DCT block and embedded digital watermark data if there is no error, and JPEG decoding means performs a normal JPEG decoding process on the input JPEG encoded video. And a step of displaying the presence / absence of the error and the position of the DCT block belonging to the group in which the error occurs prominently together with the decoded video.

また、請求項4に記載の改ざん検出用電子透かし埋め込み装置は、映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、映像を入力する映像入力手段と、前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うJPEG符号化手段と、埋め込む電子透かしデータを入力する電子透かしデータ入力手段と、前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段と、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段と、前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段と、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段と、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、暗号化済み符号データ埋め込み手段が、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段と、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段と、前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形する整形手段とを備えることを特徴としている。   The falsification detection digital watermark embedding device according to claim 4 is a system for embedding a falsification detection digital watermark at the same time as JPEG encoding of a video, and a video input means for inputting video, and the input video, JPEG encoding means for performing YCbCr conversion processing, downsampling processing, DCT processing and DCT coefficient quantization processing in a normal JPEG encoding process, electronic watermark data input means for inputting embedded watermark data, and the input electronic Digital watermark data error detection coding means for providing watermark data with redundancy by using a predetermined error detection coding method to make the data error detection code data, and the error detection code data encrypted by a predetermined encryption method And encryption means for embedding the encrypted code data. And a DCT block that divides the DCT block of the selected color component into groups of the same number as the number of bits of the encrypted code data, and the remaining DCT blocks are only one group. Based on a random number value obtained from a group dividing means, a maximum value selecting means for selecting a maximum absolute value among the quantized coefficients of DCT blocks belonging to each of the divided groups, and a predetermined random number generating means, DCT block in which reference value selecting means for selecting one reference value from quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients, and the encoded code data embedding means embed bit 0 of the encrypted code data If so, the bit 1 of the encoded code data is embedded so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. In the case of a DCT block to be embedded, the maximum value of the quantization coefficient absolute value is set to −K, 0, K (K is an arbitrary value so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value becomes an odd number. And a coded code data embedding unit that embeds a predetermined pattern of 0 and 1 in the DCT block of the remainder group, and the quantization coefficient after the embedding is completed by ordinary JPEG coding It is characterized by comprising entropy compression means for compressing similarly to the entropy compression processing in the process, and shaping means for shaping the compressed data so as to conform to a predetermined JPEG format.

また請求項5に記載の改ざん検出用電子透かし埋め込み装置は、映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、映像を入力する映像入力手段と、前記入力映像を通常のJPEG符号化工程によって符号化するJPEG符号化手段と、前記JPEG符号化手段により符号化されたJPEGフォーマットに対してデータ整形およびエントロピー復号を行ってDCT係数値を得るデータ整形・エントロピー復号手段と、埋め込む電子透かしデータを入力する電子透かしデータ入力手段と、前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段と、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段と、前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段と、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段と、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、暗号化済み符号データ埋め込み手段が、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段と、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段と、前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形する整形手段とを備えることを特徴としている。   The falsification detecting digital watermark embedding apparatus according to claim 5 is a system for embedding a falsification detecting digital watermark at the same time as JPEG encoding of a video, and a video input means for inputting the video, and the input video is converted into a normal JPEG code. JPEG encoding means for encoding in the encoding step, data shaping / entropy decoding means for obtaining DCT coefficient values by performing data shaping and entropy decoding on the JPEG format encoded by the JPEG encoding means, and embedded electronic Digital watermark data input means for inputting watermark data, and digital watermark data error detection encoding means for providing redundancy to the input digital watermark data by using a predetermined error detection encoding method to obtain error detection code data The error detection code data is encrypted by a predetermined encryption method. Encrypting means for making encoded code data; color component selecting means for selecting a color component in which the encrypted code data is embedded; and the same number of bits as the number of bits of encrypted code data for the DCT block of the selected color component The DCT block group dividing means for dividing the remaining DCT blocks into one group and the quantization coefficient of the DCT block belonging to each of the divided groups has a maximum absolute value. A maximum value selection means for selecting, a reference value selection means for selecting one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients based on a random number value obtained from a predetermined random number generating means; If the encrypted code data embedding means is a DCT block in which bit 0 of the encrypted code data is embedded, the quantization coefficient of the DCT block is If the DCT block embeds bit 1 of the encrypted code data so that the difference between the large value and the reference value is an even number, the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an odd number. Thus, any one of −K, 0, K (K is an arbitrary positive / odd number) is added to the maximum value of the quantized coefficient absolute value, and a predetermined pattern of 0 and 1 is embedded in the DCT block of the remainder group. Encrypted code data embedding means, entropy compression means for compressing the quantized coefficients after completion of embedding in the same manner as the entropy compression processing in the normal JPEG encoding process, and the compressed data conforming to a predetermined JPEG format It is characterized by comprising shaping means for shaping.

また、請求項6に記載の電子透かしを用いた改ざん検出装置は、請求項4又は5に記載の改ざん検出用電子透かし埋め込み装置によって改ざん検出用電子透かしが埋め込まれ、JPEG符号化された映像から、電子透かしを検出して映像が改ざんされたかどうかを調べるシステムにおいて、前記JPEG符号化映像を入力する映像入力手段と、前記入力されたJPEG符号化映像に対して、通常のJPEG復号化工程におけるデータ整形処理およびエントロピー復号処理を行う手段と、前記誤り検出符号データが埋め込まれた色成分を選択する色成分選択手段と、前記選択した色成分のDCTブロックを前記暗号化済み符号化データのbit数と同じ個数ずつDCTブロックを含むグループに分割するDCTブロックグループ分割手段と、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、前記最大値と基準値の差が偶数なら0を、奇数なら1を各々出力する最大値と基準値の差からビットデータを得る手段と、前記出力された0又は1を所定の暗号復号化の入力bitとして対応付け暗号復号化を行う暗号復号化手段と、前記暗号復号化したデータに対し所定の誤り検出復号化を行い、誤りの有無と、誤り有りの場合は誤りの発生したDCTブロックを含むグループと、誤り無しの場合は埋め込まれた電子透かしデータとを得る誤り検出復号手段と、前記入力されたJPEG符号化映像を通常のJPEG復号化工程を行って映像とするJPEG復号化手段と、前記復号された映像と共に前記誤りの有無と誤りの発生したグループに属するDCTブロックの位置を目立つように表示する表示手段とを備えることを特徴としている。   According to a sixth aspect of the present invention, there is provided a falsification detection apparatus using a digital watermark from a JPEG-encoded image in which the falsification detection digital watermark is embedded by the falsification detection digital watermark embedding apparatus according to the fourth or fifth aspect. In a system for detecting whether or not a video has been tampered with by detecting a digital watermark, a video input means for inputting the JPEG encoded video, and a normal JPEG decoding process for the input JPEG encoded video Means for performing data shaping processing and entropy decoding processing; color component selection means for selecting a color component in which the error detection code data is embedded; and a DCT block of the selected color component is converted into a bit of the encoded data. DCT block group dividing means for dividing a DCT block into groups each including the same number of DCT blocks, A maximum value selecting means for selecting a maximum absolute value from among the quantized coefficients of DCT blocks belonging to each divided group; and an absolute value of the quantized coefficient based on a random number value obtained from a predetermined random number generating means. A reference value selection means for selecting one reference value from the quantization coefficient excluding the one with the largest value, and 0 if the difference between the maximum value and the reference value is an even number and 1 if the difference is an odd number. Means for obtaining bit data from the difference; encryption / decryption means for performing encryption / decryption using the output 0 or 1 as an input bit for predetermined encryption / decryption; and a predetermined error for the encrypted / decrypted data Error detection and decoding means for performing detection and decoding to obtain the presence or absence of an error, a group including a DCT block in which an error has occurred if there is an error, and embedded digital watermark data if there is no error, and the input JPEG decoding means for converting the JPEG-encoded video into a normal JPEG decoding process and displaying the presence / absence of the error and the position of the DCT block belonging to the group in which the error occurred together with the decoded video And a display means.

また、請求項7に記載の改ざん検出用電子透かし埋め込みプログラムは、コンピュータに請求項1又は2に記載の各ステップを実行させるための改ざん検出用電子透かし埋め込みプログラムである。   A falsification detection digital watermark embedding program according to a seventh aspect is a falsification detection digital watermark embedding program for causing a computer to execute the steps according to the first or second aspect.

また、請求項8に記載の電子透かしを用いた改ざん検出プログラムは、コンピュータに請求項3に記載の各ステップを実行させるための電子透かしを用いた改ざん検出プログラムである。   A falsification detection program using a digital watermark according to claim 8 is a falsification detection program using a digital watermark for causing a computer to execute each step according to claim 3.

また、請求項9に記載の記録媒体は、請求項7に記載の改ざん検出用電子透かし埋め込みプログラムを記録したコンピュータ読み取り可能な記録媒体である。   A recording medium according to claim 9 is a computer-readable recording medium in which the falsification detecting digital watermark embedding program according to claim 7 is recorded.

また、請求項10に記載の記録媒体は、請求項8に記載の電子透かしを用いた改ざん検出プログラムを記録したコンピュータ読み取り可能な記録媒体である。   A recording medium according to a tenth aspect is a computer-readable recording medium in which a falsification detection program using the digital watermark according to the eighth aspect is recorded.

(1)本発明では、電子透かしをJPEG映像の量子化係数に埋め込むにあたり、値の最大な係数を選び、与える変分は高々Kのため、美観を損ねずに埋め込むことが可能になる。また、透かしが壊れていることを誤り検出符号により検出した場合、壊れた透かしデータが含まれる映像グループ(=映像範囲)が改ざんされていることが分かるため、映像のどの場所が透かし埋め込み後に改ざんされたかどうかを知る手段の提供が可能となる。 (1) In the present invention, when embedding a digital watermark in a quantization coefficient of a JPEG video, a coefficient having the maximum value is selected, and a given variation is K at most, so that it is possible to embed without impairing aesthetics. Also, if the error detection code detects that the watermark is broken, it can be seen that the video group (= video range) containing the broken watermark data has been tampered with. It is possible to provide a means of knowing whether or not it has been done.

さらに本発明は埋め込みデータを暗号化しており、かつ埋め込みアルゴリズムでも乱数を使って埋め込み係数の位置を決めているため、暗号鍵および乱数の種の値を知るものでなければ、本発明のアルゴリズムを熟知した者でも偽造することが難しい。このため、暗号鍵と乱数の種を秘密にしておけば、偽の映像を真正な映像と偽る攻撃を防ぐことができる。
(2)また、誤り検出符号を用いているので、何も埋め込んでいないのに偶然埋め込んだことと同じ結果が得られることを防ぐ、および復号時に元の電子透かしデータを知ることなく誤り(改ざん)の有無を知るという2つのメリットが得られる。
Furthermore, the present invention encrypts embedded data, and the embedding algorithm also uses a random number to determine the position of the embedding coefficient. Therefore, unless the knowledge of the encryption key and the seed value of the random number is known, the algorithm of the present invention is used. Even those who are familiar with it are difficult to forge. For this reason, if the encryption key and the seed of the random number are kept secret, it is possible to prevent an attack that makes a false image a genuine image.
(2) Also, since an error detection code is used, it is possible to prevent the same result from being accidentally embedded even if nothing is embedded, and an error (falsification) without knowing the original digital watermark data at the time of decoding. ) Can be obtained.

以下、図面を参照しながら本発明の実施の形態を説明するが、本発明は下記の実施形態例に限定されるものではない。まず、本発明の改ざん検出用電子透かし埋め込み方法及びその装置の実施形態例を図1〜図11とともに説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings, but the present invention is not limited to the following embodiments. First, an embodiment of a digital watermark embedding method for falsification detection and its apparatus according to the present invention will be described with reference to FIGS.

図2は本発明を適用した透かし埋め込み付きJPEG符号化装置の構成の一例を示している。図2において、31は埋め込み対象のデジタル映像を入力する映像入力手段である。   FIG. 2 shows an example of the configuration of a JPEG encoding apparatus with watermark embedding to which the present invention is applied. In FIG. 2, 31 is a video input means for inputting a digital video to be embedded.

32はJPEG符号化手段であり、前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行う。   Reference numeral 32 denotes JPEG encoding means, which performs YCbCr conversion processing, downsampling processing, DCT processing, and DCT coefficient quantization processing in the normal JPEG encoding process on the input video.

33は、前記入力映像に埋め込む電子透かしデータを入力する電子透かしデータ入力手段である。   Reference numeral 33 denotes digital watermark data input means for inputting digital watermark data to be embedded in the input video.

34は、前記入力された電子透かしデータを、所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段である。   Reference numeral 34 denotes digital watermark data error detection encoding means for converting the input digital watermark data into error detection code data by adding redundancy to the data by a predetermined error detection encoding method.

35は、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段である。   Reference numeral 35 denotes encryption means for converting the error detection code data into code data already encrypted by a predetermined encryption method.

36は、前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段である。   Reference numeral 36 denotes color component selection means for selecting a color component for embedding the encrypted code data.

37は、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段である。   Reference numeral 37 denotes DCT block group dividing means for dividing the DCT block of the selected color component into groups of the same number as the number of bits of the encoded code data, and setting the remaining DCT blocks alone as one group.

38は、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段である。   Reference numeral 38 denotes maximum value selection means for selecting a value having the maximum absolute value from among the quantization coefficients of the DCT blocks belonging to each of the divided groups.

39は、所定の乱数発生手段40から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段である。   Reference numeral 39 is a reference value selection means for selecting one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients based on the random number value obtained from the predetermined random number generating means 40.

41は、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段である。   41 is a DCT block in which bit 0 of the encrypted code data is embedded, bit 1 of the encrypted code data is set so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. In the case of a DCT block to be embedded, the maximum value of the quantization coefficient absolute value is set to −K, 0, K (K is an arbitrary value so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value becomes an odd number. The coded code data embedding means embeds a predetermined pattern of 0 and 1 in the DCT block of the remainder group.

42は、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段である。   Reference numeral 42 denotes entropy compression means for compressing the quantized coefficients after completion of the embedding in the same manner as the entropy compression process in the normal JPEG encoding process.

43は、前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形するJFIF形式整形手段である。   Reference numeral 43 denotes JFIF format shaping means for shaping the compressed data so as to conform to a predetermined JPEG format.

図2に記載の前記各手段31〜43の各機能は、例えばコンピュータによって達成される。   The functions of the means 31 to 43 shown in FIG. 2 are achieved by, for example, a computer.

次に図2の装置で行われる処理手順を図3のフローチャートとともに説明する。まず映像入力ステップ(ステップS31)により埋め込み対象のデジタル映像を得る。   Next, the processing procedure performed in the apparatus of FIG. 2 will be described with reference to the flowchart of FIG. First, a digital video to be embedded is obtained by a video input step (step S31).

次にステップS32において、通常のJPEG符号化の工程と同じ処理(図1(a)のステップS12〜S15)を進め、YCbCr変換とダウンサンプリングとDCTを経てDCT係数の量子化まで行なう。量子化後は各DCTブロック内では8×8=64個の量子化係数が存在する状態になる。図4に量子化係数の例を示す。量子化係数はY,Cb,Crの色成分毎に存在する。前記ダウンサンプリングの際にはY(輝度)成分よりもCb,Cr(色)成分の方を粗くサンプリングするのが一般的であるので、DCTブロックの数はY成分が最も多くなる。Y,Cb,Crいずれの場合であっても、DCTブロックの中には8×8の量子化係数が含まれるのは変わりない。   Next, in step S32, the same processing as that in the normal JPEG encoding process (steps S12 to S15 in FIG. 1A) is performed, and YCbCr conversion, downsampling, and DCT are performed until DCT coefficient quantization. After quantization, 8 × 8 = 64 quantization coefficients exist in each DCT block. FIG. 4 shows an example of the quantization coefficient. A quantization coefficient exists for each color component of Y, Cb, and Cr. Since the Cb and Cr (color) components are generally sampled more coarsely than the Y (luminance) component during the downsampling, the number of DCT blocks is the largest for the Y component. Regardless of Y, Cb, or Cr, the DCT block contains 8 × 8 quantization coefficients.

次に電子透かしデータ入力ステップ(ステップS33)により得られた電子透かしデータを処理する。例えば、電子透かしデータが448bitであるとする。この448bitというのは任意に決定可能であり、後述する誤り検出符号化により冗長化した結果のbit数が、後述する分割された1グループ内のDCTブロック数を超えない範囲で任意に選び得る。   Next, the digital watermark data obtained in the digital watermark data input step (step S33) is processed. For example, assume that the digital watermark data is 448 bits. This 448 bits can be arbitrarily determined, and can be arbitrarily selected within a range in which the number of bits resulting from redundancy by error detection coding described later does not exceed the number of DCT blocks in one divided group described later.

次に透かしデータ誤り検出符号化ステップ(ステップS34)では、誤り検出符号として例えば偶数行パリティ符号を選ぶ。448bitを7列64行に並べ、各行に偶数パリティbitを1個付加する。偶数パリティbitとはパリティbitを含めた各行の8個のデータbitの中で1となる個数が偶数個となるようにパリティbitの値を1か0に定めることである。各行に偶数パリティbitを付加した結果、誤り検出符号化されたデータは64個のパリティbitが加わり全体で448+64=512bitとなる。誤り検出符号は拡張偶数行パリティに限らずこれ以外を使っても発明の本質は変わらない。   Next, in the watermark data error detection encoding step (step S34), for example, an even-numbered row parity code is selected as the error detection code. 448 bits are arranged in 7 columns and 64 rows, and one even parity bit is added to each row. The even parity bit means that the value of the parity bit is set to 1 or 0 so that the number of 1 in 8 data bits of each row including the parity bit is an even number. As a result of adding even parity bits to each row, 64 parity bits are added to the data subjected to error detection coding, and the total becomes 448 + 64 = 512 bits. The error detection code is not limited to the extended even-numbered row parity, and the essence of the invention does not change even if other than this is used.

次の暗号化ステップ(ステップS35)では、誤り検出符号化された512bitのデータを暗号化して、512bitの暗号化済み符号データを生成する。暗号には例えばcamellia暗号(非特許文献3参照)を用いる。camelliaは128bitのブロック暗号であり、128bitのデータの並びを別の128bitのデータの並び(暗号化済み符号化データ)に変換する。変換するときには128/192/256bitの暗号鍵を必要とする。暗号化済み符号化データを復号して元のデータ符号を得るには、暗号化時と同じ暗号鍵を使ってcamellia復号処理を行う。camelliaは128bitのブロック暗号であるので、512bitの誤り検出符号を暗号化する場合は512/128=4回の処理を必要とする。暗号化方法はcamelliaに限らずこれ以外の方法を使っても本発明の本質は変わらない。   In the next encryption step (step S35), the 512-bit data subjected to error detection coding is encrypted to generate 512-bit encrypted code data. For example, the Camellia cipher (see Non-Patent Document 3) is used as the cipher. Camellia is a 128-bit block cipher, and converts a sequence of 128-bit data into another sequence of 128-bit data (encoded encoded data). When converting, an encryption key of 128/192/256 bits is required. In order to decrypt the encoded data and obtain the original data code, a camellia decryption process is performed using the same encryption key as that used for encryption. Since camellia is a 128-bit block cipher, 512/128 = 4 processes are required to encrypt a 512-bit error detection code. The encryption method is not limited to camelia, and the essence of the present invention does not change even if other methods are used.

次の色成分選択ステップ(ステップS36)では、透かしデータから生成した誤り検出符号データを埋め込む色成分をY,Cb,Crの中から選択する。それぞれ単独にひとつ選択しても良いし、任意の2つを選んでも良く、また3つともを選ぶこともできる。ただし、2つ以上を選ぶと使用できるDCTブロックが増える代わりにDCTブロックのグループ分けが複雑になってしまう。そこで本例では説明を簡単にするためにYのみを選ぶこととする。Yを選ぶことにより、白黒映像でも対応できるという利点も生じる。他の有効な選び方としてはCbのみを選ぶという方法がある。この場合は、人間の視覚は青/黄の変化を知覚しにくいので目立ちにくいという利点が生じる。   In the next color component selection step (step S36), the color component in which the error detection code data generated from the watermark data is embedded is selected from Y, Cb, and Cr. Each of them can be selected individually, any two can be selected, or all three can be selected. However, if two or more are selected, the number of DCT blocks that can be used increases, but the grouping of DCT blocks becomes complicated. Therefore, in this example, only Y is selected to simplify the explanation. By selecting Y, there is an advantage that black and white images can be handled. Another effective method is to select only Cb. In this case, there is an advantage that human vision is not noticeable because it is difficult to perceive the blue / yellow change.

次に映像中のDCTブロックのグループ分割を行う(ステップS37)。映像サイズと選択した色成分から8×8画素のDCTブロックが何個存在するかを計算しておく。例えば640×480画素のVGAサイズの映像でY成分を選んだのであれば、640×480/(8×8)=4800個のDCTブロックが存在する。これらDCTブロックを暗号化済み符号化データのbit数(上記例では512)ずつのグループに分ける。本例では4800個のDCTブロックを512個ずつのグループに分けるのであるが、4800は512で割り切れず商は9で余りが192であるから、9グループが構成され192個のDCTブロックが余る。この余りのDCTブロックだけを集めたグループも1グループとする。   Next, group division of the DCT block in the video is performed (step S37). The number of 8 × 8 pixel DCT blocks is calculated from the video size and the selected color component. For example, if the Y component is selected for a video of VGA size of 640 × 480 pixels, there are 640 × 480 / (8 × 8) = 4800 DCT blocks. These DCT blocks are divided into groups each having the number of encrypted encoded data bits (512 in the above example). In this example, 4800 DCT blocks are divided into 512 groups. Since 4800 is not divisible by 512 and the quotient is 9 and the remainder is 192, 9 groups are formed and 192 DCT blocks remain. A group in which only the remaining DCT blocks are collected is also defined as one group.

1グループの形状は元映像に対し左上からラスタースキャン形式に数えて行き512個を数えたものとする。次のグループはひき続きラスタースキャン形式で512個を数えたものとする。最後に余ったDCTブロックはそれらだけで1グループとする。ブロック分けの例を図5に示す。この例ではY成分のみを選んだ場合を示したが、CbあるいはCr成分のみを選んだ場合も同様にグループの形状を定める。複数の色成分を用いる場合は、Yの次はCb、Cbの次はCrというように各色成分のDCTブロックが連続していると見なして512個ずつのグループを選んで行き、最後に余りの分を1グループとする。   It is assumed that the shape of one group is counted in the raster scan format from the upper left with respect to the original image, and 512 are counted. The next group will continue to count 512 in raster scan format. The last remaining DCT block is one group. An example of block division is shown in FIG. In this example, the case where only the Y component is selected is shown, but the group shape is similarly determined when only the Cb or Cr component is selected. When using a plurality of color components, it is assumed that the DCT block of each color component is continuous, such as Cb after Y and Cr after Cb, and 512 groups are selected. Finally, the remainder One minute is a group.

本例では1グループに含まれるDCTブロックは隣接しているとしたが、含まれるDCTブロックの数さえ同じであれば、同一グループ内のDCTブロック配置が隣接している必要はなく様々なグループ分けの方法が存在し得る。例えば図6のように分散して分ける方法も存在する。ただし、分け方は任意で良いが、なるべくブロックが一塊になるように分けた方が、改ざんがあった場合の場所の特定が容易である。   In this example, the DCT blocks included in one group are adjacent to each other. However, as long as the number of included DCT blocks is the same, the DCT block arrangement in the same group does not need to be adjacent, and various groupings are made. There can be methods. For example, there is a method of dividing and dividing as shown in FIG. However, the method of division may be arbitrary, but it is easier to specify the location when tampering occurs if the blocks are divided as much as possible.

次に各グループに含まれるDCTブロックへ暗号化済み符号データを埋め込む(ステップS41)。   Next, the encoded code data is embedded in the DCT block included in each group (step S41).

ここで例外処理がひとつあり、512個のDCTから構成されるグループには暗号化済み符号データを埋め込むが、DCTが512個に満たない余りからなるグループ(余りグループ)には第1グループすなわち、最初のグループと同じ暗号化済み符号データを余りDCTの個数だけ埋め込む。第1グループのデータの1番目から余りグループのDCT個数番目までのデータを、余りグループのデータの1番目から最後まで埋め込む。余りのグループはDCT個数が512個に満たないため、埋め込めない暗号化済み符号データが生じるがそれは無視して埋め込まないでおく。   Here, there is one exception process, and the encoded code data is embedded in a group composed of 512 DCTs, but the first group, ie, the group consisting of remainders with less than 512 DCTs (remainder group), The same encrypted code data as that of the first group is embedded by the number of the remaining DCTs. Data from the first of the first group data to the DCT number of the remainder group is embedded from the first to the last of the remainder group data. Since the number of DCTs in the remaining group is less than 512, encrypted code data that cannot be embedded is generated but is ignored and not embedded.

図3のステップS41(DCTブロックへの暗号化済み符号データ埋め込み処理)は図7のフローチャートに沿って処理される。   Step S41 of FIG. 3 (embedding process of encrypted code data in the DCT block) is processed according to the flowchart of FIG.

すなわち、量子化係数の絶対値の最大値M1を選択するステップS52と、基準値M2を選択するステップS53と、埋め込みビットにより最大値M1を調整するステップS54とを、全DCTブロックについて処理が終了する(ステップS51)まで繰り返し実行する。   That is, step S52 for selecting the maximum value M1 of the quantized coefficient, step S53 for selecting the reference value M2, and step S54 for adjusting the maximum value M1 with embedded bits are completed for all DCT blocks. This is repeatedly executed until it is performed (step S51).

量子化係数は図4に示すように8×8の正方形に並んでおり、左上が直流成分であり右下に行くほど高周波成分を表す。図7において、量子化係数の絶対値の最大値選択ステップ(S52)では、64個の量子化係数の中から絶対値最大値を見つける。絶対値最大値が複数個ある場合は次のようにして定める。このアルゴリズムをフローチャートにしたものを図8に示す。   The quantization coefficients are arranged in an 8 × 8 square as shown in FIG. 4, and the upper left is a direct current component and the higher the lower right, the higher the frequency component. In FIG. 7, in the absolute value maximum value selection step (S52) of the quantization coefficient, the absolute value maximum value is found out of 64 quantization coefficients. If there are multiple absolute maximum values, they are determined as follows. A flowchart of this algorithm is shown in FIG.

最大値が2個以上ある場合は、図9の矢印に示す逆ジグザグスキャン(通常のJPEGのジグザグスキャンの逆順)の順序で最初に出現したものを最大値とする。   When there are two or more maximum values, the first value that appears in the reverse zigzag scan (reverse order of normal JPEG zigzag scan) indicated by the arrow in FIG. 9 is set as the maximum value.

図8において、まず最初にステップS61で最大値M1を0とした後、逆ジグザグスキャンにより進み係数Aを取り(ステップS62)、|A|>M1か否かを判定し(ステップS63)、|A|>M1である場合はM1=|A|とし(ステップS64)、前記ステップS62〜S64を、全ての量子化係数をスキャンし終わる(ステップS65)まで繰り返し実行する。   In FIG. 8, first, the maximum value M1 is set to 0 in step S61, then the advance coefficient A is obtained by reverse zigzag scanning (step S62), and it is determined whether or not | A |> M1 (step S63). If A |> M1, M1 = | A | is set (step S64), and the above steps S62 to S64 are repeatedly executed until all the quantized coefficients are scanned (step S65).

同値のものがあった場合、逆ジグザグスキャンで先に出現したものを採用する理由は、透かし埋め込みに用いる量子化係数をなるべく高周波成分側に持って行き、目立ちにくくするためである。上記のように選んだ最大値をM1とする。   If there is an equivalent value, the reason why the first appearing in the reverse zigzag scan is adopted is to bring the quantization coefficient used for watermark embedding to the high frequency component side as much as possible and make it less noticeable. The maximum value selected as described above is M1.

基準値選択ステップ(図7のステップS53)では1≦β≦63の整数βを出力する乱数発生装置を用い、1DCTブロック内の量子化係数64個の内、最大値M1を除いた63個の中からβ番目の係数を基準値M2として選ぶ。β番目の係数を定める際には、図10に示すように、左上からラスタースキャン形式に数え、最大値M1は飛ばして数える。乱数発生装置は乱数の種(パラメータ初期値)が同一ならば同じ乱数列が得られる方法、例えば線形合同法を用いる。線形合同法の内容は後述する実施例の欄の「5.乱数発生方法」で詳細に説明する。乱数発生方法は線形合同法に限らず、乱数の種を決定すれば出力される乱数列が決定論的に決まるような他の方法を使っても本発明の本質は変わらない。得られた乱数列の値はDCTブロックをラスタースキャンする順番で使用する。すなわち、得られた第1の乱数は左上隅のDCTブロックで用い、次に得られた第2の乱数は先のDCTブロックの右隣のDCTブロックで用いる。   In the reference value selection step (step S53 in FIG. 7), a random number generator that outputs an integer β of 1 ≦ β ≦ 63 is used, and 63 of the 64 quantization coefficients in one DCT block, excluding the maximum value M1, are used. The βth coefficient from the inside is selected as the reference value M2. When determining the β-th coefficient, as shown in FIG. 10, it is counted from the upper left in the raster scan format, and the maximum value M1 is skipped and counted. The random number generator uses a method of obtaining the same random number sequence, for example, a linear congruence method if the seeds of random numbers (parameter initial values) are the same. The contents of the linear congruential method will be described in detail in “5. The random number generation method is not limited to the linear congruential method, and the essence of the present invention does not change even if another method is used in which the random number sequence to be output is determined deterministically by determining the seed of the random number. The value of the obtained random number sequence is used in the order of raster scanning the DCT block. That is, the obtained first random number is used in the DCT block in the upper left corner, and the second random number obtained next is used in the DCT block adjacent to the right of the previous DCT block.

埋め込みbitによりM1を調整するステップ(図7のステップS54)での埋め込みの方針は、データ1(暗号化済み符号データのbit1)を埋め込む場合はM1−M2=奇数となるように、データ0(暗号化済み符号データのbit0)を埋め込む場合はM1−M2=偶数となるようにM1を調整することである。調整は任意正奇数を減じるか、任意正奇数を加えるか、何もしないかの3つから選ぶ。任意正奇数はより小さい値を使う方が、埋め込み後の美観は有利となる。   The embedding policy in the step of adjusting M1 by the embedding bit (step S54 in FIG. 7) is that data 0 (bit 1 of encrypted code data) is embedded so that M1−M2 = odd number. When embedding bit 0) of encrypted code data, M1 is adjusted so that M1-M2 = even. The adjustment is selected from three choices: subtracting arbitrary positive / odd numbers, adding arbitrary positive / odd numbers, or nothing. It is better to use a smaller value for the arbitrary positive / odd number.

この調整方法の手順を図11に示す。図11において、例えばデータ1を埋め込みたいとき、M1=15、M2=14の場合はM1−M2=1で既に奇数であるから何もしない(ステップS71,S72)。   The procedure of this adjustment method is shown in FIG. In FIG. 11, for example, when it is desired to embed data 1, if M1 = 15 and M2 = 14, M1-M2 = 1 and already odd, so nothing is done (steps S71 and S72).

また、M1=15、M2=15の場合はM1−M2=0で偶数であるからM1の正負を吟味し(ステップS71,S73,S74)、正であるからM1に例えば正奇数1を加えて(ステップS75)M1=15+1=16とする(これによりM1−M2が奇数となる)。   Further, when M1 = 15 and M2 = 15, M1−M2 = 0 is an even number, and therefore M1 is examined for positive / negative (steps S71, S73, S74). (Step S75) M1 = 15 + 1 = 16 (Thus, M1-M2 becomes an odd number).

また、データ0を埋め込みたいとき、M1=−18、M2=11の場合はM1−M2=−29で奇数であるからM1の正負を吟味し(ステップS71,S72,S74)、負であるから例えば正奇数1を減じて(ステップS76)M1=−18−1=−19とする(これによりM1−M2が偶数となる)。   When it is desired to embed data 0, if M1 = −18 and M2 = 11, M1−M2 = −29, which is an odd number, and therefore M1 is examined for positive / negative (steps S71, S72, S74) and is negative. For example, the positive / odd number 1 is subtracted (step S76), and M1 = −18−1 = −19 (this makes M1−M2 an even number).

またM1=−18、M2=10の場合はM1−M2=−28で偶数であるから何もしない(ステップS71,S73)。   If M1 = −18 and M2 = 10, M1−M2 = −28, which is an even number, nothing is done (steps S71 and S73).

上記のようにして、1グループ内の全DCTブロックについて対応する暗号化済み符号データのbitを各々埋め込む。但し、前述したように余りのグループには第1グループと同じ暗号化済み符号データを埋め込む。   As described above, the bits of the encoded data corresponding to all the DCT blocks in one group are embedded. However, as described above, the same encrypted code data as in the first group is embedded in the remaining groups.

図3のステップS41において全てのグループについて暗号化済み符号データbitの埋め込みが終了したら、その後は通常のJPEG符号化の工程(図1(a)のステップS16,S17)と同じようにエントロピー圧縮ステップ(ステップs42)と所定のJFIF形式に適合するようデータ整形ステップ(ステップS43)を実行しJPEG映像として出力する。   When embedding of the encoded code data bits is completed for all groups in step S41 in FIG. 3, the entropy compression step is performed in the same manner as in the normal JPEG encoding process (steps S16 and S17 in FIG. 1A). A data shaping step (step S43) is executed so as to conform to (step s42) and a predetermined JFIF format and output as a JPEG video.

次に、本発明の電子透かしを用いた改ざん検出方法、検出装置の実施形態例を図12〜図16とともに説明する。   Next, an embodiment of a tampering detection method and detection apparatus using a digital watermark according to the present invention will be described with reference to FIGS.

図12は本発明を適用した透かし検出付きJPEG復号化装置の構成を示している。図12において、81は前記JPEG符号化映像を入力するJPEG符号化映像入力手段である
82は、前記入力されたJPEG符号化映像に対して、通常のJPEG復号化工程におけるデータ整形処理およびエントロピー復号処理を行うデータ整形・エントロピー復号手段である。
FIG. 12 shows the configuration of a JPEG decoding apparatus with watermark detection to which the present invention is applied. In FIG. 12, 81 is a JPEG encoded video input means for inputting the JPEG encoded video. 82 is a data shaping process and entropy decoding in the normal JPEG decoding process for the input JPEG encoded video. Data shaping / entropy decoding means for performing processing.

83は、前記誤り検出符号データが埋め込まれた色成分を選択する色成分選択手段である。   Reference numeral 83 denotes color component selection means for selecting a color component in which the error detection code data is embedded.

84は、前記選択した色成分のDCTブロックを前記暗号化済み符号化データのbit数と同じ個数ずつDCTブロックを含むグループに分割するDCTブロックグループ分割手段である。   Reference numeral 84 denotes DCT block group dividing means for dividing the DCT block of the selected color component into a group including DCT blocks by the same number as the number of bits of the encrypted encoded data.

85は、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段である。   Reference numeral 85 denotes maximum value selection means for selecting a value having the maximum absolute value from among the quantization coefficients of the DCT blocks belonging to each of the divided groups.

86は、所定の乱数発生手段87から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段である。   Reference numeral 86 denotes reference value selection means for selecting one reference value from the quantized coefficients excluding those having the maximum absolute value of the quantized coefficients based on the random number value obtained from the predetermined random number generating means 87.

88は、前記最大値と基準値の差が偶数なら0を、奇数なら1を各々出力する最大値と基準値の差からビットデータを得る手段である。   Reference numeral 88 denotes a means for obtaining bit data from the difference between the maximum value and the reference value for outputting 0 if the difference between the maximum value and the reference value is an even number and 1 for the odd number.

89は、前記出力された0又は1を所定の暗号復号化の入力bitとして対応付け暗号復号化を行う暗号復号化手段である。   Reference numeral 89 denotes encryption / decryption means for performing association encryption / decryption using the output 0 or 1 as an input bit for predetermined encryption / decryption.

90は、前記暗号復号化したデータに対し所定の誤り検出復号化を行い、誤りの有無と、誤り有りの場合は誤りの発生したDCTブロックを含むグループと、誤り無しの場合は埋め込まれた電子透かしデータとを得る誤り検出復号手段である。   90 performs predetermined error detection / decryption on the encrypted / decrypted data, and if there is an error, if there is an error, a group including a DCT block in which an error has occurred, and if there is no error, an embedded electronic Error detection decoding means for obtaining watermark data.

91は、前記入力されたJPEG符号化映像を通常のJPEG復号化工程を行って映像とするJPEG復号化手段である。   Reference numeral 91 denotes a JPEG decoding unit that performs a normal JPEG decoding process on the input JPEG encoded video to generate a video.

92は、前記復号された映像と共に前記誤りの有無と誤りの発生したグループに属するDCTブロックの位置を目立つように表示する誤り発生箇所重畳表示手段(本発明の表示手段)である。   Reference numeral 92 denotes error occurrence location superimposing display means (display means of the present invention) that displays the presence / absence of the error and the position of the DCT block belonging to the group in which the error occurred together with the decoded video.

図12に記載の前記各手段81〜92の各機能は例えばコンピュータによって達成される。   The functions of the means 81 to 92 shown in FIG. 12 are achieved by, for example, a computer.

次に図12の装置で行われる処理手順を図13のフローチャートと共に説明する。予め取り決めとして埋め込みの際に使用したブロック形状、ブロック数、誤り検出符号化方法と暗号化方法とその暗号鍵、乱数発生方法と乱数発生の種は検出側も同じ情報を知っているようにする。   Next, a processing procedure performed by the apparatus of FIG. 12 will be described with reference to a flowchart of FIG. Make sure that the detection side knows the same information about the block shape, number of blocks, error detection encoding method and encryption method, its encryption key, random number generation method, and seed of random number generation used when embedding in advance. .

デジタル映像データ入力ステップ(ステップS81)にて入力されたデジタル映像データは、通常のJPEG復号化工程であるデータ整形とエントロピー復号ステップ(図1(b)のステップS22,S23)を経てDCTブロックの量子化係数にまで変換される(ステップS82)。   The digital video data input in the digital video data input step (step S81) is subjected to the data shaping and entropy decoding steps (steps S22 and S23 in FIG. 1B) which are normal JPEG decoding steps. Conversion to a quantized coefficient is performed (step S82).

次に埋め込み時に用いたものと同じ色成分選択を行い(ステップS83)、続いて埋め込み時に用いたものと同じDCTブロックのグループ分け(図5参照)を行う(ステップS84)。   Next, the same color component selection as that used at the time of embedding is performed (step S83), and then the same DCT block grouping as that used at the time of embedding (see FIG. 5) is performed (step S84).

次にステップS88において、各グループの各DCTブロックについて暗号化済み符号データ1 or 0を次の手順で検出する。その手順を図14のフローチャートに沿って説明する。   In step S88, the encrypted code data 1 or 0 is detected in the following procedure for each DCT block in each group. The procedure will be described with reference to the flowchart of FIG.

図14において、絶対値の最大値M1を選択する処理(ステップS102)と、基準値M2を選択する処理(ステップS103)と、暗号化済み符号データのビットが0か1かを検出する処理(ステップS104〜S106)とを、全DCTブロックについて処理が終了する(ステップS101)まで繰り返し実行する。   In FIG. 14, a process of selecting the maximum absolute value M1 (step S102), a process of selecting the reference value M2 (step S103), and a process of detecting whether the bit of the encrypted code data is 0 or 1 ( Steps S104 to S106) are repeatedly executed until the processing is completed for all DCT blocks (step S101).

まずステップS102において、64個の量子化係数値を吟味して絶対値の最大値M1を見つける。最大値が複数個ある場合は次のようにして定める。これは埋め込み時と全く同じである(図8の処理を実行する)。   First, in step S102, the 64 quantized coefficient values are examined to find the absolute maximum value M1. If there are multiple maximum values, they are determined as follows. This is exactly the same as in embedding (executes the process of FIG. 8).

すなわち最大値が2個以上ある場合は、図9に示すような逆ジグザグスキャン(通常のJPEGのジグザグスキャンの逆順)の順序で最初に出現したものを最大値とする。次に基準値選択ステップ(ステップS103)では、1≦β≦63の整数βを出力する乱数発生装置を用い、1DCTブロック内の量子化係数64個の内、最大値M1を除いた63個の中からβ番目の係数を基準値M2として選ぶ。β番目の係数を定める際には、前記図10と同様に左上からラスタースキャン形式に数え、M1は飛ばして数える(図12)。乱数発生装置は例えば線形合同法を用いる。乱数発生装置に加える乱数の種(パラメータ初期値)は埋め込み時と同じ値を用いる。するとβの値は埋め込み時と同じ値が得られ、M2の位置は埋め込み時と同じになる。乱数発生方法は線形合同法に限らず、乱数の種を決定すれば出力される乱数値が決定論的に決まるような他の方法を使っても本発明の本質は変わらない。   That is, when there are two or more maximum values, the first value that appears in the reverse zigzag scan (reverse order of normal JPEG zigzag scan) as shown in FIG. 9 is set as the maximum value. Next, in the reference value selection step (step S103), a random number generator that outputs an integer β satisfying 1 ≦ β ≦ 63 is used, and 63 of the 64 quantization coefficients in one DCT block are excluded from the maximum value M1. The βth coefficient from the inside is selected as the reference value M2. When the β-th coefficient is determined, it is counted in the raster scan format from the upper left as in FIG. 10, and M1 is skipped and counted (FIG. 12). The random number generator uses, for example, a linear congruential method. The random number seed (parameter initial value) added to the random number generator uses the same value as that used for embedding. Then, the value of β is the same as that at the time of embedding, and the position of M2 is the same as at the time of embedding. The random number generation method is not limited to the linear congruential method, and the essence of the present invention does not change even if another method is used in which the random number value to be output is determined deterministically by determining the seed of the random number.

上記のように選んだ絶対値の最大値をM1、基準値をM2とする。M1−M2が偶数ならば暗号化済み符号データ0が、M1−M2が奇数なら暗号化済み符号データ1が埋め込まれていると分かる(ステップS104〜S106)。   The maximum absolute value selected as described above is M1, and the reference value is M2. If M1-M2 is an even number, it can be understood that encrypted code data 0 is embedded, and if M1-M2 is an odd number, encrypted code data 1 is embedded (steps S104 to S106).

このようにして1グループ内の全てのDCTブロックからbit(1 or 0)を検出し(本例では全部で512bit)、これに対し暗号の復号化を行う(図13のステップS89)。復号時には埋め込み時と同じ暗号鍵を用いる。これにより得られた512bitの復号化データ符号に対し、誤り検出復号ステップ(ステップS90)にて誤り検出復号化処理を行う。その結果、誤りの有無が得られ、もし誤りがなければ448bitの埋め込み透かしデータが得られ、誤りがあれば誤りを含むグループがどれであるかの情報が得られる。ただし、余りのグループに対しては暗号の復号化や誤り検出復号は行わずに、単に第1のグループとbit値の並びが同じかどうかのみをチェックする。   In this way, bit (1 or 0) is detected from all the DCT blocks in one group (in this example, 512 bits in total), and the encryption is decrypted (step S89 in FIG. 13). At the time of decryption, the same encryption key as at the time of embedding is used. An error detection decoding process is performed in the error detection decoding step (step S90) on the 512-bit decoded data code obtained as described above. As a result, the presence / absence of an error is obtained. If there is no error, 448-bit embedded watermark data is obtained, and if there is an error, information indicating which group includes the error is obtained. However, the remaining groups are not subjected to encryption decryption or error detection decryption, but are merely checked whether the bit groups are the same as the first group.

続いてステップS91において、通常のJPEG復号化の手順(図1(b)のステップS24〜S26)と同様に各DCTブロックの量子化係数を逆量子化しDCT係数に戻し、それに対し逆DCTを行い、さらに色空間変換を行って映像とする。   Subsequently, in step S91, the quantization coefficient of each DCT block is dequantized and returned to the DCT coefficient similarly to the normal JPEG decoding procedure (steps S24 to S26 in FIG. 1B), and inverse DCT is performed on it. Further, color space conversion is performed to obtain an image.

前記誤り検出復号ステップ(ステップS90)にて得られた誤りの有無、誤りグループ、埋め込み透かしデータを用いて、以下のように改ざんの有無と改ざん場所が分かる。   Using the presence / absence of error, error group, and embedded watermark data obtained in the error detection / decoding step (step S90), the presence / absence of alteration and the location of alteration are known as follows.

すなわち、全てのグループから誤りが検出されなかった場合(余りのグループでは第1のグループとデータが同じ場合)は、その映像は透かし埋め込み後から改ざんされていないとみなす(図15)。   That is, if no error is detected from all the groups (if the remaining groups have the same data as the first group), it is assumed that the video has not been tampered with after watermark embedding (FIG. 15).

また、誤りが検出されたグループ内の映像が原本とは異なっている、つまり改ざんされている場合は、グループを構成するDCTブロックが占めるエリア内のどこかに改ざんの可能性がある(図16)。   Also, if the video in the group in which the error is detected is different from the original, that is, it has been tampered with, there is a possibility that it has been tampered somewhere in the area occupied by the DCT blocks constituting the group (FIG. 16). ).

誤り箇所すなわち改ざん箇所を表現する場合は図16に示すようにJPEG復号化された映像に改ざんされたグループの位置をあらわす目印(図16の黒塗り部分)を重畳表示すると、どこが改ざんされたかが分かりやすい。   When expressing an error part, that is, a falsified part, as shown in FIG. 16, if a mark (blacked part in FIG. 16) indicating the position of the falsified group is superimposed on the JPEG-decoded video, it can be seen where the falsified part is. Cheap.

(実施例)
本発明では、前記実施形態例の説明で述べた構成以外にも、幾つかの構成をとり得る。構成のバリエーションは、埋め込む電子透かしデータのbit数の多寡、埋め込む対象の色成分の組み合わせ、誤り検出符号の種類、暗号化方法の種類、乱数発生方法の種類を変えることにより、多種多様な構成が得られる。ここでは、それぞれの構成要素が取り得る方法・種類について詳しく述べる。
(Example)
In the present invention, there can be several configurations other than the configuration described in the description of the embodiment. Variations in the configuration can be achieved by changing the number of bits in the digital watermark data to be embedded, the combination of the color components to be embedded, the type of error detection code, the type of encryption method, and the type of random number generation method. can get. Here, the methods and types that each component can take will be described in detail.

1.埋め込み電子透かしデータbit数
(1)誤り検出符号の面からは、誤り検出符号が構成できる条件で任意の値を取り得る。例えば最小としたいのなら、データ1bitとパリティ1bitとなる。最大値の方は映像の大きさで決まる。例えば640×480画素のVGA画像を扱う場合はY成分のDCT個数は4800個であるから、Y成分のみを使う場合はデータbit数の最大値は誤り検出符号を加えて4800以下ということになる。
(2)暗号化方式の面からは、暗号化方式の選び方でbit数が制約を受ける。詳細な説明で述べたcamellia暗号はブロック暗号と呼ばれ、128bit長を1ブロックとしたデータを、128bitの暗号化された符号データに変換する。この場合誤り検出符号を加えたbit数はブロック長128の倍数であることが望ましい。必須ではなく望ましいとしたのは、128の倍数でなくても、bit数が足りない分は0か1のデータを付加すること(パディング)により128の倍数に出来るからである。しかしながら、パディングにより無意味なデータを付加するよりは、何かしら意味のあるデータを付加した方がアプリケーション面では有利と言える。
(3)埋め込むデータを何にするかはアプリケーションに依存するが、例えば映像を証拠に利用する場合は、カメラ固有ID、撮影時刻(あればカメラ内時計より取得する)、撮影場所(GPS等により取得する)を埋め込んでも良い。また、改ざん場所を特定するためには、映像をグループ分けしたそれぞれのグループに0あるいは1から通し番号を振り、それを埋め込んでも良い。埋め込むデータフォーマットの例を図17に示す。埋め込むデータとフォーマットはこの例に限らず任意に設計し得る。
1. Number of embedded digital watermark data bits (1) From the aspect of error detection code, an arbitrary value can be taken under the condition that the error detection code can be configured. For example, if it is desired to minimize the data, the data is 1 bit and the parity is 1 bit. The maximum value is determined by the size of the image. For example, when a VGA image of 640 × 480 pixels is handled, the number of DCTs of the Y component is 4800. Therefore, when only the Y component is used, the maximum number of data bits is 4800 or less including the error detection code. .
(2) From the aspect of the encryption method, the number of bits is restricted by how the encryption method is selected. The camellia cipher described in the detailed description is called a block cipher, and converts data having a 128-bit length into one block into 128-bit encrypted code data. In this case, the number of bits including the error detection code is desirably a multiple of the block length 128. The reason why it is not essential but desirable is that even if it is not a multiple of 128, it can be made a multiple of 128 by adding 0 or 1 data (padding) to the extent that the number of bits is insufficient. However, it can be said that it is more advantageous in terms of application to add some meaningful data than to add meaningless data by padding.
(3) What data to embed depends on the application. For example, when using video as evidence, the camera-specific ID, the shooting time (obtained from the camera clock, if any), the shooting location (by GPS, etc.) May be embedded). Further, in order to specify the alteration location, a serial number from 0 or 1 may be assigned to each group in which the video is grouped and embedded. An example of the data format to be embedded is shown in FIG. The embedded data and format are not limited to this example, and can be arbitrarily designed.

2.埋め込み対象色成分選択の組み合わせ
(1)前記実施形態例の説明で述べたように、Y,Cb,Crの中から選択する。それぞれ単独にひとつ選択しても良いし、任意の2つを選んでも良く、また3つともを選ぶこともできる。Yのみを選んだ場合は白黒映像にも対応できるという利点を生じる。Cbのみを選んだ場合は、人間の視覚は青黄色成分の変化を知覚しにくいため、電子透かしが目立ちにくいという利点を生じる。Crのみを選ぶというのは特に利点がないので採用し難い。複数の色成分を選ぶ場合は、DCTブロック数が増えるので、より多くのデータを埋め込めるという利点が生じる。
2. Combinations of embedding target color component selection (1) As described in the description of the above embodiment, selection is made from Y, Cb, and Cr. Each of them can be selected individually, any two can be selected, or all three can be selected. When only Y is selected, there is an advantage that black and white images can be handled. When only Cb is selected, the human vision is less likely to perceive the change in the blue-yellow component, so that the digital watermark is less noticeable. It is difficult to select only Cr because there is no particular advantage. In the case of selecting a plurality of color components, the number of DCT blocks increases, so that there is an advantage that more data can be embedded.

3.誤り検出符号の種類
(1)行パリティ。最も簡単な誤り検出符号であり、元bitデータを行列の形に並べ、各行にパリティbitを1bit付加したものである。すなわち、例えば図18に示すように、埋め込みデータを64行×7列(=448)に並べ、各行の末尾に偶数パリティピットを付加する。偶数パリティとは、パリティビットも含めた各行のビット並び中の1の数が偶数になるように、パリティビットを0か1に定める方法である。
3. Error detection code type (1) Row parity. This is the simplest error detection code, in which original bit data is arranged in a matrix form and 1 bit of parity bit is added to each row. That is, for example, as shown in FIG. 18, the embedded data is arranged in 64 rows × 7 columns (= 448), and even parity pits are added to the end of each row. The even parity is a method of setting the parity bit to 0 or 1 so that the number of 1s in the bit arrangement of each row including the parity bit becomes an even number.

また奇数パリティであれば、1の数が奇数個になるようにパリティbitを選ぶ。パリティbitを付加した分、全体のbit数が増える。前記実施形態例の説明では元データ448bitを64行に並べていたため、総bitは64bit増えて448+64=512bitとなる。行パリティと似たものに列パリティがある。パリティの付加を列単位に行うことのみ異なり、他は行パリティと同じである。
(2)行列パリティ。元bitデータを行列の形に並べ、各行と各列にパリティbitを付加したものである。垂直水平パリティとも呼ばれる。行パリティ、列パリティ単独よりも付加するパリティbitは増えるが、誤り検出の精度はより高くなる。
(3)ハミング符号(非特許文献3の47〜53頁を参照)。ハミング符号では元データbitをk個、検査bit(冗長bit)をm個とすると、2m−m≧k+1の関係となる。例えば総bit数が500bit程度と仮定するとm=9、k=502の組み合わせがある。つまり、元データが502bitで、検査bitが9bit、総bitが511bitである。なお、ハミング符号は誤り検出だけでなく誤り訂正も可能であるが、本発明では誤り訂正機能は使用しない。
(4)巡回符号(CRC符号;非特許文献3の54〜65頁を参照)。巡回符号はハードウェア化しやすいという特徴を持つ。巡回符号も誤り検出だけでなく誤り訂正が可能であるが、本発明では誤り訂正機能は使用しない。
(5)BCH符号(非特許文献3の66〜75頁を参照)。BCH符号は巡回符号の一種でランダム誤りの訂正能力が高い。しかしながら、本発明では誤り訂正機能は使用しないため、BCH符号を採用するのは、既にBCH符号化モジュールが存在しており、それを流用することでコスト的な利点があるときに限られる。
(6)RS符号(リードソロモン符号;非特許文献3の76〜81頁を参照)。RS符号は巡回符号の一種でバースト誤りの訂正能力が高い。しかしながら、本発明では誤り訂正機能は使用しないため、RS符号を採用するのは、既にRS符号化モジュールが存在しており、それを流用することでコスト的な利点があるときに限られる。
If the parity is odd, the parity bit is selected so that the number of 1s is odd. By adding the parity bit, the total number of bits increases. In the description of the embodiment, the original data 448 bits are arranged in 64 rows, so the total bits increase by 64 bits to 448 + 64 = 512 bits. Similar to row parity is column parity. The only difference is that the addition of parity is performed in units of columns, and the others are the same as row parity.
(2) Matrix parity. Original bit data is arranged in a matrix form, and parity bits are added to each row and each column. Also called vertical and horizontal parity. Although more parity bits are added than row parity and column parity alone, the accuracy of error detection is higher.
(3) Hamming code (see pages 47 to 53 of Non-Patent Document 3). In the Hamming code, if the number of original data bits is k and the number of check bits (redundancy bits) is m, the relationship is 2 m −m ≧ k + 1. For example, assuming that the total number of bits is about 500 bits, there are combinations of m = 9 and k = 502. That is, the original data is 502 bits, the inspection bit is 9 bits, and the total bit is 511 bits. Although the Hamming code can not only detect errors but also correct errors, the present invention does not use an error correction function.
(4) Cyclic code (CRC code; see pages 54 to 65 of Non-Patent Document 3). Cyclic codes have the feature of being easily implemented as hardware. Although the cyclic code can correct not only errors but also errors, the present invention does not use an error correction function.
(5) BCH code (see pages 66 to 75 of Non-Patent Document 3). The BCH code is a kind of cyclic code and has a high ability to correct random errors. However, since the error correction function is not used in the present invention, the BCH code is adopted only when the BCH coding module already exists and there is a cost advantage by diverting it.
(6) RS code (Reed-Solomon code; see pages 76 to 81 of Non-Patent Document 3). The RS code is a kind of cyclic code and has high burst error correction capability. However, since the error correction function is not used in the present invention, the RS code is employed only when the RS encoding module already exists and there is a cost advantage by diverting it.

4.暗号化方法の種類
(1)camellia暗号(非特許文献4を参照)。camellia暗号は共通鍵方式128bitブロック暗号であり、暗号化と復号化には共通の鍵を用いる。128bitブロック暗号とは128bitの元データを128bitの暗号化データに暗号化及び128bitの暗号化データを128bitの元データに復号化できることを示す。暗号化と復号化の際には共通鍵が必要である。共通鍵は128bit長、196bit長、256bit長のいずれかを使うことができる。鍵長が長いほど暗号強度(暗号の破られ難さ)が高い。
(2)AES暗号(非特許文献5を参照)。AES暗号は共通鍵方式128bitブロック暗号であり、暗号化と復号化には共通の鍵を用いる。128bitブロック暗号とは128bitの元データを128bitの暗号化データに暗号化及び128bitの暗号化データを128bitの元データに復号化できることを示す。暗号化と復号化の際には共通鍵が必要である。共通鍵は128bit長、196bit長、256bit長のいずれかを使うことができる。鍵長が長いほど暗号強度(暗号の破られ難さ)が高い。
4). Types of encryption methods (1) Camellia encryption (see Non-Patent Document 4). The Camellia cipher is a common key 128-bit block cipher, and a common key is used for encryption and decryption. The 128-bit block cipher indicates that 128-bit original data can be encrypted into 128-bit encrypted data, and 128-bit encrypted data can be decrypted into 128-bit original data. A common key is required for encryption and decryption. The common key can be 128-bit length, 196-bit length, or 256-bit length. The longer the key length, the higher the cryptographic strength (hardness to break the encryption).
(2) AES encryption (see Non-Patent Document 5). The AES cipher is a common key 128-bit block cipher, and a common key is used for encryption and decryption. The 128-bit block cipher indicates that 128-bit original data can be encrypted into 128-bit encrypted data, and 128-bit encrypted data can be decrypted into 128-bit original data. A common key is required for encryption and decryption. The common key can be 128-bit length, 196-bit length, or 256-bit length. The longer the key length, the higher the cryptographic strength (hardness to break the encryption).

5.乱数発生方法
(1)線形合同法。擬似乱数列を生成するアルゴリズムである。アルゴリズムは漸化式Xn+1=(A*Xn+B)Mod Mにて与えられる。A,B,Mは定数でM>A,M>B,A>0,B>0である。X0が乱数の種であり、これを決めると以降のX1,X2,...が再現可能な形で得られる。本発明ではM,A,Bは予め適当な値を決めておき、その情報を埋め込み側と検出側で共有する。乱数の種X0も適当な値を決めておいて、埋め込み側と検出側で共有しておけば良いが、本発明では暗号鍵に使った値をそのまま用いるのが簡単である。
(2)混合合同法。擬似乱数列を生成するアルゴリズムである。本アルゴリズムでは整数の初期値aと値b,cを決定し、ab+c=a’の式に代入する。求まったa’の中央からaと同じ桁だけ数を抜き出し乱数を得る。その後、再び上記の式のaに得られた乱数を代入する作業を繰り返して擬似乱数列を得る。初期値aが乱数の種となる。乱数の種は適当な値を決めておいて、埋め込み側と検出側で共有しておけば良いが、本発明では暗号鍵に使った値をそのまま用いるのが簡単である。
5). Random number generation method (1) Linear congruence method. This is an algorithm for generating a pseudo-random number sequence. The algorithm is given by the recurrence formula Xn + 1 = (A * Xn + B) Mod M. A, B, and M are constants, and M> A, M> B, A> 0, and B> 0. X 0 is a seed of random numbers, and when this is determined, X 1 , X 2 ,. . . Is obtained in a reproducible form. In the present invention, appropriate values for M, A, and B are determined in advance, and the information is shared between the embedding side and the detection side. The random seed X 0 may also be determined as an appropriate value and shared between the embedding side and the detection side, but in the present invention, it is easy to use the value used for the encryption key as it is.
(2) Mixed joint method. This is an algorithm for generating a pseudo-random number sequence. In this algorithm, an integer initial value a and values b and c are determined and substituted into the equation ab + c = a ′. A random number is obtained by extracting the same number of digits as a from the center of the obtained a ′. Thereafter, the operation of substituting the random number obtained in the above equation a again is repeated to obtain a pseudo-random number sequence. The initial value a is a seed for random numbers. An appropriate value for the seed of the random number may be determined and shared between the embedding side and the detection side, but in the present invention, it is easy to use the value used for the encryption key as it is.

6.発明の構成要素のバリエーション
ここでは請求項2、5に係る発明の実施例を説明する。デジタルカメラの中には光学部と電子回路部を一体化したカメラモジュールを使用して製造しているものがあり、光学部で受光した映像はカメラモジュールからJPEGフォーマットデータとして出力される。この場合、JPEG符号化途中のDCT係数を外へ取り出すことはできない。請求項2、5はこのようなカメラモジュールを使用しているデジタルカメラに本発明を適用するための構成である。カメラモジュールからDCT係数を取り出せないため、JPEGフォーマットデータを受け取り、それをJFIF形式からのデータ整形とエントロピー復号を行ってDCT係数を得る。この構成変更により、請求項1、4と同じようにDCT係数を変更することが可能となる。
6). Variations of constituent elements of the invention Examples of the inventions according to claims 2 and 5 will now be described. Some digital cameras are manufactured using a camera module in which an optical unit and an electronic circuit unit are integrated, and an image received by the optical unit is output from the camera module as JPEG format data. In this case, DCT coefficients in the middle of JPEG encoding cannot be taken out. Claims 2 and 5 are configurations for applying the present invention to a digital camera using such a camera module. Since the DCT coefficient cannot be extracted from the camera module, JPEG format data is received, data shaping from the JFIF format and entropy decoding are performed to obtain the DCT coefficient. With this configuration change, the DCT coefficient can be changed as in the first and fourth aspects.

以下、この実施例を図19、図20と共に説明する。図19は、本発明を適用した透かし埋め込み付きJPEG符号化装置の構成の他の例を示している。図19において、111は埋め込み対象のデジタル映像を入力する映像入力手段である。   This embodiment will be described below with reference to FIGS. FIG. 19 shows another example of the configuration of a JPEG encoding apparatus with watermark embedding to which the present invention is applied. In FIG. 19, reference numeral 111 denotes video input means for inputting a digital video to be embedded.

112は映像をJPEG符号化するJPEG符号化手段であり、前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理、DCT係数量子化処理、エントロピー圧縮処理およびJFIF形式への整形処理(すなわち図1(a)のステップS12〜S17の処理)を行う。   112 is a JPEG encoding means for JPEG encoding the video. For the input video, YCbCr conversion processing, downsampling processing, DCT processing, DCT coefficient quantization processing, entropy compression processing, and entropy compression processing in a normal JPEG encoding process A shaping process into the JFIF format (that is, the processes in steps S12 to S17 in FIG. 1A) is performed.

113は、前記JPEG符号化手段112からJPEGフォーマットデータを受け取り、それをJFIF形式からデータ列へ整形し、エントロピー復号処理してDCT係数を得るデータ整形・エントロピー復号手段である。   A data shaping / entropy decoding unit 113 receives JPEG format data from the JPEG encoding unit 112, shapes the data into a data string from the JFIF format, and performs entropy decoding to obtain a DCT coefficient.

114は、前記入力映像に埋め込む電子透かしデータを入力する電子透かしデータ入力手段である。   Reference numeral 114 denotes digital watermark data input means for inputting digital watermark data to be embedded in the input video.

115は、前記入力された電子透かしデータを、所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段である。   Reference numeral 115 denotes digital watermark data error detection coding means for providing the input digital watermark data with error redundancy code data by using a predetermined error detection coding method.

116は、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段である。   Reference numeral 116 denotes encryption means for converting the error detection code data into code data that has been encrypted by a predetermined encryption method.

117は、前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段である。   Reference numeral 117 denotes color component selection means for selecting a color component in which the encoded code data is embedded.

118は、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段である。   Reference numeral 118 denotes DCT block group dividing means for dividing the DCT block of the selected color component into groups of the same number as the number of bits of the encoded code data, and setting the remaining DCT blocks alone as one group.

119は、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段である。   Reference numeral 119 denotes maximum value selection means for selecting a value having the maximum absolute value from among the quantized coefficients of the DCT blocks belonging to the divided groups.

120は、所定の乱数発生手段121から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段である。   Reference numeral 120 denotes reference value selection means for selecting one reference value from the quantized coefficients excluding those having the maximum absolute value of the quantized coefficients, based on the random number value obtained from the predetermined random number generating means 121.

122は、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段である。   122 is a DCT block in which bit 0 of the encrypted code data is embedded, bit 1 of the encrypted code data is set so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. In the case of a DCT block to be embedded, the maximum value of the quantization coefficient absolute value is set to −K, 0, K (K is an arbitrary value so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value becomes an odd number. The coded code data embedding means embeds a predetermined pattern of 0 and 1 in the DCT block of the remainder group.

123は、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段である。   Reference numeral 123 denotes entropy compression means for compressing the quantized coefficients after completion of the embedding in the same manner as the entropy compression processing in the normal JPEG encoding process.

124は、前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形するJFIF形式整形手段である。   Reference numeral 124 denotes JFIF format shaping means for shaping the compressed data so as to conform to a predetermined JPEG format.

図19に記載の前記各手段111〜124の各機能は、例えばコンピュータによって達成される。   The functions of the means 111 to 124 shown in FIG. 19 are achieved by, for example, a computer.

次に図19の装置で行われる処理手順を図20のフローチャートとともに説明する。まず映像入力ステップ(ステップS111)により埋め込み対象のデジタル映像を得る。   Next, a processing procedure performed by the apparatus of FIG. 19 will be described with reference to a flowchart of FIG. First, a digital video to be embedded is obtained by a video input step (step S111).

次にステップS112において、通常のJPEG符号化の工程と同じ処理(図1(a)のステップS12〜S17)を進め、JPEGフォーマットデータとして出力する。   Next, in step S112, the same processing as in the normal JPEG encoding process (steps S12 to S17 in FIG. 1A) proceeds, and is output as JPEG format data.

次にデータ整形・エントロピー復号ステップ(ステップS113)では、前記JPEGフォーマットデータを、JFIF形式からデータ列へ整形し、エントロピー復号を行ってDCT係数を得る。   Next, in a data shaping / entropy decoding step (step S113), the JPEG format data is shaped from the JFIF format into a data string, and entropy decoding is performed to obtain DCT coefficients.

次に、電子透かしデータ入力ステップ(ステップS114)により得られた電子透かしデータを、前記図3のステップS33と同様に処理する。   Next, the digital watermark data obtained in the digital watermark data input step (step S114) is processed in the same manner as in step S33 of FIG.

次に透かしデータ誤り検出符号化ステップ(ステップS115)では、前記電子透かしデータを、前記図3のステップS34で述べた誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする。   Next, in a watermark data error detection encoding step (step S115), redundancy is added to the digital watermark data by the error detection encoding method described in step S34 of FIG.

次に暗号化ステップ(ステップS116)では、前記誤り検出符号化された512bitのデータを、前記図3のステップS35で述べた方法により暗号化して暗号化済みデータを生成する。   Next, in the encryption step (step S116), the 512-bit data subjected to the error detection encoding is encrypted by the method described in step S35 of FIG. 3 to generate encrypted data.

次に色成分選択ステップ(ステップS117)では、前記暗号化済み符号データを埋め込む色成分を前記図3のステップS36で述べた方法により選択する。   Next, in the color component selection step (step S117), the color component in which the encrypted code data is embedded is selected by the method described in step S36 of FIG.

次にDCTブロックグループ分割ステップ(ステップS118)では、前記図3のステップS37で述べた方法により映像中のDCTブロックのグループ分割を行う。   Next, in the DCT block group division step (step S118), the DCT block in the video is divided into groups by the method described in step S37 of FIG.

次に暗号化符号データ埋め込みステップ(ステップS122)では、前記図3のステップS41で述べた方法により、各グループに属するDCTブロックへ暗号化符号データを埋め込む。   Next, in the encryption code data embedding step (step S122), the encryption code data is embedded in the DCT block belonging to each group by the method described in step S41 of FIG.

そして、全てのグループについて暗号化済み符号データbitの埋め込みが終了したら、その後は通常のJPEG符号化の工程(図1(a)のステップS16,S17)と同様にエントロピー圧縮ステップ(ステップS123)と所定のJFIF形式に適合するようデータ整形ステップ(ステップS124)を実行しJPEG映像として出力する。   When embedding of the encrypted code data bits is completed for all the groups, the entropy compression step (step S123) is performed in the same manner as the normal JPEG encoding process (steps S16 and S17 in FIG. 1A). A data shaping step (step S124) is executed so as to conform to a predetermined JFIF format and output as a JPEG video.

また、本実施形態の改ざん検出用電子透かし埋め込み装置、電子透かしを用いた改ざん検出装置における各手段の一部もしくは全部の機能をコンピュータのプログラムで構成し、そのプログラムをコンピュータを用いて実行して本発明を実現することができること、本実施形態の改ざん検出用電子透かし埋め込み方法、電子透かしを用いた改ざん検出方法における各手順をコンピュータのプログラムで構成し、そのプログラムをコンピュータに実行させることができることは言うまでもなく、コンピュータでその機能を実現するためのプログラムを、そのコンピュータが読み取り可能な記録媒体、例えばFD(Floppy(登録商標) Disk)や、MO(Magneto−Optical disk)、ROM(Read Only Memory)、メモリカード、CD(Compact Disk)−ROM、DVD(Digital Versatile Disk)−ROM、CD−R、CD−RW,HDD,リムーバブルディスクなどに記録して、保存したり、配布したりすることが可能である。また、上記のプログラムをインターネットや電子メールなど、ネットワークを通して提供することも可能である。   Further, some or all of the functions of each means in the tamper detection digital watermark embedding apparatus and the digital tamper detection apparatus of this embodiment are configured by a computer program, and the program is executed using the computer. The present invention can be realized, each procedure in the falsification detection digital watermark embedding method and the digital falsification detection method of the present embodiment can be configured by a computer program, and the program can be executed by the computer. Needless to say, a program for realizing the functions of the computer is recorded on a computer-readable recording medium such as FD (Floppy (registered trademark) Disk), MO (Magneto-Optical disk), ROM (Read Only M). memory), memory card, CD (Compact Disk) -ROM, DVD (Digital Versatile Disk) -ROM, CD-R, CD-RW, HDD, removable disk, etc. for storage and distribution Is possible. It is also possible to provide the above program through a network such as the Internet or electronic mail.

本発明で採用する通常のJPEG符号化とJPEG復号化の処理を示すフローチャート。The flowchart which shows the process of normal JPEG encoding and JPEG decoding which are employ | adopted by this invention. 本発明の改ざん検出用電子透かし埋め込み装置の一実施形態例を示す構成図。1 is a block diagram showing an embodiment of a digital watermark embedding device for tampering detection according to the present invention. 本発明の改ざん検出用電子透かし埋め込み方法の一実施形態例を示すフローチャート。The flowchart which shows one Embodiment of the digital watermark embedding method for tampering detection of this invention. 本発明の実施形態例における量子化係数の例を示す説明図。Explanatory drawing which shows the example of the quantization coefficient in the embodiment of this invention. 本発明の実施形態例におけるDCTブロックグループ分けの一例を示す説明図。Explanatory drawing which shows an example of DCT block grouping in the embodiment of this invention. 本発明の実施形態例におけるDCTブロックグループ分けの他の例を示す説明図。Explanatory drawing which shows the other example of DCT block grouping in the embodiment of this invention. 図3のステップS41で実行される暗号化符号データ埋め込み処理を示すフローチャート。The flowchart which shows the encryption code data embedding process performed by FIG.3 S41. 図7のステップS52で実行される最大値M1の選択処理を示すフローチャート。The flowchart which shows the selection process of the maximum value M1 performed by step S52 of FIG. 本発明の実施形態例における逆ジグザグスキャンの様子を示す説明図。Explanatory drawing which shows the mode of the reverse zigzag scan in the embodiment of this invention. 本発明の実施形態例における最大値を飛ばしたラスタースキャンの様子を示す説明図。Explanatory drawing which shows the mode of the raster scan which skipped the maximum value in the example of embodiment of this invention. 図7のステップS54で実行される最大値M1の調整処理を示すフローチャート。The flowchart which shows the adjustment process of the maximum value M1 performed by step S54 of FIG. 本発明の電子透かしを用いた改ざん検出装置の一実施形態例を示す構成図。The block diagram which shows one Example of the tampering detection apparatus using the digital watermark of this invention. 本発明の電子透かしを用いた改ざん検出方法の一実施形態例を示すフローチャート。5 is a flowchart illustrating an embodiment of a tampering detection method using a digital watermark according to the present invention. 図13のステップS88で実行される誤り検出符号データ検出処理を示すフローチャート。14 is a flowchart showing error detection code data detection processing executed in step S88 of FIG. 本発明の実施形態例における、復号の結果、誤りが無い場合を示す説明図。Explanatory drawing which shows the case where there is no error as a result of decoding in the embodiment of the present invention. 本発明の実施形態例における、改ざん箇所の表示の様子を示す説明図。Explanatory drawing which shows the mode of a display of the tampering location in the example of embodiment of this invention. 本発明の実施形態例における、埋め込みデータのフォーマットの構成を示す説明図。Explanatory drawing which shows the structure of the format of embedded data in the embodiment of this invention. 本発明の実施形態例における、偶数行パリティビット付加の様子を示す説明図。Explanatory drawing which shows the mode of even-numbered row parity bit addition in the example of embodiment of this invention. 本発明の改ざん検出用電子透かし埋め込み装置の他の実施形態例を示す構成図。The block diagram which shows the other Example of an electronic watermark embedding apparatus for tampering detection of this invention. 本発明の改ざん検出用電子透かし埋め込み方法の他の実施形態例を示すフローチャート。10 is a flowchart showing another embodiment of a digital watermark embedding method for falsification detection according to the present invention.

符号の説明Explanation of symbols

31,111…映像入力手段、32,112…JPEG符号化手段、33、114…電子透かしデータ入力手段、34、115…電子透かしデータ誤り検出符号化手段、35、116…暗号化手段、36、83、117…色成分選択手段、37、84,118…DCTブロックグループ分割手段、38、85、119…最大値選択手段、39、86、120…基準値選択手段、40、87、121…乱数発生手段、41、122…暗号化済み符号データ埋め込み手段、42、123…エントロピー圧縮手段、43、124…JFIF形式整形手段、81…JPEG符号化映像データ入力手段、82、113…データ整形・エントロピー復号手段、88…最大値と基準値の差からビットデータを得る手段、91…JPEG復号手段、92…誤り発生箇所重畳表示手段。   31, 111 ... Video input means, 32, 112 ... JPEG encoding means, 33, 114 ... Digital watermark data input means, 34, 115 ... Digital watermark data error detection encoding means, 35, 116 ... Encryption means, 36, 83, 117 ... color component selection means, 37, 84, 118 ... DCT block group division means, 38, 85, 119 ... maximum value selection means, 39, 86, 120 ... reference value selection means, 40, 87, 121 ... random numbers Generation means, 41, 122 ... Encrypted code data embedding means, 42, 123 ... entropy compression means, 43, 124 ... JFIF format shaping means, 81 ... JPEG encoded video data input means, 82, 113 ... data shaping / entropy Decoding means, 88 ... means for obtaining bit data from the difference between the maximum value and the reference value, 91 ... JPEG decoding means, 92 ... error Raw place superimposed display means.

Claims (10)

映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、
映像入力手段が映像を入力するステップと、
JPEG符号化手段が、前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うステップと、
電子透かしデータ入力手段が、埋め込む電子透かしデータを入力するステップと、
電子透かしデータ誤り検出符号化手段が、前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとするステップと、
暗号化手段が、前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとするステップと、
色成分選択手段が、前記暗号化済み符号データを埋め込む色成分を選択するステップと、
DCTブロックグループ分割手段が、前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするステップと、
最大値選択手段が、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶステップと、
基準値選択手段が、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶステップと、
暗号化済み符号データ埋め込み手段が、前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加える暗号化済み符号データ埋め込みステップと、前記余りグループのDCTブロックには所定の0と1からなるパターンを前記暗号化済み符号データ埋め込みステップと同じ方法で埋め込む余りグループデータ埋め込みステップと、
JPEG符号化手段が、前記埋め込み完了後の量子化係数を通常のJPEG符号化工程と同様にエントロピー圧縮し、所定のJPEGフォーマットに適合するように整形してJPEG符号化を完了させるステップとを備えることを特徴とする改ざん検出用電子透かし埋め込み方法。
In a system that embeds a digital watermark for falsification detection at the same time as JPEG encoding the video,
A step in which video input means inputs video;
JPEG encoding means performs a YCbCr conversion process, a downsampling process, a DCT process, and a DCT coefficient quantization process in a normal JPEG encoding process on the input video;
A step in which digital watermark data input means inputs digital watermark data to be embedded;
Digital watermark data error detection encoding means, the step of giving the input digital watermark data to the data by a predetermined error detection encoding method to make the error detection code data;
An encryption means sets the error detection code data to code data encrypted by a predetermined encryption method;
A step of selecting a color component for embedding the encoded code data;
DCT block group dividing means divides the DCT block of the selected color component into the same number of groups as the number of bits of the encoded code data, and the remaining DCT blocks are made into one group by themselves;
A maximum value selecting means selecting a value having the maximum absolute value from among the quantized coefficients of the DCT blocks belonging to each of the divided groups;
A reference value selection means, based on a random number value obtained from a predetermined random number generation means, to select one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients;
If the encrypted code data embedding means is a DCT block in which bit 0 of the encrypted code data is embedded, the encryption is performed so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. If the DCT block embeds bit 1 of the already-encoded code data, the maximum value of the quantized coefficient absolute value is −K, 0, so that the difference between the maximum value of the quantized coefficient of the DCT block and the reference value becomes an odd number. Encrypted code data embedding step of adding any one of K (K is an arbitrary positive / odd number), and a predetermined pattern of 0 and 1 is the same as the encrypted code data embedding step in the DCT block of the remainder group A remainder group data embedding step embedded in the method,
JPEG encoding means includes a step of entropy compressing the quantized coefficient after completion of the embedding in the same manner as in a normal JPEG encoding process, shaping it so as to conform to a predetermined JPEG format, and completing JPEG encoding. An electronic watermark embedding method for falsification detection characterized by the above.
前記通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うステップと、前記埋め込む電子透かしデータを入力するステップとの間に、
JPEG符号化手段が、前記量子化係数を圧縮し所定のJPEGフォーマットに適合するよう整形するステップと、
データ整形・エントロピー復号手段が、前記JPEGフォーマットに対してデータ整形およびエントロピー復号を行ってDCT係数値を得るステップとを実行することを特徴とする請求項1に記載の改ざん検出用電子透かし埋め込み方法。
Between the step of performing YCbCr conversion processing, downsampling processing, DCT processing and DCT coefficient quantization processing in the normal JPEG encoding step, and inputting the embedded watermark data,
JPEG encoding means compresses the quantized coefficient and shapes it to conform to a predetermined JPEG format;
The method for embedding a digital watermark for tampering detection according to claim 1, wherein the data shaping / entropy decoding means performs a step of data shaping and entropy decoding on the JPEG format to obtain a DCT coefficient value. .
請求項1又は2に記載の改ざん検出用電子透かし埋め込み方法によって改ざん検出用電子透かしが埋め込まれ、JPEG符号化された映像から、電子透かしを検出して映像が改ざんされたかどうかを調べるシステムにおいて、
映像入力手段が、前記JPEG符号化映像を入力するステップと、
JPEG復号化手段が、前記入力されたJPEG符号化映像に対して、通常のJPEG復号化工程におけるデータ整形処理およびエントロピー復号処理を行うステップと、
色成分選択手段が、前記誤り検出符号データが埋め込まれた色成分を選択するステップと、
DCTブロックグループ分割手段が、前記選択した色成分のDCTブロックを前記暗号化済み符号化データのbit数と同じ個数ずつDCTブロックを含むグループに分割するステップと、
最大値選択手段が、前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶステップと、
基準値選択手段が、所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶステップと、
最大値と基準値の差からビットデータを得る手段が、前記最大値と基準値の差が偶数なら0を、奇数なら1を各々出力するステップと、
暗号復号化手段が、前記出力された0又は1を所定の暗号復号化の入力bitとして対応付け暗号復号化を行うステップと、
誤り検出復号手段が、前記暗号復号化したデータに対し所定の誤り検出復号化を行い、誤りの有無と、誤り有りの場合は誤りの発生したDCTブロックを含むグループと、誤り無しの場合は埋め込まれた電子透かしデータとを得るステップと、
JPEG復号化手段が、前記入力されたJPEG符号化映像を通常のJPEG復号化工程を行って映像とするステップと、
表示手段が、前記復号された映像と共に前記誤りの有無と誤りの発生したグループに属するDCTブロックの位置を目立つように表示するステップとを備えることを特徴とする電子透かしを用いた改ざん検出方法。
In the system for checking whether or not the video is falsified by detecting the digital watermark from the JPEG-encoded video in which the digital watermark for alteration detection is embedded by the digital watermark embedding method for alteration detection according to claim 1 or 2.
Video input means for inputting the JPEG encoded video;
A step in which JPEG decoding means performs a data shaping process and an entropy decoding process in a normal JPEG decoding process on the input JPEG encoded video;
A step of selecting a color component in which the error detection code data is embedded;
DCT block group dividing means for dividing the DCT block of the selected color component into a group including DCT blocks by the same number as the number of bits of the encrypted encoded data;
A maximum value selecting means selecting a value having the maximum absolute value from among the quantized coefficients of the DCT blocks belonging to each of the divided groups;
A reference value selection means, based on a random number value obtained from a predetermined random number generation means, to select one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients;
Means for obtaining bit data from the difference between the maximum value and the reference value, outputting 0 if the difference between the maximum value and the reference value is even;
Encryption / decryption means performs the associated encryption / decryption using the output 0 or 1 as a predetermined encryption / decryption input bit;
Error detection / decryption means performs predetermined error detection / decryption on the encrypted / decrypted data, and if there is an error, if there is an error, a group including a DCT block in which an error has occurred, and if there is no error, embedding is performed. Obtaining the digital watermark data,
JPEG decoding means performing the normal JPEG decoding process to the input JPEG encoded video as a video; and
A tamper detection method using a digital watermark, characterized in that a display means displays the presence / absence of the error and the position of a DCT block belonging to the group in which the error occurred together with the decoded video.
映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、
映像を入力する映像入力手段と、
前記入力映像に対して、通常のJPEG符号化工程におけるYCbCr変換処理、ダウンサンプリング処理、DCT処理およびDCT係数量子化処理を行うJPEG符号化手段と、
埋め込む電子透かしデータを入力する電子透かしデータ入力手段と、
前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段と、
前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段と、
前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段と、
前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段と、
前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、
所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、
前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段と、
前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段と、
前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形する整形手段とを備えることを特徴とする改ざん検出用電子透かし埋め込み装置。
In a system that embeds a digital watermark for falsification detection at the same time as JPEG encoding the video,
Video input means for inputting video;
JPEG encoding means for performing YCbCr conversion processing, downsampling processing, DCT processing, and DCT coefficient quantization processing in a normal JPEG encoding process for the input video;
Digital watermark data input means for inputting digital watermark data to be embedded;
Digital watermark data error detection encoding means for providing redundancy to the input digital watermark data by a predetermined error detection encoding method to obtain error detection code data;
Encryption means for converting the error detection code data into code data encrypted by a predetermined encryption method;
Color component selection means for selecting a color component for embedding the encrypted code data;
DCT block group dividing means for dividing the DCT block of the selected color component into a group of the same number as the number of bits of the encoded code data, and setting the remaining DCT blocks alone as one group;
Maximum value selection means for selecting a value having the maximum absolute value from among the quantization coefficients of the DCT blocks belonging to each of the divided groups;
A reference value selecting means for selecting one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients based on a random number value obtained from a predetermined random number generating means;
If the DCT block embeds bit 0 of the encrypted code data, the DCT block embeds bit 1 of the encrypted code data so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. If so, the maximum value of the quantization coefficient absolute value is −K, 0, K (K is an arbitrary positive / odd number) so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an odd number. Any one of the above, and encrypted code data embedding means for embedding a predetermined pattern of 0 and 1 in the DCT block of the remainder group,
Entropy compression means for compressing the quantized coefficients after the completion of embedding in the same manner as the entropy compression processing in the normal JPEG encoding process;
A tamper detection digital watermark embedding apparatus comprising: shaping means for shaping the compressed data so as to conform to a predetermined JPEG format.
映像をJPEG符号化すると同時に改ざん検出用電子透かしを埋め込むシステムにおいて、
映像を入力する映像入力手段と、
前記入力映像を通常のJPEG符号化工程によって符号化するJPEG符号化手段と、
前記JPEG符号化手段により符号化されたJPEGフォーマットに対してデータ整形およびエントロピー復号を行ってDCT係数値を得るデータ整形・エントロピー復号手段と、
埋め込む電子透かしデータを入力する電子透かしデータ入力手段と、
前記入力された電子透かしデータを所定の誤り検出符号化方法によりデータに冗長性を付与し誤り検出符号データとする電子透かしデータ誤り検出符号化手段と、
前記誤り検出符号データを所定の暗号化方法により暗号化済み符号データとする暗号化手段と、
前記暗号化済み符号データを埋め込む色成分を選択する色成分選択手段と、
前記選択した色成分のDCTブロックを暗号化済み符号データのbit数と同じ個数ずつのグループに分割し、余りのDCTブロックはそれらだけで1グループとするDCTブロックグループ分割手段と、
前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、
所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、
前記暗号化済み符号データのbit0を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が偶数になるように、暗号化済み符号データのbit1を埋め込むDCTブロックであれば、当該DCTブロックの量子化係数の最大値と前記基準値の差が奇数になるように、量子化係数絶対値の最大値に−K,0,K(Kは任意の正奇数)のいずれかを加え、前記余りグループのDCTブロックには所定の0と1からなるパターンを埋め込む暗号化済み符号データ埋め込み手段と、
前記埋め込み完了後の量子化係数を通常のJPEG符号化工程におけるエントロピー圧縮処理と同様に圧縮するエントロピー圧縮手段と、
前記圧縮されたデータを所定のJPEGフォーマットに適合するように整形する整形手段とを備えることを特徴とする改ざん検出用電子透かし埋め込み装置。
In a system that embeds a digital watermark for falsification detection at the same time as JPEG encoding the video,
Video input means for inputting video;
JPEG encoding means for encoding the input video by a normal JPEG encoding process;
Data shaping and entropy decoding means for obtaining DCT coefficient values by performing data shaping and entropy decoding on the JPEG format encoded by the JPEG encoding means;
Digital watermark data input means for inputting digital watermark data to be embedded;
Digital watermark data error detection encoding means for providing redundancy to the input digital watermark data by a predetermined error detection encoding method to obtain error detection code data;
Encryption means for converting the error detection code data into code data encrypted by a predetermined encryption method;
Color component selection means for selecting a color component for embedding the encrypted code data;
DCT block group dividing means for dividing the DCT block of the selected color component into a group of the same number as the number of bits of the encoded code data, and setting the remaining DCT blocks alone as one group;
Maximum value selection means for selecting a value having the maximum absolute value from among the quantization coefficients of the DCT blocks belonging to each of the divided groups;
A reference value selecting means for selecting one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients based on a random number value obtained from a predetermined random number generating means;
If the DCT block embeds bit 0 of the encrypted code data, the DCT block embeds bit 1 of the encrypted code data so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an even number. If so, the maximum value of the quantization coefficient absolute value is −K, 0, K (K is an arbitrary positive / odd number) so that the difference between the maximum value of the quantization coefficient of the DCT block and the reference value is an odd number. Any one of the above, and encrypted code data embedding means for embedding a predetermined pattern of 0 and 1 in the DCT block of the remainder group,
Entropy compression means for compressing the quantized coefficients after the completion of embedding in the same manner as the entropy compression processing in the normal JPEG encoding process;
A tamper detection digital watermark embedding apparatus comprising: shaping means for shaping the compressed data so as to conform to a predetermined JPEG format.
請求項4又は5に記載の改ざん検出用電子透かし埋め込み装置によって改ざん検出用電子透かしが埋め込まれ、JPEG符号化された映像から、電子透かしを検出して映像が改ざんされたかどうかを調べるシステムにおいて、
前記JPEG符号化映像を入力する映像入力手段と、
前記入力されたJPEG符号化映像に対して、通常のJPEG復号化工程におけるデータ整形処理およびエントロピー復号処理を行う手段と、
前記誤り検出符号データが埋め込まれた色成分を選択する色成分選択手段と、
前記選択した色成分のDCTブロックを前記暗号化済み符号化データのbit数と同じ個数ずつDCTブロックを含むグループに分割するDCTブロックグループ分割手段と、
前記分割された各グループに属するDCTブロックの量子化係数の中から絶対値が最大の値を選ぶ最大値選択手段と、
所定の乱数発生手段から得られた乱数値に基き、前記量子化係数の絶対値最大のものを除いた量子化係数から1つの基準値を選ぶ基準値選択手段と、
前記最大値と基準値の差が偶数なら0を、奇数なら1を各々出力する最大値と基準値の差からビットデータを得る手段と、
前記出力された0又は1を所定の暗号復号化の入力bitとして対応付け暗号復号化を行う暗号復号化手段と、
前記暗号復号化したデータに対し所定の誤り検出復号化を行い、誤りの有無と、誤り有りの場合は誤りの発生したDCTブロックを含むグループと、誤り無しの場合は埋め込まれた電子透かしデータとを得る誤り検出復号手段と、
前記入力されたJPEG符号化映像を通常のJPEG復号化工程を行って映像とするJPEG復号化手段と、
前記復号された映像と共に前記誤りの有無と誤りの発生したグループに属するDCTブロックの位置を目立つように表示する表示手段とを備えることを特徴とする電子透かしを用いた改ざん検出装置。
In the system for checking whether or not the video is falsified by detecting the digital watermark from the JPEG encoded video in which the digital watermark for falsification detection is embedded by the digital watermark embedding device for alteration detection according to claim 4 or 5.
Video input means for inputting the JPEG encoded video;
Means for performing a data shaping process and an entropy decoding process in a normal JPEG decoding process on the input JPEG encoded video;
Color component selection means for selecting a color component in which the error detection code data is embedded;
DCT block group dividing means for dividing the DCT block of the selected color component into a group including DCT blocks by the same number as the number of bits of the encoded data.
Maximum value selection means for selecting a value having the maximum absolute value from among the quantization coefficients of the DCT blocks belonging to each of the divided groups;
A reference value selecting means for selecting one reference value from the quantized coefficients excluding the one with the maximum absolute value of the quantized coefficients based on a random number value obtained from a predetermined random number generating means;
Means for obtaining bit data from the difference between the maximum value and the reference value for outputting 0 if the difference between the maximum value and the reference value is an even number, and 1 if the difference between the maximum value and the reference value;
Encryption / decryption means for performing the associated encryption / decryption using the output 0 or 1 as an input bit for predetermined encryption / decryption;
Predetermined error detection / decoding is performed on the decrypted data, the presence / absence of an error, a group including a DCT block in which an error has occurred if there is an error, and embedded digital watermark data if there is no error, Error detection decoding means for obtaining
JPEG decoding means for converting the input JPEG encoded video into a video by performing a normal JPEG decoding process;
An alteration detection apparatus using digital watermark, comprising: display means for conspicuously displaying the presence / absence of the error and the position of the DCT block belonging to the group in which the error occurred together with the decoded video.
コンピュータに請求項1又は2に記載の各ステップを実行させるための改ざん検出用電子透かし埋め込みプログラム。   A digital watermark embedding program for falsification detection for causing a computer to execute each step according to claim 1 or 2. コンピュータに請求項3に記載の各ステップを実行させるための電子透かしを用いた改ざん検出プログラム。   A tamper detection program using a digital watermark for causing a computer to execute each step according to claim 3. 請求項7に記載の改ざん検出用電子透かし埋め込みプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the falsification detecting digital watermark embedding program according to claim 7 is recorded. 請求項8に記載の電子透かしを用いた改ざん検出プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the falsification detection program using the digital watermark according to claim 8 is recorded.
JP2008173377A 2008-07-02 2008-07-02 Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein Pending JP2010016529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008173377A JP2010016529A (en) 2008-07-02 2008-07-02 Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008173377A JP2010016529A (en) 2008-07-02 2008-07-02 Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein

Publications (1)

Publication Number Publication Date
JP2010016529A true JP2010016529A (en) 2010-01-21

Family

ID=41702231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008173377A Pending JP2010016529A (en) 2008-07-02 2008-07-02 Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein

Country Status (1)

Country Link
JP (1) JP2010016529A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113612898A (en) * 2021-05-08 2021-11-05 上海大学 Robust covert communication device for resisting JPEG image downsampling
CN117057971A (en) * 2023-10-07 2023-11-14 湖北微模式科技发展有限公司 JPEG image semi-fragile watermarking algorithm and device based on brightness shrinkage calibration

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113612898A (en) * 2021-05-08 2021-11-05 上海大学 Robust covert communication device for resisting JPEG image downsampling
CN113612898B (en) * 2021-05-08 2022-11-08 上海大学 Robust covert communication device for resisting JPEG image downsampling
CN117057971A (en) * 2023-10-07 2023-11-14 湖北微模式科技发展有限公司 JPEG image semi-fragile watermarking algorithm and device based on brightness shrinkage calibration
CN117057971B (en) * 2023-10-07 2023-12-29 湖北微模式科技发展有限公司 JPEG image semi-fragile watermarking algorithm and device based on brightness shrinkage calibration

Similar Documents

Publication Publication Date Title
Haddad et al. Joint watermarking-encryption-JPEG-LS for medical image reliability control in encrypted and compressed domains
US7360093B2 (en) System and method for authentication of JPEG image data
Cem kasapbaşi et al. New LSB-based colour image steganography method to enhance the efficiency in payload capacity, security and integrity check
JP4625841B2 (en) System and method for digital content security
US7313696B2 (en) Method for authentication of JPEG image data
Li et al. Survey on JPEG compatible joint image compression and encryption algorithms
JP4261724B2 (en) Signature data generation apparatus and image verification apparatus
Singh et al. Toward encrypted video tampering detection and localization based on POB number system over cloud
Singh et al. An efficient fragile watermarking scheme with multilevel tamper detection and recovery based on dynamic domain selection
JP4948551B2 (en) Electronic watermark embedding detection method and apparatus, program, and recording medium
JP4804556B2 (en) Tamper detection digital watermark embedding method and apparatus, program, falsification detection method and apparatus using digital watermark, and program
JP2003153228A (en) Image encoding apparatus and image decoding apparatus
US7493489B2 (en) System and method for authentication of JPEG image data
US7627761B2 (en) System for authentication of JPEG image data
JP2010016529A (en) Method, device and program for embedding digital watermark for alteration detection, method, device and program for alteration detection using digital watermark, and recording medium having these programs recorded therein
CN116437019A (en) Ciphertext domain reversible information hiding method of all-0 row and all-0 column codes
Lien et al. High-capacity reversible data hiding by maximum-span pairing
JP4086103B2 (en) Image data creation method, falsification detection method, image data creation device, falsification detection device, computer program, and recording medium
Ghadi et al. Enhancing digital image integrity by exploiting JPEG bitstream attributes
CN100544258C (en) Information processing method and equipment
Abdelsatir et al. A novel (k, n) secret sharing scheme from quadratic residues for grayscale Images
Haddad et al. A new joint watermarking-encryption-JPEG-LS compression method for a priori & a posteriori image protection
EP3602478B1 (en) Video watermarking
JP2010074490A (en) Method, device and program for embedding digital watermark for tampering detection, method, device and program for detecting tampering using the digital watermark, and recording medium with the program recorded therein
Maharjan et al. A novel secure solution of using mixed reality in data transmission for bowel and jaw surgical training: markov property using SHA 256

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20100608