Sunteți pe pagina 1din 15

HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

SCHOOL OF ELECTRONICS AND


TELECOMMUNICATIONS

TERM PROJECT
REPORT
Subject:

DIGITAL WATERMARKING
PROCESS
Student: Bui Duy Do
Student ID: 20130967
Class: EEE - K58

Lecturer: Prof Truong Cong Thang

H Ni, 10-2015
1

PREFACE
First, I express our gratitude to Prof. Truong Cong Thang who has taught me
and my friends various things in this semester.
In this report, Im sure there must be some mistakes since my knowledge is still
limited. Hence, I hope everyone will complement for me to make this report becomes
better so that I will have experience to make the next, next report and project better.
Sincerely thanks to everyone!
Now I will move to the main point:
Nowadays, Copyright is an important problem in the world. And as the
technology becomes more advance with more and more digital products, Copyright
must also move from hard copies to digital copies. Hence, there is a need for an
invisible and indistinguishable mark on the digital copies itself. And thus, the
watermarking technologies is born. In this project, I will learn about digital
watermarking process using block based DCT method.
Ha Noi, 11/10/2015

DIGITAL WATERMARKING PROCESS


I.

WATERMARKING PROCESS

We suppose that the original image size is MN. At first, the original image is
converted in to gray image. After that, the luminance component of the
gray image is divided 88 blocks for watermark embedding processes and the
number of blocks is:

NB

M N
64

Then, each block is separately transformed into frequency domain by 2D


-Discrete Cosine Transform.
Similarly, the watermark image is scaled and converted into black and white
image. After that, it is encoded and embedded in to the original image.
The watermark is embedded several steps in the original image. The steps are
depending on the size of the cover image and the watermark (In this project, I
only use 512 x 512 binary images as carrier images and 64 x 64 binary images as
watermark image).
This is the watermarking process diagram:

Figure 1. Watermarking process diagram.


In the embedding process, each binary watermark bit has been embedded in
pixel position (5, 2) and (4, 3) of the mid-band frequency fields of luminance
component in the DCT blocks. Because rather than arbitrarily choosing these
locations, extra robustness can be achieved if we base the choice on the
recommended JPEG quantization table shown below.
Besides, as we can see that DCT coefficients of middle frequencies have similar
magnitudes and, we can feel confident that any scaling of one coefficient will
scale the other by the same factorpreserving their relative size.
1
6
1
2
1
4
1
4
1
8
2
4
4
9
5
3

1
1
1
2
1
3
1
7
2
2
3
5
6
4
6
8

1
0
1
4
1
6
2
2
3
7
5
5
7
8
9
2

1
6
1
9
2
4
2
9
5
6
6
4
8
7
1
0
4

2
4
2
6
4
0
5
1
6
8
8
1
10
3
11
9

4
0
5
8
5
7
8
7
10
9
10
4
12
1
12
7

5
1
6
0
6
9
8
0
10
3
11
3
12
0
10
6

6
1
5
5
5
6
6
2
7
7
9
2
10
1
10
3

Table 1. Quantization values used in JPEG compression scheme

Figure 2. DCT coefficients which are used for watermark bits.


The DCT block will encode a 1 if Pix(u1,v1) > Pix(u2,v2); else it will encode
a 0. The coefficients are then swapped if the relative size of each coefficient
does not agree with the bit that is to be encoded.
The robustness of the watermark can be improved by using a watermark
stability constant R, such that Pix(u1,v1) - Pix(u2,v2) > R. The role of R is
enhancing the difference between values of set up pixels in DCT blocks to
prevent the noise from the outside effects to information watermark inside
image.
Hence, increasing R will reduces the chance of detection errors at the expense of
additional image degradation.
Here is the example:

Figure 3. Watermarked Image with DCT R= 40

Figure 4. Watermarked Image with DCT R= 200


II.

DETECTING WATERMARK PROJECT

Here is the detecting watermark process diagram:

Figure 5. Detecting Watermark process diagram


As we can see in the diagram, the watermarked image is divided into 8x8 blocks,
and 2D DCT is applied to transform each block into frequency domain. And by
decoding we obtain the value 0, 1 from each DCT block and eventually we can
obtain our watermark image.
Here is the illustration of the process:

EXPERIMENTS RESULTS

Figure 6. Original image

Figure 8. Watermarked image

Figure 7. Modified gray image

Figure 9. Watermark image

1) Modify the watermark stability constant R


