top of page

This section further details methods that we used in our attempts to remove the watermark from an image. For all the methods, if the results from only one transform (FFT, DCT, or DWT) are shown, it is because the results from the others look exactly the same. We'll demonstrate the robustness of our watermarking technique by proposing different methods to remove the watermark. Most of the attempts assume that a person intends to remove the watermark without having the original image, or knowing the domain, strength (alpha, the factor the watermark is multiplied with before adding to the image), and the scrambling scheme of the watermark. The person who embedded the watermark, or knows how it is embedded, then tries to recover the watermark. The attempts show that, unless one has the original image (which kind of defeats the purpose), removing the watermark, to the point that one cannot determine its content, results in a far greater image quality loss, than the process of embedding the watermark itself.

Methods for Removing Watermarks

Nearest Unchanged Pixel Method

One method that we used to attempt to remove the watermark from the image is the nearest unchanged pixel method (we really couldn’t come up with a better name). We began by taking the difference image between the watermarked image and the original image, and then we set a threshold difference, which, in the following example, is 0.02 (an arbitrary number, can be decreased to further reduce the effects of the watermark). If any pixel in the difference image had a value of greater than the threshold difference, then this pixel was set equal to the value of the pixel touching it that had the minimum difference. For example, for a 3x3 square where only the middle value is changed,

                                    [127 130 129]                      [127 130 129]                                                       [0.004  0.01  0.001]

Watermarked Image    [128 131 128]  becomes     [128 126 128]  assuming a difference image of   [0.001  0.03  0.002]

                                    [127 129 126]                      [127 129 126]                                                       [0.015  0.01  0.0001]

This process is repeated ten times (also an arbitrary number, can be increased to further reduce the effects of the watermark) in our image example below where the unchanged watermarked image and its recovered watermark, which was recovered using the known permutations, are shown above the altered ones. The following example is done using the FFT to implement the watermark, however, this process yields basically the same result for the DCT and DWT transforms.

Since the image was relatively unharmed, this method of eliminating the watermark was successful, which is probably due to that very few of the pixels changed color by a noticeable amount, as traveling only ten pixels from a pixel will most likely result in a pixel of the same general color in an image such as this. This method of removing a watermark only works for watermarks that are weakly dispersed throughout the image, since a more strongly concentrated watermark will be replaced by colors far away from it and thus will ruin that portion of the image.

Similar to the jpeg compression method, the matrix compression method attempts to destroy the watermark in the image by slightly compressing the image. We began this method by calculating the numbers of coefficients that we need in order to keep 99% of the information in the image. This is done using a block of code adapted from the MATLAB page on the DCT. We then figured out where these coefficients are in the watermarked image. For the DCT, most of the important coefficients are located in the top left corner of the image, but not every coefficient in this area is important, so we can’t just use a matrix like the following for optimal compression (the actual one would be much bigger).

​

[1  1  1  0  0  0]

[1  1  0  0  0  0]

[1  0  0  0  0  0]

[0  0  0  0  0  0]

[0  0  0  0  0  0]

[0  0  0  0  0  0]

​

From there, the watermarked image is multiplied by a “compression” matrix containing ones in the locations of the important coefficients and zeroes elsewhere. Examples of this process with the images being watermarked using the DCT and FFT are shown below.

Matrix Compression Method

FFT - Watermarked Image and Extracted Watermark are the same as above

The DCT

Obviously, the results were not as beneficial as we had hoped because the image is significantly damaged and the watermark wasn't weakened by a large extent.

The Gaussian blur function works similar to the nearest unchanged pixel method except that it averages the values in each 3x3 box instead of replacing them and that it does this for all pixels instead of only for the significantly altered ones. The results of using the blur function are shown below on images watermarked using the DCT coefficients.

Gaussian Blur

We had entirely expected both the image and the watermark to be obliterated by the blurring. That being said, we were pleasantly surprised that the image was not totally destroyed, but we still concluded that this method probably wasn’t successful because of the significant darkening of the image.

