Effacer les filtres
Effacer les filtres

LSB substitution by verifying pixel values odd or even

1 vue (au cours des 30 derniers jours)
anna ann
anna ann le 9 Fév 2017
for embedding a message b, keep the pixel value odd for bit 0 and even for bit 1. i have developed code in this manner. But output values are not getting as expected. Somebody plz help to figure out the mistake.
c=round(rand(2,12));
m=1:2;n=1:12;
a(m,n)=c(m,n);
disp(a);
b=dec2bin(128);
l=length(b);
for k=1:l
if b(k)==1
if mod(c(1,k),2)==1
c(1,k)=c(1,k);
else
c(1,k)=c(1,k)+1;
if mod(c(1,k),2)==0
c(1,k)=c(1,k);
else
c(1,k)=c(1,k)+1;
end
end
end
end
disp(c);

Réponses (0)

Catégories

En savoir plus sur Agriculture 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