How to take the 8th bit in lsb

1 回表示 (過去 30 日間)
Swati Nagpal
Swati Nagpal 2018 年 5 月 31 日
回答済み: Walter Roberson 2018 年 6 月 1 日
I am applying LSB for image steganography and I have got the binary representation of an rgb image i. e. 10001010 but I m not getting any idea of how to use the 8th bit to hide data in it anybody plz help me.
  3 件のコメント
Jan
Jan 2018 年 5 月 31 日
The readers cannot guess, what "binary representation of an rgb image i. e. 10001010" exactly is. Is this a logical vector, a decimal number or a character vector? Did you search in the forum for "lsb steganography" already? You will find a lot of corresponding threads.
I strongly recommend to remove the "ASAP" from the question. Pushing the readers is counterproductive, because it sounds impolite.
Swati Nagpal
Swati Nagpal 2018 年 6 月 1 日
the binary representation of 10001010 is just an example from my side. The thing is i have got uptothe binary representation of the image and now i have to take the 8th least bit of it to apply the lsb technique. i want a code for it so please help me in this.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 6 月 1 日
You can use bitset() and bitget() .
To extract the lsb you can use mod(YourImage,2) . To set new lsb you can do
YourImage - mod(YourImage,2) + NewLSBValue

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by