how to get LSB in 8-bit grayscale images

조회 수: 3 (최근 30일)
Afsaneh
Afsaneh 2013년 10월 26일
편집: Matt J 2013년 10월 27일
hi, i have one image (8-Bit Gray-scale Image) and i want to omit it's Least_Significant_Bit of it. But i don know how to do it.
  댓글 수: 1
Matt J
Matt J 2013년 10월 27일
편집: Matt J 2013년 10월 27일
You should not completely rewrite your question after it has been answered. It creates much confusion. Best to start a new one...

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2013년 10월 26일
You can use bitset()

추가 답변 (2개)

Matt J
Matt J 2013년 10월 26일
편집: Matt J 2013년 10월 26일
Whatever the problem is, it doesn't originate in the code you've shown. I get no such result
>> img=uint8(randi([0,255],512)); LSBImg =( im2uint8(img) - rem(im2uint8(img), 2)); g= imsubtract(img,LSBImg);
>> whos img LSBImg g
Name Size Bytes Class Attributes
LSBImg 512x512 262144 uint8
g 512x512 262144 uint8
img 512x512 262144 uint8
  댓글 수: 1
Image Analyst
Image Analyst 2013년 10월 27일
편집: Image Analyst 2013년 10월 27일
What code? I didn't see any code - perhaps he edited it away. The code Matt J has look similar to a question I answered in http://www.mathworks.com/matlabcentral/answers/90789#answer_100248 except that I operated on the uint8 image directly and didn't use im2uint8:
% Set LSB = 0
grayImage2 = grayImage - rem(grayImage, 2);

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2013년 10월 27일
Try this:
% Set LSB = 0
grayImage2 = grayImage - rem(grayImage, 2);

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by