I don't know this watermarking code~ please explain code~

1 view (last 30 days)
close all
figure;imshow(rgbimage);title('original color image');
dec2d = [...
h_LL, h_LH; ...
h_HL, h_HH ...
figure,imshow(uint8(dec2d));title('DWT2 of original color image');
figure;imshow(rgbimage);title('Watermark image');
dec2d = [...
w_LL, w_LH; ...
w_HL, w_HH ...
figure,imshow(uint8(dec2d));title('DWT2 of Watermark image');
figure;imshow(rgbimage);title('Watermarked image');
dec2d = [...
wm_LL, wm_LH; ...
wm_HL, wm_HH ...
figure,imshow(uint8(dec2d));title('DWT2 of Watermarked image');
newwatermark_LL= (wm_LL-h_LL)/0.30;
%extracted watermark image
figure;imshow(uint8(rgb2));title('Extracted watermark');
someone sent this watermarking sourece to me
but I don't understand this code~
I wonder these part matlab source~
%host rgbimage=imread('host.jpg');%<-- example I insert image cameraman.tif (my file name)256x256
%watermark rgbimage=imread('watermark.jpg'); %<-- exmaple I insert image rice.tif (my file name)256x256
%watermarked rgbimage=imread('watermarked.jpg'); <-- I don't know what kind of image insert?

Accepted Answer

Thorsten on 29 Jun 2015
You first create the Watermarked.jpg using embedd.m and then you can can extract the image using extract.m, as far as I can see.

More Answers (1)

B.k Sumedha
B.k Sumedha on 29 Jun 2015
I apologize for not replying to your previous query.
Its just that after this :
figure,imshow(uint8(dec2d));title('DWT2 of Watermarked image');
write this line.
This is where you will be saving the watermarked image. After this u will be using it to extract the image.

Community Treasure Hunt

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

Start Hunting!