Effacer les filtres
Effacer les filtres

I need to hide a color image into another color image using LSB substitution,The following code hides image into another image.But I have no idea as to how to retrieve it.Please help

1 vue (au cours des 30 derniers jours)
Hiding image
cover=imread('D:\Images\falls.jpg');
msg=imread('D:\Images\autumn.jpg');
%Get the R component
cover1=cover(:,:,1);
%set least 3bit zeros
cover1=bitand(cover1,248);
%let secret image bytes shift right by 5 bits
msg1=msg(:,:,1);
shiftmsg3=bitshift(msg1,-5);
%hiding
cover1 =bitor(cover1,shiftmsg3);
%Get the G component
cover2=cover(:,:,2);
%set least 3bit zeros
cover2=bitand(cover2,248);
%let secret image bytes shift right by 5 bits
msg2=msg(:,:,2);
shiftmsg3=bitshift(msg2,-5);
%hiding
cover2=bitor(cover2,shiftmsg3);
%Get the B component
cover3=cover(:,:,3);
%set least 3bit zeros
cover3=bitand(cover3,248);
%let secret image bytes shift right by 5 bits
msg3=msg(:,:,3);
shiftmsg3=bitshift(msg3,-5);
%hiding
cover3=bitor(cover3,shiftmsg3);
%save
stego=cover;
cover(:,:,1)=cover1;
cover(:,:,2)=cover2;
cover(:,:,3)=cover3;
imwrite(cover, 'D:\color\stego.bmp');
  1 commentaire
Yogesh Lamture
Yogesh Lamture le 23 Sep 2019
Hello,
I am new to MATLAB and also working on the same concept i.e. Image Steganography. I want to hide one color image into another color image. I have seen your code but not able to understand the logic behind this. It will be great if you explain the logic.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 14 Déc 2017
See my attached demo.
  2 commentaires
ma da
ma da le 17 Déc 2017
LSB_Watermarking.m demo displays the grayscale image but I need the result for color images. Both the cover image,stego image must be color images.No grayscale conversion should be performed.Please help.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Encryption / Cryptography dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by