Help in DCT watermark embedding process

3 views (last 30 days)
Yasir
Yasir on 23 Feb 2013
hi everyone, i got confuse regarding of this approach of watermark and still now i can't get it clearly therefor i make a post hopeful someone help me the required : 1- the steps of embedding process 2- Matlab script
Many Thanks

Answers (1)

Walter Roberson
Walter Roberson on 23 Feb 2013
  5 Comments
Walter Roberson
Walter Roberson on 23 Feb 2013
Read Image Analyst's watermarking demo.
Yasir
Yasir on 26 Feb 2013
Edited: Yasir on 26 Feb 2013
hi Walter,plz your help to finilize it Kindly i tried the below code to implement it but seems no thing am working in Cox DCT approach depend to forumla ti=ti+atixi, a=0.1
[fname pthname]=uigetfile('*.jpg;*.png;*.tif;*bmp','Select the Asset Image'); %select image
I=imread([pthname fname]);
origy=rgb2gray(I);
origdct=dct2(origy);
[rows cols]=size(origdct);
imglen=rows*cols;
origrddct=reshape(origdct, 1, imglen);
origs=sort(origrddct,'descend');%re-ordering all the absolute values
wmsz=2223; %watermark size
W=randn(1,wmsz);%generate a Gaussian spread spectrum noise
%find the index of largest coffiencent
for k=1:wmsz
for i=1:imglen
if (origs(k)==origrddct(i))
m(k)=i;
display(i);
end
end
end
%embedded formula
for j=1 :wmsz
origsn(j)=((origs(j) * 1)+ (0.3*origs(j)* W(j)));
end
for n=1: wmsz-1
for f=1:imglen
if (f == m(n) )
origrddct(f)=origsn(n);
end
end
end
mx=reshape(origrddct,rows,cols);
oridctx=idct2(mx);
figure , imshow(oridctx);
figure,imshow(origy);

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!