How do I extract the watermark logo using the code below:

7 次查看(过去 30 天)
clc;
close all;
clear
% reading the watermarked image
cover=imread('Watermarkedimg.tif'); %
[row1,col1]=size(cover); % [1024 1024 3] /[1024 1024 1]
%figure; imshow(cover); title('Satellite Image');
[LL1,HL1,LH1,HH1] = dwt2(cover,'db1');
% % read binary watermark image [UD binary logo] for reference
ologo=imread('udlogob.bmp');
[row2,col2]=size(ologo);
% %figure; imshow(logo); title('Watermark');
L=4;
scale=8;
wimg1=LL1;
for i1=1:row2
for j1=1:col2
temp1=wimg1(i1,j1); % pixel value at particular [0 to 255]
temp2=round(temp1/scale);
rlogo(i1,j1)=mod(temp2,2);
end
end
rlogo=uint8(rlogo);
figure;
subplot(1,2,1);
imshow(ologo, [0, 1]);
title('Original UD Logo');
subplot(1,2,2);
imshow(rlogo, [0 1]);
title('Recovered UD Logo');

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by