필터 지우기
필터 지우기

image steganography using RGB image in matlab

조회 수: 4 (최근 30일)
prasanth
prasanth 2013년 2월 17일
댓글: sruthi sruthi 2019년 8월 20일
I was working on image steganography of lsb substitution using RGB image.I couldn't able to figure out what's wrong in the code. It is not showing an error.But,the answer is different while retrieving and codes are :
Embbeding code:
clc
c = imread('pout.tif');
c=imresize(c,[64 64],'nearest');
message = 'image';
message = strtrim(message);
m = length(message) * 8;
AsciiCode = uint8(messag e);
binaryString = transpose(dec2bin(AsciiCode,8));
binaryString = binaryString(:);
N = length(binaryString);
b = zeros(N,1);
for k = 1:N
if(binaryString(k) == '1')
b(k) = 1;
else
b(k) = 0;
end
end
s = c;
height = size(c,1);
width = size(c,2);
k = 1;
for i = 1 : height
for j = 1 : width
LSB = mod(double(c(i,j)), 2);
if (k>m || LSB == b(k))
s(i,j) = c(i,j);
else
if(LSB == 1)
s(i,j) = (c(i,j) - 1);
else
s(i,j) = (c(i,j) + 1);
end
k = k + 1;
end
end
end
imwrite(s,'msgimage.tif');
imshow(c)
retrieving_code:
clc
s = imread('msgimage.bmp');
height = size(s,1);
width = size(s,2);
m = 64;
k = 1;
for i = 1 : height
for j = 1 : width
if (k <= m)
b(k) = mod(double(s(i,j)),2);
k = k + 1;
end
end
end
binaryVector = b;
binValues = [ 128 64 32 16 8 4 2 1 ];
binaryVector = binaryVector(:);
if mod(length(binaryVector),8) ~= 0
error('Length of binary vector must be a multiple of 8.');
end
binMatrix = reshape(binaryVector,8,8);
textString = char(binValues*binMatrix);
disp(textString);
help please.
  댓글 수: 3
SHALU SINGH
SHALU SINGH 2014년 3월 30일
i need this steganography code... will u give to me...??
HANIYAH FATIMA
HANIYAH FATIMA 2018년 12월 8일
after the retriving code,text string is not displayed

댓글을 달려면 로그인하십시오.

답변 (1개)

riyaz nadaf
riyaz nadaf 2019년 1월 26일
i did this project. if you want matlab code contact
riyaznadaf034@gmail.com
  댓글 수: 1
sruthi sruthi
sruthi sruthi 2019년 8월 20일
sir!
i need the sourcecode for this project.
please help me in this sir....

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by