Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide watermark of an image via MATLAB?

Status
Not open for further replies.

ciscosoft

Computer
Joined
Dec 29, 2011
Messages
1
Location
GB
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top