Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Wavelet Steganography: Hide Message in Image using wavelet Transform
04-30-2012, 03:17 PM (This post was last modified: 04-30-2012 03:25 PM by Rupam.)
Post: #1
Simple Wavelet Steganography: Hide Message in Image using wavelet Transform
    MATLAB Programming
%%%%%%%%%%%%%%Encoding.m
 
clear all
close all
clc
im=imread('cameraman.tif');
wname='haar';
 
msg='Grasshopper Network';
data=[];
for(i=1:length(msg))
    d=msg(i)+0;
    data=[data d];
end
 
 
  imshow(im);
  [cA1,cH1,cV1,cD1] = dwt2(im,wname);
  dec1 = [cA1     cH1;     
           cV1     cD1      
        ];
 
    figure
    imshow(uint8(dec1));
 
 
 
    M=max(data);
    data_norm=data/M;
    n=length(data);
    [x y]=size(cH1);
    cH1(1,1)=-1*n/10;
    cH1(1,2)=-1*M/10;
 
 
    for(i=1:1:ceil(n/2))
        cV1(i,y)=data_norm(i);
    end
 
 
    for(i=ceil(n/2)+1:1:n)
        cD1(i,y)=data_norm(i);
    end
 
     CODED1=idwt2(cA1,cH1,cV1,cD1,wname);
 
     figure
     imshow(uint8(CODED1))
     [x y]=size(cA1);
      imshow(uint8(CODED1))
 
     ms=abs(CODED1-double(im));
     ms=ms.*ms;
     ms=mean(mean(ms))
     ps= (255*255)/ms;
     ps=10*log10(ps)
    imwrite(uint8(CODED1),'Stego.bmp','bmp'); 
     return
 
%%% END of encoding.m%%%%%%%%%%%%%%%%
 
 
%%%%% Decoding.m%%%%%%%%%%%%%%%%%
im=imread('Stego.bmp');
[cA11,cH11,cV11,cD11] = dwt2(CODED1,wname);
data=[]
data_norm=[];
n=ceil(abs(cH11(1,1)*10));
M=ceil(abs(cH11(1,2)*10));
 
 
    for(i=1:1:ceil(n/2))
        data_norm(i)=cV11(i,y);
    end
 
 
    for(i=ceil(n/2)+1:1:n)
        data_norm(i)=cD11(i,y);
    end
    data=ceil(data_norm*M)-1;
    msg='';
    for(i=1:length(data))
        msg=strcat(msg,data(i));
    end
 
    msg
%%End of Decoding.m



Why pay internet charges for every device?
Try out WiFiGrassy for a day and share Internet Connection Effectively
Find all posts by this user
Add Thank You Quote this message in a reply
   

07-02-2012, 01:17 AM
Post: #2
RE: Simple Wavelet Steganography: Hide Message in Image using wavelet Transform
hm, with MatLab R2008b x64 I get:


Code:
msg =

GqasshnooeqNesvnqj

Find all posts by this user
Add Thank You Quote this message in a reply
   

07-03-2012, 09:37 AM
Post: #3
RE: Simple Wavelet Steganography: Hide Message in Image using wavelet Transform
(07-02-2012 01:17 AM)EliteTUM Wrote:  hm, with MatLab R2008b x64 I get:


Code:
msg =

GqasshnooeqNesvnqj
Yes. You would get that. You need to work a little on the decoding side! Some simple changes would show you the Rose Smile


Why pay internet charges for every device?
Try out WiFiGrassy for a day and share Internet Connection Effectively
Find all posts by this user
Add Thank You Quote this message in a reply
   

Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)