what is lsb planes of an image and what is its significance?

조회 수: 9 (최근 30일)
anna ann
anna ann 2016년 10월 18일
답변: Walter Roberson 2016년 10월 18일
im = imread('pout.tif');
bit1 = bitget(im, 1); % lsb for example
imshow(bit1, []

채택된 답변

Walter Roberson
Walter Roberson 2016년 10월 18일
"LSB" is Least Significant Bit.
Suppose you had 8 bits per pixel, 0 to 255. Then the Most Significant Bit (MSB) would be the bit that was either 0 or 128. A change in the MSB would make a difference of up to half of the available brightness. For example, 17 compared to 145 is a change in just the MSB. The Least Significant Bit (LSB) is the other end, the bit which can only make a difference of 1; for example 16 vs 17 is a change in the least significant bit
147 decimal = 10010001 binary
| | |
| | |--- contributes 1 out of the 147, least significant
| |------- contributes 16 out of the 147, intermediate significance
|---------- contributes 128 out of the 147, most significant
When discussing LSB, the topic is often about steganography or watermarking. In those two very closely related topics, the significance of LSB is that if you need to change a bit of the data, then the LSB is the one that produces the least visual change, and so would be least likely to be noticed by the user.
Have look at
image(uint8(2.^(0:7)));colormap(gray(256))
the left bar has only the LSB set; the second bar has only the second bit set; the third bar has only the third bit set, and so on to the right that has most significant bit set. On the typical display settings that I use, I can clearly make out bar 6, 7, and 8, but I have a difficult time determining the boundary between bar 4 and bar 5, with 1 through 4 completely indistinguishable; even if I turn up to full brightness I have a hard time telling where the boundary between 4 and 5 is. So a change to bar 1, the least significant of them, would be visually invisible to me.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by