Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • 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
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?
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor