Problem with Watermarking in HSV color space

2 visualizzazioni (ultimi 30 giorni)
Youssra
Youssra il 28 Apr 2015
I'm trying to apply a DWT-SVD watermaking in HSV color space, but the final watermarked image is defenitely different than the original image even if the HSV color space is considered to approximate the way humans perceive color. Here is the code I'm using and also the result I got. Can you help me to know what mistake I did to not getting a watermarked image similar to the original? Thank you.
start_time=cputime;
filename='lenna_256.png';
img=imread(filename);
% % %%%%%%%hsv
imgr=rgb2hsv(img);
red1=imgr(:,:,1);
green1=imgr(:,:,2);
blue1=imgr(:,:,3);
%%%%%%%%%%dwt _svd
[h_LL1,h_LH1,h_HL1,h_HH1]=dwt2(red1,'haar');
[h_LL2,h_LH2,h_HL2,h_HH2]=dwt2(h_LL1,'haar');
[h_LL3,h_LH3,h_HL3,h_HH3]=dwt2(h_LL2,'haar');
[U_imgr1,S_imgr1,V_imgr1]= svd(h_LL3);
%%%%watermark
w=mark;
w=imread(mark);
wg=rgb2gray(w);
wb=double(wg);
[U_imgr2,S_imgr2,V_imgr2]= svd(wb);
%%%%watermarking process
S_wimgr=S_imgr1+(0.1*S_imgr2);
new_ll = U_imgr1*S_wimgr*V_imgr1';
img_water3=idwt2(new_ll,h_LH3,h_HL3,h_HH3,'haar');
img_water2=idwt2(img_water3,h_LH2,h_HL2,h_HH2,'haar');
img_water=idwt2(img_water2,h_LH1,h_HL1,h_HH1,'haar');
img_water=cat(3,img_water,green1,blue1);
img_water=hsv2rgb(img_water);
imwrite(img_water,'Images\watermaked_imageHSV.bmp','bmp');
figure('position', [500, 150, 800, 500])
subplot(1,2,1)
imshow(img);
title('original image')
subplot(1,2,2)
imshow(img_water)
title('watermarked image')

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by