The images is degraded when we increase R as shown in Fig. 3 and Fig. 4.
Here is the spectrum of the two image:
with DCT R= 40

Fig
ure 10. Spectrum of watermarked Image

Image with DCT R= 200

F
igure 11. Spectrum of watermarked

As we can see, the energy is mainly concentrated in the low frequency domain.
In Fig.11, we can see that the energy distribution is distorted. There is some
more energy in the high frequency domain in compare with the spectrum in
Fig. 10. Moreover, noise is mainly concentrated in high frequency domain.
Hence, the results is the image is degraded, but the watermark image can still be
detected.

Figure 12. Extracted watermark image after change the stability


constant R.
2) Modify the number of blocks
Here is the modified image:

Figure 13. Watermarked


image with 24 x 24 blocks

Figure 14. Watermarked


image with 16 x 16 blocks

We can see that the more blocks the lower quality of the image. And there is one
thing that is very important. That is: we cannot detect the watermark image
anymore (In truth, we can still detect it, but it only have some dots, and it cant
become the proof).
The reason is when we divide the image into many small blocks in frequency
domain (16x16 and 24x24), the DCT coefficient of the watermark position we
choose (5,2) and (4,3) is distorted and hence we cannot detect the watermark
anymore.
3) Filtered watermarked image
a) Low-pass filter
Here is the image after apply low-pass Gaussian filter:

Figure 15. Watermarked image after


apply low-pass Gaussian filter

Figure 16. Extracted watermark


image after apply low-pass Gaussian filter

10

Low-pass filter is a filter that passes signals with a frequency lower than a
certain cutoff frequency and attenuates signals with frequencies higher than the
cutoff frequency; besides, some high-frequency components provide fine details
of the content. As a results, the image we received after filtered has lower
quality.
However, we can still detect the watermarked image.
b) High-pass filter
Here is the watermarked image after apply high-pass filter with the kernel

(We can obtain high-pass kernel from all-pass kernel by subtracting low-pass
kernel. And, this is only an example of high-pass kernel since there is several
types of high-pass kernel.)

Figure 17. Watermarked image after apply high-pass filter


A high-pass filter is a filter that passes signals with a frequency higher than a
certain cutoff frequency and attenuates signals with frequencies lower than the
cutoff frequency. However, the content is mainly resided in low frequency
domain and only some high frequency components provide fine details of the
components. Hence, after apply high-pass filter we will received the resulted
image like Fig. 17.

Figure 18. Extracted watermark image after apply high-pass


Gaussian filter
We can still detected the watermark image. Because in the block DCT Based
Method, each binary watermark bit has been embedded in position (5, 2) and
(4, 3) of the mid-band frequency fields of luminance component in the DCT
blocks. And base on the encoding method we can detect a 1 if
Pix(u1,v1) > Pix(u2,v2) for the block; else it will encode a 0.
The detecting method is introduced above.

4) Attack the image with noise.

Figure 19. The watermarked image after being attacked by noise.


It is very obvious that after the image is attacked with noise the watermak image
cant be detected (or decoded) anymore, since these noise made the DCT
coefficient of the image change too much.

5) Analyze the resulted images.


The performance results are analyzed based on Peak Signal to
Noise Ratio (PSNR) and we have the higher PSNR indicates that the
reconstruction is of higher quality.
Table . PSNR of Modified image vs Watermarked image
Type of modified

PSNR: Modified image vs


Watermarked image

Watermarked

34.2752

Modified stability constant R = 200

22.7140

24 x 24 Blocks

34.5644

16 x 16 Blocks

35.4318

Low-pass filter

34.7406

High-pass filter

6.027

Added Noise

11.561

CONCLUSION
The main object of this project is to learn about the application
of DCT in Digital watermarking in frequency domain.
Experimental results show that this is a very interesting method,
easy to understand and the most important is the robustness of
this method is good. The watermarked image can withstand
several types of modified.
However, there is still some shortcoming of this method:

It is only applicable to gray images (Colorful images need


more consideration).
The resolution of the watermarked images is not very high.
Cant stand against noise.
In the future, I will learn about:
Enhancing the quality of watermarked image, and the
ability to stand against outside noise.
Adjust the method from grey images to colorful images

REFERENCES
1. http://www.stiftung-swk.de/matlab/matlab01.html
2. http://www.mathworks.com/matlabcentral/
3. Slide Signal and system - Prof. Truong Cong Thang
4. http://fourier.eng.hmc.edu/e161/lectures/gradient/node1.html

S-ar putea să vă placă și