i have an array of <65536*8 int8> (all are binary numbers). i want to make the corresponding grayimage having size if 256* 256. how can i do it.
5 次查看(过去 30 天)
显示 更早的评论
i have an array of <65536*8 int8> (all are binary numbers) . i want to make the corresponding grayimage having size if 256* 256. how can i do it. kindly suggest me.
0 个评论
采纳的回答
Walter Roberson
2016-11-27
as_numeric = bin2dec(char(YourArray + '0'));
YourImage = reshape(as_numeric, 256, []);
9 个评论
Walter Roberson
2016-11-30
Yes, writing to JPEG loses information unless you tell imwrite() to use lossless compression. png and bmp do not lose information.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!