Info
This question is closed. Reopen it to edit or answer.
digital image watermark using lsb
1 view (last 30 days)
Show older comments
if true
% code
end
base = imread('lena.png');
watermark = imread('baboon.png');
figure(1)
imshow(base)
title('Original Image')
figure(2)
imshow(watermark)
title('Watermark Image (Image which will hide in cover image')
realdata = zeros([512 512]);
indexi=1;
indexj=1;
realIndexi = 1;
realIndexj = 1;
for i=1:256
for j=1:256
realdata(realIndexi,realIndexj)=base(indexi,indexj);
indexj=indexj+1;
realIndexj=realIndexj+2;
end
indexi= indexi+1;
indexj = 1;
realIndexi=realIndexi+2;
realIndexj=1;
end
indexi=1;
indexj=1;
realIndexi = 2;
realIndexj = 2;
for i=1:256
for j=1:256
realdata(realIndexi,realIndexj)=watermark(indexi,indexj);
indexj=indexj+1;
realIndexj=realIndexj+2;
end
indexi= indexi+1;
indexj = 1;
realIndexi=realIndexi+2;
realIndexj=1;
end
%preparing to write
realdata =uint8(realdata);
% Displaying the watermarked image
figure(3)
imshow(realdata,[])
title('Watermarked Image (Final watermarked image)')
imwrite(realdata,'Visible Watermarked.bmp'); % Save modified image
Answers (1)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!