matlab code for video watermarking lsb
#1
Wink 

i want the lsb code for video watermarking
Reply
#2

matlab code for video watermarking lsb


Matlab code for LSB Steganography

Data Hiding


target=imread(‘image.jpg’);
fid = fopen('message.txt','r');
F = fread(fid);
s = char(F');
fclose(fid);

sz1=size(original);
size1=sz1(1)*sz1(2);
sz2=size(F);
size2=sz2(1);

if size2> size1
fprintf('\nImage File Size %d\n',size1);
fprintf('Text File Size %d\n',size2);
disp('Text File is too Large');
else
fprintf('\nImage File Size %d\n',size1);
fprintf('Text File Size %d\n',size2);
disp('Text File is Small');
i=1;j=1;k=1;
while k<=size2
a=F(k);
o1=original(i,j,1);
o2=original(i,j,2);
o3=original(i,j,3);

[r1,r2,r3]=hidetext(o1,o2,o3,a);

target(i,j,1)=r1;
target(i,j,2)=r2;
target(i,j,3)=r3;

if(i<sz1(1))
i=i+1;
else
i=1;
j=j+1;
end
k=k+1;
end
width=sz1(1);
txtsz=size2;
n=size(original);
target(n(1),n(2),1)=txtsz;% Text Size
target(n(1),n(2),2)=width;% Image's Width
%save secret.mat target;% txtsz width;
imwrite(target,'secret.bmp','bmp');

imshow(target)

end
helpdlg('data hided succesfully in secret.bmp');


Date Retrieval


target=imread(‘stego.bmp’);
n=size(target);
txtsz=target(n(1),n(2),1);% Text Size
width=target(n(1),n(2),2);% Image's Width

i=1;j=1;k=1;
while k<=txtsz

r1=target(i,j,1);
r2=target(i,j,2);
r3=target(i,j,3);

R(k)=findtext(r1,r2,r3);

if(i<width)
i=i+1;
else
i=1;
j=j+1;
end
k=k+1;
end

fid = fopen('secret.txt','wb');
fwrite(fid,char®,'char');
fclose(fid);

helpdlg('data Retrivedsuccesfully in secret.txt');


Function for findtext

function data = findtext(redc,greenc,bluec)
txt=0;
ifbitand(redc,4)== 4
txt=bitor(txt,128);
end
ifbitand(redc,2)== 2
txt=bitor(txt,64);
end
ifbitand(redc,1)== 1
txt=bitor(txt,32);
end
ifbitand(greenc,4)== 4
txt=bitor(txt,16);
end
ifbitand(greenc,2)== 2
txt=bitor(txt,8);
end
ifbitand(greenc,1)== 1
txt=bitor(txt,4);
end
ifbitand(bluec,2)== 2
txt=bitor(txt,2);
end
ifbitand(bluec,1)== 1
txt=bitor(txt,1);
end
data=txt;
return


Function for hidetext


function[red,green,blue]=hidetext(redc,greenc,bluec,text)

red=bitand(redc,248);
green=bitand(greenc,248);
blue=bitand(bluec,252);
txt=0;

ifbitand(text,128)== 128
red=bitor(red,4);
end

ifbitand(text,64)== 64
red=bitor(red,2);
end

ifbitand(text,32)== 32
red=bitor(red,1);
end

ifbitand(text,16)== 16
green=bitor(green,4);
end

ifbitand(text,8)== 8
green=bitor(green,2);
end

ifbitand(text,4)== 4
green=bitor(green,1);
end

ifbitand(text,2)== 2
blue=bitor(blue,2);
end

ifbitand(text,1)== 1
blue=bitor(blue,1);
end

return
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: lsb matlab, vhdl code for lsb watermarking, pca for video watermarking in matlab, ppt watermarking using lsb, ppt for digital watermarking using lsb, use of lsb algorithm in digital watermarking, watermarking ppt on lsb technique,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  image encryption and decryption using rsa algorithm in matlab 2 7,912 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 8,068 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
  MATLAB codes needed for powerline communication 1 8,079 12-04-2017, 05:00 PM
Last Post: jaseela123d
  matlab code for wavelet based ofdm transmitter 1 923 24-02-2017, 11:18 AM
Last Post: ijasti
  code to extract brain tumor detection using matlab 2 1,067 17-10-2016, 04:32 PM
Last Post: girish123ak
  f5 algorithm steganography matlab code 2 869 04-10-2016, 03:00 AM
Last Post: [email protected]
  color image segmentation using jseg algorithm in matlab code 2 866 29-09-2016, 12:07 PM
Last Post: Guest
  matlab code for retinal hemorrhage detection in fundus images 2 857 24-08-2016, 01:10 AM
Last Post: [email protected]
  matlab code of directional filter bank 1 856 13-08-2016, 11:27 AM
Last Post: jaseela123d
  matlab xy routing algorithm 2 830 12-08-2016, 09:16 PM
Last Post: khant

Forum Jump: