Help in DCT watermark embedding process

조회 수: 2 (최근 30일)
Yasir
Yasir 2013년 2월 23일
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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 23일
  댓글 수: 5
Walter Roberson
Walter Roberson 2013년 2월 23일
Read Image Analyst's watermarking demo.
Yasir
Yasir 2013년 2월 26일
편집: Yasir 2013년 2월 26일
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);

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by