How to extract pixel values in 8-bit binary format from an image?
显示 更早的评论
回答(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!