What would be the watermark extraction code for this given embedding code?
Afficher commentaires plus anciens
clear all;
close all; clc;
im=imread('cameraman.tif');
image1=im(25:92,75:155);
imshow(image1); title('Original image');% orginal image for watermarking
[ori_row,ori_col]=size(image1)
host_length=ori_row*ori_col;
i=1;
j=1;
k=1;
wmimage=imread('pout.tif');
[wm_row,wm_col] = size(wmimage);
imshow(wmimage); title('Watermark image');
wm=dec2bin(wmimage);
wm_length=wm_row*wm_col*8;
host=dec2bin(image1);
counter=0;
while i < host_length
counter=counter+1;
if counter > wm_length
break;
end
host(i,8)=wm(j,k);
k=k+1;
if k>8
k=1;
j=j+1;
end
i=i+1;
end
key1=wm_row
key2=wm_col
im1=bin2dec(host);
im1=reshape(im1,ori_row,ori_col);
image1(1:ori_row,1:ori_col)=im1(1:ori_row,1:ori_col);
display 'After embed';
imshow(image1);title('Watermarked image'); imresize(image1,[256 256]);
Réponses (0)
Catégories
En savoir plus sur Watermarking dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!