How to extract pixel values in 8-bit binary format from an image?
이전 댓글 표시
I want the image with pixel values in 8 bit binary value.
답변 (2개)
Image Analyst
2013년 3월 27일
If you want 8 bit, just cast it to 8 bit:
image8bit = uint8(originalImage);
If you want a string of binary digits, use dec2bin()
binaryString = dec2bin(170)
Result:
binaryString =
10101010
Harshit
2013년 3월 27일
0 개 추천
Once you extract the pixel from image quantize it to (0,256) fixed point representation. Let the pixel be p(i,j) the output should be [p(i,j)/max_image{p(i,j)*256].
댓글 수: 3
Bala
2013년 3월 27일
Divya Khanna
2020년 4월 4일
Why do we divide it in the end?
Image Analyst
2020년 4월 4일
Just ignore this answer. It's not correct.
카테고리
도움말 센터 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!