The invention relates to a device and a method for watermarking or more precisely for inserting a fingerprint into a stream of compressed digital data.
The invention relates to the general field of the watermarking of digital data. More precisely, it relates to a particular application of watermarking which is the insertion of fingerprint into digital data. Subsequently in the document, the terms “fingerprint” and “watermark” are used interchangeably to designate the digital code inserted into the compressed digital data. In order to protect a digital content (for example a video, audio or 3D data, etc.), it is known to insert a unique fingerprint into each of the data streams distributed so as to identify the person or the body having authorized the transmission of the said content without authorization. Thus, during the promotion of a film, DVDs watermarked with the aid of a different fingerprint are dispatched to selected persons. In the case of a leak, it is possible by reconstructing the fingerprint to identify the source of the leak. Other applications are possible: insert a watermark making it possible to identify the work or the beneficiaries, or else to transmit auxiliary data (metadata) via the watermark. Generally, for reasons of an economic nature, but also calculation capacity and time constraints, the watermarking is performed stream-wise (i.e. watermarking of the compressed data before entropy coding). The thus watermarked video will undergo multiple transformations such as for example a transcoding. But most of the current watermarking techniques make the inserted watermark depend on the compression parameters (for example type of transformation used), and do not therefore allow the subsequent decoding of the watermarking information when the video content has undergone transformations.
The invention is aimed at alleviating at least one of the drawbacks of the prior art. More particularly, the invention proposes a stream-wise method of watermarking independent of the compression parameters used (for example type of the transform) so as to allow the reading of the watermark inserted independently of the format of the data received.
The invention relates in particular to a method of watermarking a data set which comprises:
Preferably, the step of projection consists in applying to the first group of watermarking data a transform inverse to the first transform T1 then in applying the second transform T2 to the first group of watermarking data after the transformation by the inverse transform.
Preferably, the first group of watermarking data is generated by calculating, for each of the coefficients of the first group of coefficients, the difference between the coefficient after the first step of watermarking and the coefficient before the first step of watermarking. The coefficients modified by the first step of watermarking being known, the difference is calculated only for these coefficients, the other differences being set to zero.
According to a preferred embodiment, the second step of watermarking of the second group of coefficients consists in adding to each of the coefficients of the second group of coefficients the corresponding datum of the second group of watermarking data.
According to a particular embodiment, the data set comprises coded data of a sequence of images, the group of data of the set comprises coded data of a block of pixels of one of the images of the sequence and the steps of the method are applied after decoding to the group of data of the set.
Preferably, the data set comprises data coded in accordance with one of the coding standards belonging to the set of standards comprising:
Advantageously, the steps of the method are applied only to groups of data comprising coded data of pixel blocks belonging to images of the sequence that are coded independently of the other images of the sequence.
According to a particular characteristic, the first transform T1 is a discrete cosine transform operating on pixel blocks of size 8 by 8 pixels.
According to another characteristic, the second transform T2 is an integer transform approximating a discrete cosine transform operating on pixel blocks of size 4 by 4 pixels.
According to an advantageous embodiment, the step of projection is followed by a step consisting in zeroing a maximum number of watermarking data of the second group of watermarking data while maximizing the associated watermarking energy, this step generating a sparse group of watermarking data. The energy of the watermarking associated with the second group of watermarking data is proportional to the square root of the sum of the data of the second group of watermarking data squared.
Preferably, if the predetermined watermarking process modifies the value of a single coefficient in the first group of coefficients, the step consisting in zeroing a maximum number of watermarking data in the second group of watermarking data is followed by a step consisting in modifying the value of the nonzero data of the sparse group of watermarking data to generate a pre-emphasized sparse group of watermarking data in such a way that, when the pre-emphasized sparse group of watermarking data is projected into the first transformation space, the nonzero datum in the first group of watermarking data has the same value as the corresponding datum of the pre-emphasized sparse group of watermarking data after projection into the first transformation space.
According to an advantageous characteristic, the predetermined watermarking process consists for a first group of coefficients with which is associated a watermarking bit bi in modifying the value of at most two coefficients ┌1 and ┌2 of the first group of coefficients so that the following order relation holds:
|Γ1′|=|Γ2′|+d*Bi,
where:
According to another advantageous embodiment, if the predetermined watermarking process modifies the value of N coefficients in the first group of coefficients, the step of projection into the second transformation space is performed jointly with a step consisting in zeroing data of the second group of watermarking data and a step consisting in modifying the values of the M data of the second group of nonzeroed watermarking data thus generating a pre-emphasized sparse group of watermarking data. The values and the positions of the M nonzero data are determined so that the quadratic energy associated with the pre-emphasized sparse group of watermarking data is minimized and so that when the pre-emphasized sparse group of watermarking data is projected into the first transformation space, each of the N nonzero data in the first group of watermarking data has the same value as the corresponding datum of the pre-emphasized sparse group of watermarking data after projection into the first transformation space, with N≧2 and M≧2. Preferably, N=M=2 and the quadratic energy associated with the pre-emphasized sparse group of watermarking data is equal the square root of the sum of the coefficients of the pre-emphasized sparse group of watermarking data squared.
Advantageously, the data set belongs to the group comprising:
data of the image sequence type;
data of the audio type; and
data of the 3D type.
The invention also relates to a device for watermarking a data set which comprises:
The invention also relates to a computer program product that comprises program code instructions for the execution of the steps of the method according to the invention, when the said program is executed on a computer.
The invention will be better understood and illustrated by means of wholly nonlimiting advantageous exemplary embodiments and modes of implementation, with reference to the appended figures in which:
The invention relates to a method of watermarking a sequence of images or video independent of the compression parameters used to compress the said images. Each image of the sequence comprises pixels with each of which is associated at least one luminance value. When two pixel blocks are added together, this signifies that the value associated with a pixel with coordinates (i,j) in a block is added to the value associated with the pixel with coordinates (i,j) in the other block. When two pixel blocks are subtracted this signifies that the value associated with a pixel with coordinates (i,j) in a block is subtracted from the value associated with the pixel with coordinates (i,j) in the other block. Likewise, to a block of pixels can be added or from it subtracted a matrix M of coefficients of like size, the value associated with a pixel with coordinates (i,j) in the block being added to respectively subtracted from the value of the coefficient in position (i,j) denoted M(i,j) in the matrix. Generally, a matrix can be identified with a block of coefficients. The invention is more particularly described for a video stream coded in accordance with the MPEG-4 AVC video coding standard such as described in the document ISO/IEC 14496-10 (entitled “Information technology—Coding of audio-visual objects—Part 10: Advanced Video Coding”). In accordance with the conventional video compression standards, such as MPEG-2, MPEG-4, and H.264, the images of a sequence of images can be of intra type (I image), i.e. coded without reference to the other images of the sequence or of inter type (i.e. P and B images), i.e. coded by being predicted on the basis of other images of the sequence. The images are generally divided into macroblocks themselves divided into disjoint pixel blocks of size N pixels by P pixels, called N×P blocks. These macroblocks are themselves coded according to an intra or inter coding mode. More precisely all the macroblocks in an I image are coded according to the intra mode while the macroblocks in a P image can be coded according to an inter or intra mode. The possibly predicted macroblocks are thereafter transformed block by block using a transform, for example a discrete cosine transform referenced DCT or else a Hadamard transform. The thus transformed blocks are quantized then coded generally using variable-length codes. In the particular case of the MPEG-2 standard the macroblocks of size 16 by 16 pixels are divided into 8×8 blocks themselves transformed with an 8×8 DCT into transformed 8×8 blocks. In the case of H.264, the macroblocks of intra type relating to the luminance component can be coded according to the intra4×4 mode or according to the intra 16×16 mode. An intra macroblock coded according to the intra4×4 mode is divided into 16 disjoint 4×4 blocks. Each 4×4 block is predicted spatially with respect to certain neighbouring blocks situated in a causal neighbourhood, i.e. with each 4×4 block is associated a 4×4 prediction block generated on the basis of the said neighbouring blocks. 4×4 blocks of residuals are generated by subtracting the associated 4×4 prediction block from each of the 4×4 blocks. The 16 residual blocks thus generated are transformed by a 4×4 integer H transform which approximates a 4×4 DCT. An intra macroblock coded according to the intra 16×16 mode is predicted spatially with respect to certain neighbouring macroblocks situated in a causal neighbourhood, i.e. a 16×16 prediction block is generated on the basis of the said neighbouring macroblocks. A macroblock of residuals is generated by subtracting the associated prediction macroblock from the intra macroblock. This macroblock of residuals is divided into 16 disjoint 4×4 blocks which are transformed by the H transform. The 16 low-frequency coefficients (called DC coefficients) thus obtained are in their turn transformed by a 4×4 Hadamard transform. Subsequently in the document, the transform H which is applied to a macroblock designates a 4×4H transform applied to each of the 4×4 blocks of the macroblock if the macroblock is coded in intra4×4 mode and a 4×4H transform applied to each of the 4×4 blocks of the macroblock followed by a Hadamard transform applied to the DC coefficients if the macroblock is coded in intra 16×16 mode.
Watermark reading processes operating in the DCT transformation space on 8×8 blocks exist. These reading processes making it possible in particular to read watermarks inserted in the DCT transformation space by various processes.
A first watermarking process applied for example in the DCT transformation space to the 8×8 transformed blocks denoted B8×8DCT of an image to be watermarked consists in modifying possibly for each block B8×8DCT the order relation existing between the absolute values of two of its DCT coefficients, denoted Γ1 and Γ2. In general, these two coefficients are selected for a given block with the aid of a secret key. The bit bi of the fingerprint associated with a block B8×8DCT is inserted into this block by modifying the order relation existing between the absolute values of the two coefficients Γ1 and Γ2. In order to check the visibility of the watermark, the coefficients of a block are modified only if the following relation holds:
∥Γ1|−|Γ2∥<S
where S being a parametrizable threshold
The coefficients Γ1 and Γ2 are modified so that the following order relation holds:
|Γ1′|=|Γ2′|+d*Bi (1)
where:
e
1=−Γ1+sign(Γ1)*(ƒ1(Γ1,Γ2)+d1) and e2=−Γ2+sign(Γ2)*(ƒ2(Γ1,Γ2)+d2)
The choice of the function ƒ1 is free, it is possible for example to choose ƒ1(Γ1,Γ2)=ƒ2(Γ1,Γ2)=|Γ2|. For example, in the case where bi=0, let us choose d2=−|Γ2| and d1=−|Γ2|+d, then the order relation (1) does indeed hold. In the case where bi=1, let us choose d1=−|Γ2| and d2=−|Γ2|−d, then the order relation (1) also holds. The values of d and of S vary as a function of the application and in particular as a function of the risk of piracy. Specifically, the higher the value of d, the more robust the watermarking but the more visible it is. Thus to preserve a good visual quality of the sequence of images, the marking force must be limited.
According to a second watermarking process applied for example in the DCT transformation space a single coefficient Γ1 per block B8×8DCT is modified so that |Γ1′|=λ if bi=0, |Γ1′|=μ if bi=1. The value λ or μ represents the value of the coefficient Γ1 that the watermark reader must actually read to be able to identify the watermarking bit bi. Such watermarking processes and therefore the processes for reading the watermark have already been developed to operate in the DCT transformation space on 8×8 transformed blocks.
The invention proposes a stream-wise method of watermarking based on a predetermined watermarking process such as for example one of the two watermarking processes described previously without it being limited to these two processes. The watermarking method according to the invention is independent of the compression parameters used. It is in particular independent of the type of the transform. It therefore make it possible to read in a certain transform domain (for example DCT) the watermark inserted in another transform domain (for example H) independently of the format of the data received. According to a particular embodiment, the invention makes it possible to watermark a sequence of images coded in accordance with the MPEG-4 AVC standard. The watermark inserted according to the invention can be read back by a watermark reader operating in the DCT transformation space on 8×8 blocks.
A first embodiment of the invention is illustrated by
Step 10 consists in decoding (e.g. entropy decoding, inverse quantization, inverse transform, and addition of the spatial predictor in the case of the H.264 standard) the parts of the stream of coded data corresponding to the macroblock MB16×16 so as to reconstruct the said macroblock. The rest of the method is described for an 8×8 block, referenced B8×8, of the macroblock MB16×16 reconstructed and is applied to all the 8×8 blocks of this macroblock.
Step 11 consists in transforming the block B8×8 by an 8×8 DCT transform into an 8×8 transformed block denoted B8×8DCT.
Step 12 consists in watermarking the block B8×8DCT according to a predetermined watermarking process such as for example the first or the second watermarking process described previously or else any other watermarking process making it possible to watermark the image in the DCT transformation space. The watermarking bit assigned to the block B8×8DCT is determined by the fingerprint to be inserted into the I image to which the block B8×8DCT belongs. This step makes it possible to generate a watermarked block denoted B8×8DCT
In step 13, the block B8×8DCT is subtracted from the block B8×8DCT
Step 14 consists in expressing the matrix MDCT in the basis H. i.e. in projecting the matrix MDCT into the H space to generate a second group of data or watermarking coefficients also called a contribution matrix and denoted MH. For this purpose, an inverse DCT transform is applied to the matrix MDCT to generate a matrix MDCT−1. The H transform is thereafter applied to each of the 4×4 blocks of the matrix MDCT−1 to generate, in the H space, the contribution matrix MH. The change of basis has the effect of distributing over several coefficients the modification induced by the watermarking which was concentrated on one or two coefficients in the DCT basis.
When the four contribution matrices MH associated with each of the 8×8 blocks of the macroblock MB16×16 are generated then the four contribution matrices MH are grouped together in step 15 to form a contribution super-matrix SMH of size 16×16 so that each of the matrices MH has the same position in the super-matrix SMH as the 8×8 block with which it is associated in the macroblock MB16×16. If the macroblock MB16×16 is coded according to the intra 16×16 mode then a 4×4 Hadamard transform is applied to the 16 DC coefficients of the super-matrix SMH. If none of the macroblocks MB16×16 is coded according to the intra 16×16 mode then this step can be omitted.
In step 16, the spatial predictor generated in step 22 is subtracted from the macroblock MB16×16 so as to generate a macroblock of residuals which is transformed in step 17 by the H transform and possibly by the 4×4 Hadamard transform in accordance with MPEG-4 AVC. The macroblock thus generated is denoted MB16×16H.
Step 18 of watermarking in the H transformation space, also called the writing space, consists then in adding the contribution super-matrix SMH to the macroblock MB16×16H to generate a watermarked macroblock denoted MB16×16Marked. The macroblock MB16×16Marked watermarked in the transformed space of MPEG-4 AVC is then quantized in step 19 then coded by entropy coding in step 20.
When all the data relating to the I images to be watermarked have been processed, they are multiplexed with the other data of the initial stream of undecoded digital data comprising in particular the data relating to the other images of the sequence.
To the macroblock MB16×16Marked quantized in step 19 is applied in step 21 an inverse quantization and an inverse transform (which corresponding to the inverse H transform and possibly which takes account of the 4×4 Hadamard transform). To the macroblock thus generated is added the spatial prediction macroblock which has served in step 16 for the spatial prediction of the macroblock MB16×16. The macroblock thus generated is stored in memory to serve for the spatial prediction of future macroblocks.
According to another embodiment illustrated by
TC is equal to the ratio of the number of zero coefficients of the matrix to the total number of coefficients of the matrix MCH. The sparse matrix MCH is selected for example by searching in an exhaustive manner among the set denoted {MC}M
According to a variant, a minimum value of watermarking energy is fixed. This value corresponds to a minimum value of energy of the sparse matrix equal to EMCmin. The sparse matrix MCH selected is the solution of a constrained optimization problem which consists in determining in the set {MC}M
According to a particular embodiment, the matrix MCH is pre-emphasized or precompensated prior to the watermarking performed in step 18 so as to take account of the bias introduced into the DCT transformation space by the step consisting in thinning out the matrix MH which disturbs the reading of the watermark in the DCT space. The pre-emphasized sparse matrix is denoted MCAH. The step of pre-emphasis 142 consists in modifying the nonzero coefficients of the sparse matrix MCH to generate the matrix MCAH in such a way that this matrix is the closest possible in the reading space (i.e. space in which the reading of the modification induced by the watermarking is performed, in this instance the DCT space) to the desired reading result, for example so as to minimize the mean square error |MCAH−MH|2. This embodiment illustrated by
MCAH(i,j)=0 for all the zero coefficients of the matrix MCH and
for the other coefficients of the matrix MCH, where
with α≠0 and where α is the coefficient at position (i0, j0) in the DCT space of the sparse matrix MCH. This pre-emphasis makes it possible to guarantee that the coefficient at position (i0, j0) modified by the watermarking in the contribution matrix M″DCT does indeed have the value λ−|Γ1| and therefore that the value of the coefficient Γ1 modified by the watermarking does indeed have the value λ.
According to a preferred embodiment, the matrix MH is thinned out and pre-emphasized jointly. If the predetermined watermarking process modifies two coefficients Γ1 and Γ2 as does the first watermarking process described at the start of the document, then in the contribution matrix MDCT associated with a block B8×8 only two coefficients e1 and e2 are nonzero. The matrix MCAH is then determined directly from MDCT. MCAH which is a matrix only two of whose coefficients are nonzero is defined by the following relation: MCAH=γ1M(X1)+γ2M(X2), where M(Xi) is a matrix all of whose coefficients are zero except the coefficient at position Xi(xi, yi) whose value is equal to 1. Such a matrix MCAH is represented in
According to another embodiment, the quantization parameter defined for quantizing each 4×4 block of the I image is modified. A maximum threshold of deformation of the watermarking signal is permitted. The measure of deformation is the mean square error (MSE) between the quantized watermarked signal and the watermarked signal calculated as follows:
where:
The quantization parameter for a given 4×4 block is decreased until the induced deformation is lower than the threshold ST.
The invention also relates to a watermarking device 6 such as illustrated by
Of course, the invention is not limited to the exemplary embodiments mentioned above. In particular, the person skilled in the art can incorporate any variant into the embodiments set forth and combine them to benefit from their various advantages. In particular the invention described within the framework of a video coding based on the H.264 standard can be extended to any type of support data (audio, 3D data). The embodiments described for a DCT transform and an H transform can be extended to any type of transform. In a general manner, the watermarking method according to the invention consists in watermarking digital data in a first transformation space T1, in generating in this space T1 a first group of coefficients MT1 which corresponds to the contribution matrix MDCT in the embodiment described previously, in projecting it into another transformation space T2 to generate a second group of coefficients which corresponds to the contribution matrix MH in the embodiment described previously and in watermarking the data in this transformation space T2. A watermark reader operating in the transformation space T1 can then read back the watermark inserted in the transformation space T2. In particular, the invention can be applied to other video coding standards such as the VC1 standard described in the SMPTE document entitled “proposed SMPTE Standard for Television: VC1 Compressed Video Bitstream Format and Decoding Process>> and referenced SMPTE 421M. When the invention is used with coding standards not using spatial prediction, then steps 16, 21 and 22 of the method according to the invention are not applied. Likewise step 15 is not necessarily applied when the second transform T2 operates solely on blocks of a single size, for example 8×8 blocks. The present invention is not limited to the watermarking processes described previously. Furthermore, the invention has been described in respect of the watermarking of the intra images but can also be applied to the predicted images.
Number | Date | Country | Kind |
---|---|---|---|
0553828 | Dec 2005 | FR | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2006/069433 | 12/7/2006 | WO | 00 | 2/4/2009 |