how could i apply the LSB watermarking method to add small watermark into an image ?

1 view (last 30 days)
i want to change the last 4 bits of the origin image with the MSB of the watermark image ? how could i do that ? and how could i trait the case where i have smaller watermark than the orgine image ?

Answers (2)

Walter Roberson
Walter Roberson on 21 Dec 2013
See bitset() and bitget()
If your watermark is smaller than the original image, you could pad the watermark or you could repeat it.
  5 Comments
Image Analyst
Image Analyst on 21 Sep 2014
No. Not right. First of all, 1010 decimal is "1111110010" in binary.
The 1 as your second argument means that the bit #1, the right most, least significant bit, is changed from 0 to 1 meaning that the binary number is now "1111110011". When you get the decimal value of "1111110011" you'll find that it is 1011. Use bin2dec('1111110011') to prove it to yourself.
For the third argument, you have 11 but it must be one of these strings: 'uint64' | 'uint32' | 'uint16' | 'uint8' | 'int64' | 'int32' | 'int16' | 'int8'
SHALU SINGH
SHALU SINGH on 21 Sep 2014
Edited: SHALU SINGH on 21 Sep 2014
ok, thanx now i understand, it means 1st it seems a no. as decimal and then convert it into binary and modified the specific bit from right to left no. previously i am taking no. as in binary, but the actual it is in dec.

Sign in to comment.


Image Analyst
Image Analyst on 21 Dec 2013
Feel free to adapt my LSB watermarking demo, attached.

Community Treasure Hunt

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

Start Hunting!