Image Processing using Least Significant bit

6 ビュー (過去 30 日間)
Anii  Khan
Anii Khan 2020 年 2 月 26 日
回答済み: Walter Roberson 2020 年 2 月 26 日
How can i check and edit the binary value of a pixel in RGB image. Do i need to convert it to Grey first. Can someone tell me with code.

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 2 月 26 日
Provided that the image is uint8 or uint16 or int16, but not double:
Lsb = mod(TheImage, 2);
Now for any given row R and column C
Lsb(R, C, :)
will be the least significant bit of each of the bit planes.
TheImage - Lsb + NewLsb
would then set the least significant bit to be NewLsb
There are times when it makes sense to convert to grayscale before looking at Lsb, but there are other times when it should be left as rgb. In particular if you are doing watermark work then you need to keep the cover as rgb.

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by