Hi, My current project is image steganography using lsb. I want the codes for finding both average and difference between two neighbor pixel values along wise columns for all rows. My codes are producing wrong answers.Can anyone help me with this?
1 回表示 (過去 30 日間)
古いコメントを表示
warning off
clc
InImg1=imread('C:\peppers.jpg');
cover = imresize(InImg1,[512 512]);
cov=cover(:,:,1);
figure,imshow(cov)
title('Cover image');
InImg2=imread('C:\girl.jpg');
InImg2=imresize(InImg2,[512 512]);
sec=im2bw(InImg2);
%imwrite(sec,'s.jpg');
figure,imshow(sec)
title('Secret image');74
[covRows covColumns] = size(cov);
[secRows secColumns] = size(sec);
for row = 1:covRows
for column = 1:covColumns-1
l(row,column)=plus(cov(row,column)/2,cov(row,column+1)/2);
n(row,column)=minus(cov(row,column),cov(row,column+1));
end
end
for row = 1:secRows
for column = 1:secColumns-1
even=mod(column,2);
if (even~=0)
stego(row,column)=plus(sec(row,column),l(row,column));
else
stego(row,column)=plus(sec(row,column),n(row,column));
end
end
end
figure,imshow(stego)
title('Stego image');
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Encryption / Cryptography についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!