LSB substitution by verifying pixel values odd or even
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Encryption / Cryptography finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!