METHOD AND APPARATUS FOR WATERMARKING VIDEO IMAGES

Abstract: Embedding a watermark in an image by changing selected DCT coefficients (301) in the blocks and macro blocks of coefficients which represent the image. The changes in the blocks that comprise each macro block are done in a coordinated manner so that the phase of the watermark signal is preserved across the block boundaries. The bit rate of the image signal is preserved by maintaining a count that represents the amount that the bit rate has been increased by changes in coefficients less the amount that the bit rate has been decreased by changes in the coefficients.

Description: METHOD AND APPARATUS FOR WATERMARKING VIDEO IMAGES Field of the Invention 1 This invention relates to stenography, to copy protection and to applying and 5 detecting digital watermarks in video images 6 7 Background of the invention: 8 The advent of technology for storing images on digital media has increased the 9 need for a method to protect against piracy Images stored on prior forms of media J O (e g VHS, Beta audiotapes, etc ) are inherently degraded when copied Images 11 stored on digitally encoded media can be copied with no degradation, therefore, i? perfect copies of copies of copies, etc can be made 13 14 The introduction of Digital Versatile Discs (DVD) containing movies has created , increased incentives for both casual and professional unauthorized copying At the 15 movie industry's urging, technology has been put in place to protect against simple 17 duplication of DVD disks using equipment available to unsophisticated consumers >s This is similar to the protection that exists which prevents one from duplicating a VCR tape by connecting together two commercially available VCRs 20 ! While such protection mechanisms protect against some types of copying, a >2 personal computer connected to a DVD device present a much more complicated ■ problem Open architecture devices such as personal computers reproduce the _4 signals in the "clear" and such devices have many entry points, which can be used ^5 to duplicate mateπa cnce it is in the "clear" The present invention uses digital .'6 watermarks to address, the a^ove described problem The present invention also y has other applications 1 2 It is known that to facilitate tne detection of digital watermarks one can insert a 3 watermark signal that forms a grid The grid can be used to determine orientation 4 and scale With the present invention the data signal and the grid signal are 5 integrated into a single watermark signal in such a manner that the visual artifacts 6 introduced by the watermark are minimized 7 8 In applications such as DVD, an important factor that needs be considered is the bit 9 rate of the bit stream There are disadvantages if introduction of a watermark into a 10 bit stream changes the bit rate For example if images are going to be recorded on 1 1 a medium such as a DVD disc, increasing the number of bits in the bit stream will 12 decrease the number of images that can be recorded on a single disk It is known 13 that, in general, adding a watermark to a stream of images will increase the number 14 of bits in the bit stream The present invention provides a method and apparatus, i^ which preserves the bit rate even though watermarks are introduced into the 16 images 17 is Summary of the invention 19 The well-known JPEG and MPEG data compression techniques transform images :o utilizing a discrete cosine transform (DCT) which produces a matrix of DCT 21 coefficients These coefficients are arranged into blocks (e g into 8 by 8 blocks of 22 coefficients) The blocks of DCT coefficients are in turn arranged into macro blocks 23 (e g into 16 by 16 arrays containing four 8 by 8 blocks) With the present invention ? . selected DCT coefficients in each block are slightly increased or slightly decreased in response to a watermark signal The changes in the blocks that comprise each 2 macro block are done in a coordinated manner so that the phase of the watermark '7 signal is preserved across the block boundaries By preserving the phase across 1 block boundaries a detectable grid is formed which can be used as an orientation 2 and scaling grid - 4 The present invention also maintains the bit rate of the image signal The bit rate of •" the signal is preserved by maintaining a count (referred to as the cumulative change 6 count) that represents the amount that the bit rate has been increased by changes 7 in coefficients less the amount that the bit rate has been decreased by changes in 8 the coefficients If at any time the cumulative change count exceeds a pre- established limit, coefficient changes that decrease the cumulative change count continue, however, coefficient changes that increase the cumulative change count are suspended The suspension of coefficient changes that increase the cumulative change count continues until the cumulative change count falls below the pre-established limit The above described process can be described as selectively changing the intensity of a watermark signal in a bit stream so as to 1 prevent the entropy of the combined signal from exceeding a pre-established limit 16 Brief Description of the Figures: 17 Figure 1 is a diagram illustrating how the pixels in an image are arranged into blocks 18 and how the resulting DCT coefficients are numbered 19 0 Figure 2 is a diagram, which shows how the blocks of DCT coefficients are arranged 1 into macro blocks 22 ' 3 Figure 3 is a program flow diagram showing how the coefficients in each block of a 24 macro block are treated so as to preserve the phase of watermark signal in each macro block 2c 1 Figure 4 is a program flow diagram showing how the bit rate in the data stream is 2 maintained constant 3 4 Description of preferred embodiments: 5 The well know MPEG (Motion Picture Expert Group) and JPEG (Joint Photographic 6 Expert Group) image compression techniques use a DCT (Discrete Cosine 7 Transform) to generate a matrix of coefficients The preferred embodiment of the < invention shown herer slightly modifies the DCT coefficients (either slightly 9 increases or slightly decreases the value of the coefficients) so as to embed a 10 digital watermark in the image Such a digital watermark can later be detected by 11 conventional cross coπelation techniques 12 13 As illustrated in Figure 1 , the MPEG and JPEG techniques divide an image into 8 by 14 8 blocks of pixels Fach block of pixels is then used to generate an eight by eight 15 block of DCT coefficients The 8 by 8 blocks of coefficients are divided into "macro 16 blocks", each of which consist of four of the original blocks This is illustrated in 7 Figure 2 The rows and columns of DCT coefficients in each block are numbered is from top to bottom and left to right as illustrated in Figure 1 The first row and the ') first column are designated as the "0" row and "0" column 20 l Certain of the DCT coefficients in each block are selected as the coefficients that 22 will carry a selected bit of the digital watermark signal In the preferred embodiment 23 the three coefficients circled ,n Figure 1 are used to carry the first or "0" bit of the 24 watermark data signal These three coefficients are modified, that is, either slightly 25 increased or slightly decreased depending upon the value of the "0" bit of the 2. watermark data In a similar manner other coefficients are slightly changed in order r to carry the other bits of the watermark signal 1 2 One aspect of the present invention is directed to insuring that the sinusoids 3 generated by the changes made to the DCT coefficients are continuous, that is, in- 4 phase across the four blocks that constitute each macro block. First, if the 5 sinusoids that carry the watermark are continuous across each macro block, there 6 will be less edge effects and the watermark will be less visually noticeable. Second, 7 the sinusoids which are continuous over the four blocks of each macro block create 8 a low level orientation or grid signal. This low level grid signal can be detected to 9 determine the orientation and scale of the watermark. The grid signal can then be 10 detected using the cross correlation techniques. Cross correlation detection 11 techniques are for example shown in copending patent application 08/649,149 filed 12 5/16/96 and in issued patent patents 5,748,763 and 5,748,783. 1 3 14 If certain DCT coefficients in adjacent blocks are modified in the same direction, the 1 resulting sinusoids will not be continuous across block boundaries. With the 16 present invention the changes made to the coefficients of each of the four blocks in 17 a macro block are coordinated so that the resulting sinusoids will be continuous ; .8 across block boundaries within each macro block. The changes are coordinated 19 using the rules explained below. 20 21 The blocks in each macro block are numbered as shown in Figure 2. Block one is : • .:_ considered the base block. The coefficients in this block are changed in a 2 . conventional way by the associated bits of the watermark signal. Note, the _: 1 following paragraphs relate to how the coefficients which are circled in Figure 1 are 25 changed in response to the "0" bit of the watermark. It should be understood that 26 other coefficients must be similarly changed to carry the other bits in the watermark 27 data. 1 2 In block 1 , the coefficients that are circled in Figure 1 are slightly increased or slightly decreased in response to the "0" bit of the watermark data In blocks 2, 3 4 and 4, the circled coefficients shown in Figure 1 are changed in response to the 5 zero bit of the watermark according to the following rules 6 Block 2 invert the direction of the change if the coefficient is in an odd row 7 Block 3 invert the direction of the change if the coefficient is in an odd 8 column 9 Block 4 invert the direction of the change if the coefficient is in an odd row ιo or if it is in and odd column, but do not invert the direction of the 11 change if the coefficient is in both and odd row and in an odd column ■ i 13 If the above rules are followed the sinusoids generated by the change in the DCT '4 coefficients will be continuous across the boundaries in the four blocks that form 15 each macro block These sinusoids will be able to be detected using conventional 16 cross correlation techniques and they can be used as a grid to determine the scale 17 and rotation of the image The data bits in the watermark will also be able to be is detected using conventional watermark detection techniques Thus, the watermark 19 data itself is used to form the grid that can be used to determine scale and rotation 20 ?i Figure 3 is an overall program flow diagram of the above described aspect of the '2 preferred embodiment The system accepts a stream of data that represents n images Block 301 is a conventional device or program module that generates DCT 24 coefficients for the images in the data stream These coefficients are sent to a 25 decision unit 302 which separates the data into macro blocks and sends it to units 26 31 1 , 312, 313 and 314 depending upon whether the data represents a block 1 , 2, 3 1 or 4 in a macro block. Units 31 1-313 modify the DCT coefficients in order to imbed 2 a watermark signal according to the following rules. 3 Unit 311 : modify the coefficients in a conventional manner to imbed 4 watermark. 5 Unit 312: invert the direction of the change if the coefficient is in an odd row. Unit 313: invert the direction of the change if the coefficient is in an odd 7 column 8 Unit 314: invert the direction of the change if the coefficient is in an odd row 9 or if it is in and odd column, but do not invert the direction of the iθ change if the coefficient is in both and odd row and in an odd column. 11 The output of units 322 to 3 '4 is combined by unit 320 back into a single data 12 stream. It is noted that each of the units shown in Figure 3 could be separate units, 13 which are either programmed, or hardwired to perform the specified functions. 14 Alternatively all the function could be performed in a single programmed computer 15 on a time-shared basis. The unit which generates DCT coefficients is conventional 16 and such units are know and not part of the present invention. 1 7 18 The previous discussion describes how a watermark can be introduced in the DCT >9 domain. It is noted that the durability of the overall watermarking can be increased 20 by using two watermarks. One watermark can be added by modification of the 1 pixels in the original image in the manner as described in US patents 5,748,763 or 22 5,748,783 and then a second watermark can be added by modification of the 7 coefficients in the DCT domain as described herein. 24 25 Another problem addressed by the present invention is the need to maintain a 26 constant bit rate in a stream of bits representing a series of images even though 27 watermarks are added to the images. It is noted that MPEG and JPEG systems use variable length codes to represent data, hence, adding watermarks generally increases the bit rate of a data stream Typical a watermark has no correlation with the image into which the watermark is embedded, thus embedding an image in a watermark produces an image which has a higher entropy than the original image The bit rate of a data stream transmitting an image correlates directly to the entropy 6 of the image 7 8 Typically the number of codes used to code an image, that is, the number of entries 9 in the Huffman table of a coded image, is relatively large (e g 500) However, the 10 changes that occur when a watermark is introduced into an image can be illustrated l l with following simple example Consider a data stream that has only four symbols, s1 , s2, s3 and s4, which are encoded as follows 13 Symbol code 14 15 Then consider a data stream as follows lo Bit stream 00110101 11010 17 Decoded stream 0/0/110/10/111 /0/10 18 Decoded message s1 , s2, s3, s2, s4, s1 , s2 !9 0 When a watermark is added to an image the bits in the image are slightly changed 1 In the above simplistic illustrative example, in some situation the symbol s2 would . 9 be changed to the symbol s3 and hence the number of bits in a bit stream which transmits the image would be increased In fact there are mathematical principles 1 (not explained herein) which show that when a normally distributed watermark (that 2 is, a watermark with a Gaussian distribution) is added to an image, and the image is 3 transmitted using variable length Huffman codes, the length of the bit stream will of 4 necessity be increased 6 The present invention provides a technique for insuring that when a watermark is 7 added to a data stream, the bit rate will be maintained constant It is noted that the 8 present invention doe.= ; not violate the above-described mathematical principle, 9 because with the present invention, some of the redundancy normally used to 10 watermark images is in certain circumstances decreased That is in certain 1 1 circumstances the intensity of the watermark is decreased 12 13 With the present invention, the watermark is modified in response to characteristics 14 of the image Thus, to some extent the watermark is correlated to the image into 15 which the watermark in embedded In this way a watermark can be embedded into 16 an image and the entropy of the combined image and watermark will be .7 substantially equal to the entropy of the watermark alone 18 ! 9 With the present invention, the system maintains a cumulative count of the amount 0 that the coefficients have been changed to any point in time That is, the amount of i positive changes less the amount of negative changes made since the beginning of 2 the bit stream is tracked This amount is herein referred to as the cumulative 3 change count If at any time, the cumulative change count exceeds a pre- 4 established positive limit, no further positive changes are made 5 _ > Normally it is only necessary to insure that changes do not increase the bit rate 27 unduly, however, in some instances it may also be desirable to insure that changes 1 do not unduly decrease the oit rate If this is desired, the same technique as 2 described above can be used to insure that the cumulative change amount does not 3 exceed a pre established negative limit That is, if the cumulative change amount 4 exceeds a pre-established negative value, positive changes continue in a normal 5 manner, but no further negative changes are made 6 7 The magnitude of the pre-established maximum (and in both a positive and negative 8 direction) are established at the values which constitutes the change in bit rate 9 which can be tolerated in a particular system 10 11 Figure 4 is a program flow diagram showing how the data rate is maintained 1 constant not withstanding the fact that watermarks are added to the images in the I " data stream Block 4 3A shows that a limit on the amount of positive changes that ' 4 can be made to DCT coefficients is established and stored Blocks 403C shows i -i that the cumulative change amount is stored The cumulative change amount is the ι6 amount of positive changes less the amount of negative changes that have been 17 made to coefficients since the start of the data stream 18 19 The DCT coefficients are calculated in the normal manner as indicated by block 20 401 Likewise the change in each the DCT coefficients needed to embed the 21 watermark is also calculated in the normal manner as shown by block 405 Block 405 shows that a check is made to determine if the needed change in a particular 23 DCT coefficient is positive cr negative Block 409 indicates that if the change is . positive a check is made to determine if the maximum allowable cumulative change '5 amount stored in block 403A will be exceeded if the change is made 26 1 Blocks 415, and 417 indicate that the coefficients will only be changed, if the 2 change does not cause the cumulative change amount to exceed the limit in 403A 3 Finally as indicated by blocks 425 and 427, the cumulative change amount in 4 register 403C is incremented or decremented if a change to the coefficients is in 5 fact made Block 431 indicates that the coefficients are sent to the output of this 6 process and they are then transmitted and processed in a normal manner 7 8 It is noted that the present invention relates to embedding a watermark in an image 9 Various know techniques can be used to detect watermarks embedded in images 10 utilizing the present invention For example techniques such as those described in i 1 US patents 5,748,763, and 5,748,783 or in the "Communications of the ACM" July !2 1998/vol 41 , No 7 or in pending US applications serial number 08/746,613 filed I 3 11/12/96 and serial number 08/649,419 which was filed 5/16/98 (all of which are ι4 hereby incorporated herein by reference) could be used 15 16 While the process has been described above as one where a change is either made 17 or not made, it should be understood that alternatively, the amount of the change is could be decreased if the limn in the cumulative change value is being approached 19 It is also noted that the system shown in Figure 4 prevents the cumulative change 2'i value from exceeding a pre established positive limit Since adding a watermark to 21 an image generally inci eases the entropy of the image and since Huffman code 22 tables are normally constructed such that an increase in entropy result in increased 23 bit rate, the use of only a positive limit is normally appropriate However, in some 24 situations, it may be appropriate to tract if the cumulative change amount exceeds a 25 limit in both the positive and negative directions Such a check could be added to _.(> Figure 4 prior to block 427 1 2 It is recognized that by implementing the present invention, the strength of the watermark is in some cases reduced However, the reduction is not sufficient to 4 prevent detection of the watermark The changes made with the above invention 5 merely lower the intensity of the watermark in a selective manner, thus in some 6 instances more processing may be required to detect the watermark 7 8 In many systems, each Huffman code covers several symbols In such systems the 9 calculation indicated by block 405 is not the change in a single symbol that results io from adding a watermark to the image In such systems the calculation indicated by 11 block 405 is a calculation of f he change that results in the bit string of whatever 12 combination of symbols used in the Huffman code to represent a symbol In some 13 cases the calculation might have to be done over several combinations of symbols 14 i It is also noted that various aspects of the present invention are shown herein in a 16 single preferred embodiment Other alternative embodiments could use one but not 17 all aspects of the present invention For example the part of the present invention 18 that relates to maintaining bit rate could be used in embodiments which do not use 19 macro blocks to establish an orientation grid Likewise the aspect of the present 20 invention which relates to the use of macro blocks could be used without the part of 21 the invention that relates to maintaining a constant bit rate Finally, while the 22 invention has been shown in an embodiment that inserts a watermark in the DCT ^3 domain, the invention could be used in applications where watermarks are inserted 24 in other domains 2^ >6 While the invention has been shown and described with respect to preferred 27 embodiments of the invention, various changes in form and detail could be made without departing from the spirit and scope of the invention The applicant's invention is limited only by the appended claims

