Substitution of LSB of RGB component by other bits
Show older comments
I have extracted audio bits in a variable. These needs to be substituted in RGB components at various pixel positions. I have the pixel positions and 8 bit value of each RGB at that position. Want to know how last 2 LSB of, say, RED component can be replaced by first 2 bits of audio data.
Kindly share if a link is already available for same.
Answers (1)
Walter Roberson
on 18 Apr 2013
0 votes
bitset()
2 Comments
Walter Roberson
on 18 Apr 2013
Use 3 bitset() calls.
Or if you are already using dec2bin storage for both r and firstAudio, then with no loops,
a = r;
a(end-2:end) = firstAudio(end-2:end);
Categories
Find more on Encryption / Cryptography in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!