Author Topic: Watermarking of Images-a different perspective required  (Read 744 times)

Offline pulse.asr

  • Newbie
  • *
  • Posts: 2
  • Matlab Forum
    • View Profile
Watermarking of Images-a different perspective required
« on: February 01, 2012, 08:45:13 PM »
I am working on an project on digital watermarking and am implementing an algorithm where de input img is mixed with de matermark img at de source to give 2 shadows.....at de destination de the 2 shadows are to re-permuted to get back de original img and the watermark img...de code is as follows


I=imread('monkey.gif');
L=imread('lenna.bmp');


SA=mod((5*I+4*L),256);
SB=mod((4*I+5*L),256);
In=mod((285*SA-228*SB),256);
Ln=mod((285*SB-228*SA),256);


the code works perfectly for smaller matrices (say 2x2) but when i use images, the variables 'In and Ln' always have zeros....I am using 512x512 images...anybody got a clue ?

Offline pulse.asr

  • Newbie
  • *
  • Posts: 2
  • Matlab Forum
    • View Profile
Re: Watermarking of Images-a different perspective required
« Reply #1 on: February 02, 2012, 08:24:24 PM »
hey guys I found out where my mistake lies. imread stores data in an 8-bit format by default (i think  :P ). Values manipulated using the equations I stated above would lead to negative values for SA and SB. So I converted de matrix from uint8 to double. Yipee it worked  :) :) :) :)

Matlab and SimuLink Development Forum

Re: Watermarking of Images-a different perspective required
« Reply #1 on: February 02, 2012, 08:24:24 PM »