I used this program to hide image in image using lsb (steganography ) .First,I hide the original image in cover image using Encryption code ,second,I did decryption code but I cant get the original image which was hidden....how can I repair it? what shall i do to get the original image from decryption code? can anyone help me please
I cant get the original Image ('claudia.tif') from Decryption code…what shoud be written to get it?..please I neet it in my study.
조회 수: 1 (최근 30일)
이전 댓글 표시
Encryption code
cover = imread('mouse.tif');
originalImage = imread('claudia.tif');
figure(1), imshow(cover); title('Cover Image');figure(2), imshow(originalImage);title('original Image');
cover=double(cover);originalImage=double(originalImage);
%imbed = no. of bits of message image to embed in cover image
imbed=2;
originalImageshift=uint8(bitshift(originalImage,-(8-imbed)));
coverzero = cover;
for i=1:imbed
coverzero=bitset(coverzero,i,0);end
cove=uint8(coverzero);
stego = imadd(cove,originalImageshift);
figure(3),imshow(stego);title('steganograhy image');
imwrite(stego,'steganograhy.tif');
Decryption code
cover = imread('mouse.tif');
stego = imread('steganograhy.tif');
figure(1), imshow(cover); title(' Cover Image');
figure(2), imshow(stego);title('stegnography Image');
cover=double(cover);stego=double(stego);
ori_image = imsubtract(stego,cover);
figure(3),imshow(ori_image);title('original image');
imwrite(ori_image,'orignalimage1.tif');
답변 (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!