Color Map Change

We thought that changing from one color mapping (in our case, RGB) to a different color mapping (in this case, HSV) would help remove the watermark, as the values in the image would change to a different set of values which would not include the embedded watermark. However, we ran into some issues with the Matlab HSV function, where the output is listed below. This image as the same shapes and objects, but the colors are much different than what they should be.

As you can see in the extracted watermark photo, the only output from the system is the 2 purple boxes in the corners of the image. The message contained in the watermark is not visible. However, this method would not be effective due to the output image in the spatial domain.

Another possible method for removing the watermark was the possibility of making the image sharper, which would add more higher frequency components to the image which would ultimately change the watermark that would be able to be extracted. With he higher setting for the amount of sharpening added, we thought that more high frequency noise would be added to the watermark.

Sharpening Increase

While the output image of the sharpening filter looks very similar to the original image, the output also has the embedded clearly visible. While more noise was added to the watermark, as seen by the patterns in the center of the output  embedded watermark, the messages are still legible. The extracted watermark of the image is similar to the extracted watermark in the blurring transformation.This method did not work as well as we had thought.

With the increase in the contrast of the image, the output image has the same amount of clarity, but the colors appear off in the spatial domain. However, when looking at the extracted watermark from the image, the message on the watermark is very hard to make out, and there is a lot more noise and added color to the extracted watermark. If you were to increase the saturation further, the watermark would be harder and harder to decipher compared to the old extracted watermark. This may be a solution, depending on the application, to remove the watermark, as long as the end user is not affected by the loss of color accuracy.

Saturation Increase

In continuation of the trend of trying to remove the watermark from the image, we thought we would try increasing the saturation of the image, by taking the values found in the image and increasing their values within a certain value range. 

If the watermark is embedded is the spatial domain, then cropping the watermark out of the picture is a matter of not selecting the watermark to be in the cropped image, if possible. However, since our watermark is embedded in the frequency domain, the user, without knowing what the watermark was or where it is located or how strong it is would not be able to just simply cut it out of the picture. However, cropping the image would remove some of the information, which would mean removing some of the watermark. To see if cropping would make a difference, we used the watermarked image that was then cropped and then put into the watermark extraction section of our code. The output is listed below:

Cropping

A very slight crop, just the outer edge taken off

A larger crop, with a thicker border taken out of the image

As you can see in the extracted watermark from the thin border taken off, most of the information from the watermark is still present in both the image as well as the extracted watermark. However, when the crop border is increased (as it was in the 3rd set of crop pictures), the extracted watermark message is no longer present. The scrambled watermark is still present in the extraction, but the message contained in the extracted image is not. The cropping effect of removing the watermark work decently in this scenario, where the watermark is mainly on the top left and bottom right corners. However, in a different scenario, say that the watermark is embedded directly in the middle of the image, the end user may not be as successful in removing the watermark from the image using cropping.

No cropping

Singular Value Decomposition (SVD)

SVD tries to represent a matrix M using a general basis by solving the following equation:

M = U * S * V’ where UU’=I and VV’=I

After decomposing the matrix into singular values S, we can throw out smaller values in S (for example, substitute 0 for the bottom 90%), and reconstruct the "most important component" of the matrix. Such technique is called low-rank approximation. The idea is to throw out less important information, therefore removing the watermark along the way.

The following is done with DCT.

Watermarked image reconstructed with low-rank approximation (keeping top 8% of singular values). The image looks heavily compressed.

While the SVD is different from the DCT in terms of the math and how it is performed, the resulting pictures from both of those transforms is the same: The same image can be represented using many fewer terms with minimum to a slight loss is picture clarity. However, the amount of storage space saved is quite remarkable. Similarly, the SVD has a similar effect on the image and the watermark as compression with the DCT would have: more compression marks, and a loss of information. This is very evident in the extracted watermark after the SVD was performed. You can see the white boxes that used to hold the writing of the watermarks. However, the message that they carried is almost non-existent.

bottom of page