Wavelet watermark level2

433 views
323 views

Published on

Image Watermark using Wavelet level 2

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
433
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Wavelet watermark level2

  1. 1. Watermark algorithm• function [D]=blockdwt2c(A,W);•• [row,col]=size(A);•• Tr=250;• k=0.01;•• [ca,ch,cv,cd] = dwt2(A,Haar);• c1 = [ch cv cd];•• %%%%%%Wavelet level 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%•• [ca1, ch1, cv1, cd1]= dwt2(ca,Haar);•• c2=[ch1 cv1 cd1];•• [h, w] = size(ca1);• [m, n] = size(c2);•• W=dmgb(W,A);•• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Here we take the wavelet transform of the• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%watermark
  2. 2. Watermark algorithm•• continued [caa chh cvv cdd]=dwt2(W,Haar);• W=caa;• size(W);•• % Adding watermark image.•• for i=1:h• for j=1:w• if ca1(i,j)>Tr• Ca(i,j)=ca1(i,j)+k*W(i,j); % <--------k*abs(double(c1(i,j)))*W(i,j); de olabilir• else• Ca(i,j)=ca1(i,j);• end• end• end•• % CH1=C1(1:h,1:w);• % CV1=C1(1:h,w+1:2*w);• % CD1=C1(1:h,2*w+1:3*w);•• D0= double( idwt2(Ca,ch1, cv1, cd1,Haar) );•• D= double(idwt2(D0, ch, cv, cd, Haar));
  3. 3. Reversing and detecting the watermark • h = fspecial(gaussian); • >> I2 = imfilter(marked,h); • imshow(uint8(marked)), title(Original Image) • figure, imshow(uint8(I2)), title(Filtered Image) • >> a=I2-image1; • >> [ca ch cv cd]=dwt2(a,haar); • >> [ca1 ch1 cv1 cd1]= dwt2(ca,haar); • >> imshow(ca1)

×