ciscosoft
Computer
- Dec 29, 2011
- 1
Hi, I am new in MATLAB, I have been given a code which hides the watermark image into the bit0 of the original image:
orig = imread('lennagray.bmp');
wm = imread('watermark.gif');
[h w] = size(orig);
subplot(121), imshow(orig);
subplot(122), imshow(wm, [0 1]);
img = bitand(orig, uint8(254*ones(w,h)));
img = img + wm;
imwrite(img, 'lennawm00.bmp');
I need to hide the watermark into bit5 instead of bit0. Can anyone help me out please?
orig = imread('lennagray.bmp');
wm = imread('watermark.gif');
[h w] = size(orig);
subplot(121), imshow(orig);
subplot(122), imshow(wm, [0 1]);
img = bitand(orig, uint8(254*ones(w,h)));
img = img + wm;
imwrite(img, 'lennawm00.bmp');
I need to hide the watermark into bit5 instead of bit0. Can anyone help me out please?