International Journal of Scientific & Engineering Research, Volume 5, Issue 2, February-2014 324

ISSN 2229-5518

DWT based Algorithmic Approach for Digital

Watermarking

Shelly Gahlawat, Gaurav Anand

Abstract— Watermarking is the technique to discourage illegal duplication and to hide information within the image which provides authentication and copyright protection. In this paper we present an algorithm which is based on DW T in which “haar” wavelet is used which provide both hiding information inside the image and also detecting information from the image and the analysed results are shown using MATLAB.

Index Terms— Visible Watermarking; Invisible Watermarking; Discrete Wavelet Tranform; Haar Wavelet .

—————————— ——————————

1 INTRODUCTION

ith the rapid growth of computer technology and mul- timedia technology, authentication and copyright own- ership becomes more and more necessary. As on digital media distribution of images is so common nowadays.
Unfortunately, the images so distributed can be copied repeat- edly and without error, putting the right of their owners at risk. Even when encrypted for distribution, images are unpro- tected after decryption. So, one way to provide authentication and copyright protection is watermarking. It is the process of inserting data into an image in such a way that it can be used to make an assertion about the image.
As there are different techniques to do digital watermarking, one of them is DCT. But in this paper we are considering DWT as it allows good localization both in time as well as in spatial frequency domain. DWT also provides better robustness and imperceptibility. By using “haar”wavelet as a mother wavelet watermarking approach is proposed. The most important char- acterstics of good watermarking are - it should be robust and the watermark should be visible or invisible under user’s con- trol. So, DWT fulfills all the conditions of good watermarking. Therefore, in this paper we proposed an algoritm based on DWT and both visible and invisible watermarks are shown in the results.

2 PROPOSED APPROACH

This research paper proposed a prototype for the security of digital images. The working principle of this approach is as:

Insert the information or secret data into the digital image.

That information can be visible or invisible.

————————————————

Shelly Gahlawat, pursuing mtech at Amity University, India, PH-

07827620278. E-mail: shly.gahlawat@gmail.com

Gaurav Anand, pursuing mtech at Amity University, India, PH-

07838340159. E-mail: michaels.gaurav@gmail.com

And an image used can be either color or gray image.

Owner of the image can blame for ownership on the basis of secret data embedded in the image.

Take an Image
Apply DWT on Image
Take a Watermark
Embeded that watermark with DWT image
Watermarked image

Fig1 flow chart of the proposed algorithm.

3 PROPOSED ALGORITHM

A. Watermark Embedding Algorithm
clear all;
X=imread('path of org img\filename.jpg'); [a b]=size(X);
figure, imshow(X), title('Original Image');
pause(0.3);
if isrgb(X)
disp(a);
b=b/3;

IJSER © 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 2, February-2014 325

ISSN 2229-5518

disp(b); X=imresize(X,[512,512]); R=X(:,:,1);
G=X(:,:,2);
B=X(:,:,3); else R=imresize(X,[512,512]); end
R=double(R);
[A, H, V, D] = dwt2(R, 'haar');
f = A;
WM=imread('path of watermark image\filename.jpg');
if isrgb(WM) WM=rgb2gray(WM); end
WM=imresize(WM,[512,512]);
figure, imshow(WM), title('Watermark');
pause(0.1); WM=imresize(WM,[256,256]); WM=double(WM);
c = 0.01;
F = f + (c*abs(f).* WM);
[p q]=size(f);
for i=1:p
for j=1:q ncA(i,j) = F(i,j); end
end
if isrgb(X)
Rimg = idwt2(ncA,H,V,D,'haar'); Wimg(:,:,1)=Rimg;
Wimg(:,:,2)=G;
Wimg(:,:,3)=B; else Wimg=idwt2(ncA,H,V,D,'haar'); end
Wimg = imresize(Wimg,[a,b]);
[filename3, pathname3]=uiputfile('*.bmp','Save Watermared
Image');
iwrite(uint8(Wimg),fullfile(pathname3,filename3));
b=imread(fullfile(pathname3, filename3));
figure, imshow(b), title('Watermarked Image'); B. Watermark Extraction Algorithm
clear all;
X=imread('path of original image\file name.jpg'); figure, imshow(X), title('Original Image'); pause(0.3);
if isrgb(X) X=imresize(X,[512,512]); R=X(:,:,1);
G=X(:,:,2); B=X(:,:,3); else
R=imresize(X,[512,512]);
end
R=double(R);
[A, H, V, D] = dwt2(R, 'haar');
f = A;
W=imread('path of watermarked image\file name.bmp');
figure, imshow(W), title('Watermarked Image');
pause(0.3);
if isrgb(W)
W=imresize(W,[512,512]);
wR=W(:,:,1);
wG=W(:,:,2); wB=W(:,:,3); else
wR=imresize(W,[512,512]);
end
wR=double(wR);
[wA, wH, wV, wD] = dwt2(wR, 'haar');
g = wA;
c = 0.01;
RW = g - (f + (c*abs(f)));
[m n] = size(g);
for i=1:m
for j=1:n
nwA(i,j)= RW(i,j);
end
end
b = nwA;
b=imresize(b, [512,512]);
[file- name3,pathname3]=uiputfile('*.png','SaveRecover_Watermark Image ');
imwrite(b, fullfile(pathname3, filename3));
b=imread(fullfile(pathname3, filename3));
figure, imshow(b), title('Recovered Watermarked');

4 RESULT

To show the effeicieny of the proposed algorithm two differ- ent images are used in which one is the original which is to be watermarked and another image is the watermark image. The original image can be gray scale or a color image.
The results for the above algorithm are shown below.

IJSER © 2014 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 5, Issue 2, February-2014 326

ISSN 2229-5518

Original Image

Fig2. Original Image

Watermark

Fig3. Watermark Image

Watermarked Image

Fig4. Output of Invisible Watermarking

Recovered W atermarked

Fig5. Recovered Watermark Image

5 CONCLUSION

This paper shows that the need for authentication and owner’s copyright can be protected by using the proposed algorithm. It shows that by using DWT the embedded information and original not get effected by using basic image operations and the secured information can easily be read. In this way we can secure the digital images.

ACKNOWLEDGMENT

We express our sincere thanks to our college professors for their invaluable assistance, motivation, guidance and encour- agement.

REFERENCES

[1] P. B. Khatkale, K. P. Jadhav and M.V. Khasne, “Digital Water mark- ing Technique for Authentication of Color Image”, International Journal of Emerging Technology and Advanced Engineering, ISSN

2250-2459, vol. 2, Issue 7, July 2012.

[2] Kritika Singla and Sumeet Kaur, “Invisible Digital Watermarking For

Color Images”, in IJAEST-2011, vol. 10, Issue No. 2, pp. 270-274.

[3] Yusnita Yusof and Othman O. Khalifa, “Digital Watermarking for

Digital Images using Wavelet Transform”, proceeding of IEEE-2007.

[4] KX. Yi, l Y Shi, X Sun, "Digital Watermarkinging Techniques An In- troductory Review," Journal of Image and Graphics, vol. 6(A), pp.III- I17,2001

IJSER © 2014 http://www.ijser.org