Claims: I I claim: 2 3 1. A method for adding a multibit watermark to an image comprising, 4 generating DCT (Discrete Cosine Transform) coefficients representing said image, 5 said coefficients being arranged in blocks, said blocks being arranged into 6 macro blocks, 7 adjusting said coefficients in accordance with the bits of said watermark to embed 8 said watermark in said image, said adjustments being made in a direction 9 that sinusoids generated by said adjustments are in phase across block )0 boundaries in each macro block. l i 12 2. The method of claim 1 wherein each of said macro blocks contains four blocks. 13 14 3. The method of claim 2 wherein the blocks in each macro block are numbered ■ 5 one, two, three and four and wherein the coefficients in each block are arranged in ■ ( , rows and columns, alternate of said rows and columns being designated even and 17 odd rows and columns, !8 the coefficient in block one being changed directly in response to the bits of said 19 watermark, the bits in blocks two, three and four being changed in accordance with 20 the following rules: 21 Block 2: invert the direction of the change if the coefficient is in an odd row. 22 Block 3: invert ÷he direction of the change if the coefficient is in an odd 23 column 4 Block 4: invert .he direction of the change if the coefficient is in an odd row ' or if it is in and odd column, but do not invert the direction of the ■ 6 change if the coefficient is in both and odd row and in an odd column. 1 2 4 A system for adding a muitibit watermark to an image comprising, 3 means for generating DCT (Discreet Cosine Transform) coefficients representing 4 said image, said coefficients being arranged in blocks, said blocks being 5 arranged into macro blocks, 6 means for adjusting said coefficients in accordance with the bits of said watermark 7 to embed said watermark in said image, said adjustments being made in a 8 direction that sinusoids generated by said adjustments are in phase across 9 block boundaries in each macro block, 10 whereby the same changes which represent said watermark form a grid which can 1 1 be used to detect the scale and rotation of said watermark 12 13 5 The system of claim 4 wherein each of said macro blocks contains four blocks 14 ) 5 6 The system of claim 5 wherein the blocks in each macro block are numbered 16 one, two, three and four and wherein the coefficients in block are in rows and ■ 7 columns, alternate of said rows and columns being designated even and odd rows 18 and columns, 19 The coefficient in block one being changed directly in response to the bits of said :o watermark, the bits in blocks two, three and four being changed in accordance with _J the following rules 22 Block 2 invert the direction of the change if the coefficient is in an odd row 2i Block 3 invert the direction of the change if the coefficient is in an odd 24 column 25 Block 4 invert the direction of the change if the coefficient is in an odd row 6 or if it is in and odd column, but do not invert the direction of the π change if the coefficient is in both and odd row and in an odd column 1 2 6 A method of embedding a watermark into an image comprising, 3 dividing the elements which form said image into blocks and arranging said blocks 4 into macro blocks, 5 introducing said watermark into the blocks in each macro block in an orientation 6 such that the resulting sinusoids are in phase across block boundaries in each 7 macro block, 8 whereby said watermark can be used to both carry data and form a grid which can ) be detected to show orientation of said watermark Ό i 7 A method of introducing a watermark into a stream of bits representing variable 12 length codes without changing the bit rate of said stream of bits comprising, ' 3 maintaining a cumulative change amount which indicates the amount of the positive 14 and negative changes which are made to said codes, 15 suspending any positive changes if the cumulative change amount exceeds a pre- 16 established limit, 1 1 whereby the bit rate " said stream of bits is maintained constant 18 19 8 A system for introducing a watermark into a stream of bits representing variable o length codes without changing the bit rate of said stream of bits comprising, 21 means for maintaining a count of the amount of positive and negative changes 22 which are made to said codes, 2 . means for suspending any positive changes if a pre-established limit is exceeded, 24 whereby the bit rate of said stream of bits is maintained constant 1 9 A method for adding a multibit watermark to an image comprising, 2 generating DCT (Discreet Cosine Transform) coefficients representing said image, 3 said coefficients being arranged in blocks, said blocks being arranged into 4 macro blocks, 5 adjusting said coefficients in accordance with the bits of said watermark to embed 6 said watermark in said image, said adjustments being made in a direction that 7 sinusoids generated by said adjustments are in phase across block boundaries in 8 each macro block 9 maintaining a cumulative change count of the positive and negative changes which 10 are made to said codes, 11 suspending any positive changes if said cumulative change count exceeds a pre- 12 established, 1 3 whereby said watermark forms a grid which can be detected to determine . orientation and scale of said watermark and the bit rate of said stream of bits is 15 maintained constant 17 10 An image processing method that includes steganographically encoding an '8 input image to embed a multi-bit code therein, 19 generating DCT (Discreet Cosine Transform) coefficients representing said image, 0 said coefficients being arranged into primary size blocks, 1 arranging said DCT coefficients into macro blocks, each containing four of said 22 primary size blocks, i . changing the coefficients in each block to encode therein a watermark in said 24 image, • > the direction of change of said coefficients being such that the sinusoids created by 6 said changes are continuous across the primary blocks in said macro blocks, 1 whereby said watermark signals can be used to both carry data and to form an 2 orientation and calibration grid. 3 4 1 1. The method recited in claim 10 wherein said primary blocks each contain 64 5 DCT coefficients and each macro blocks contains four of said primary blocks. 6 7 12. The method of claim 7 wherein 8 negative changes are suspended if the cumulative change amount exceeds a pre- 9 established negative amount. !0 1 1 13. The system of claim 8 including 12 means for suspending any negative changes if said count exceeds a pre- 13 established negative limit. 14 15 14. The method of claim 9 wherein 16 negative changes are suspended if said cumulative change count exceeds a pre- 17 established negative limit. 18 '. 15. A method of embedding a watermark in a stream of coded symbols that 20 represent a series of images by selectively increasing or decreasing the values 21 of said symbols, said method comprising, 22 establishing a limit on the allowable entropy of said stream of bits, 23 suspending said selective increasing if said limit is exceeded. 1 2 16 A method of embedding a watermark in a series of bit which represent an 3 image without increasing the entropy of said image beyond a pre established 4 limit, comprising the steps of 5 changing selective bits of sa d image to embed said watermark, 6 maintaining a cumulative change count of the changes made to embed said 7 watermark in said image, 8 suspending changes which cause said cumulative change count to exceed a pre ) established limit ιo ! l 17 A method of embedding a watermark in a series of bit which represent an 12 image without increasing the entropy of said image beyond a pre established 13 limit comprising the steps of maintaining a count which represents the change in entropy as said watermark is being embedded in said image, 16 suspending changes in said image when said count is beyond a specified limit

Inventors: DAVIDSON CLAY, RHOADS GEOFFREY B, RODRIGUEZ ANTHONY, DAVIDSON, CLAY, RHOADS, GEOFFREY, B., RODRIGUEZ, ANTHONY
Applicants: DIGIMARC CORP, DIGIMARC CORPORATION
Application year: 1998
Main classification: G06K9
IPC codes: G06T1, G09C5, H04N1, H04N7