Explanation for LSB data hiding
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Please can someone explain what does the numbers 248, 252, 128, 64 denote, in
red = bitand(redc,248);
blue = bitand(bluec,252);
bitand(text,128) == 128
bitand(text,64) == 64
bitor(red,4)
bitor(red,2)
bitor(red,1)
The below is a few lines from LSB...
red = bitand(redc,248);
green = bitand(greenc,248);
blue = bitand(bluec,252);
if bitand(text,128) == 128
red = bitor(red,4);
end
if bitand(text,64) == 64
red = bitor(red,2);
end
if bitand(text,32) == 32
red = bitor(red,1);
end
0 Kommentare
Akzeptierte Antwort
dbmn
am 23 Mär. 2017
you might get an answer if you leave the decimal notation and go to binary. Here is a mini example
dec2bin(248) = 11111000
dec2bin(252) = 11111100
So bitand(redc, 248) gets you all but the last 3 digits of your redc.
dec2bin(bitand(bin2dec('10101011'), 248)) = 10101000
I assume that you store whatever Info you need in that 3 digits. Similarly bitand(redc, 7) will get you the last 3 bits with the desired info.
dec2bin(bitand(bin2dec('10101011'), 7)) = 00000011
You might play around with bitand and bitor for clarity.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data 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!