i'm doing project on frequency domain watermarking but i already did my compression work on jpeg 2000 compression standard.. so whether i can embedd my watermark on frquency domain or not?

8 views (last 30 days)
I=imread('girl512.bmp'); subplot(2,3,1), imshow(I,[]), title('Original Image'); wmsz=1000; I=I(:,:,1); [r,c]=size(I); D=dct2(I); D_vec=reshape(D,1,r*c); [D_vec_srt,Idx]=sort(abs(D_vec),'descend'); W=randn(1,wmsz); subplot(2,3,2), plot(W), title('Watermark'); Idx2=Idx(2:wmsz+1); IND=zeros(wmsz,2); for k=1:wmsz x=floor(Idx2(k)/r)+1; y=mod(Idx2(k),r); IND(k,1)=y; IND(k,2)=x; end D_w=D; for k=1:wmsz fw=D_w((IND(k,1),IND(k,2)); fw=fw+0.1*fw.*W(k); end I2=idct2(D_w); I2_int=uint8(I2); imwrite(I2_int,'I2_watermarkedn.bmp','bmp'); subplot(2,3,3), imshow('I2_watermarkedn.bmp'), title('Watermarked Image'); W2=[]; for k=1:wmsz W2(k)=[(D_w(IND(k,1),IND(k,2))/D(IND(k,1),IND(k,2))-1)*10]; end subplot(2,3,4), plot(W2), title('Extracted Watermark');

Answers (1)

Walter Roberson
Walter Roberson on 3 Oct 2012
Yes.

Community Treasure Hunt

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

Start Hunting!