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!