필터 지우기
필터 지우기

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.

조회 수: 1 (최근 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.

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 27일
as_numeric = bin2dec(char(YourArray + '0'));
YourImage = reshape(as_numeric, 256, []);
  댓글 수: 9
aditya kumar sahu
aditya kumar sahu 2016년 11월 30일
so,if we use jpeg image some loss of information will be there.is it?but what about png and bmp images.
Walter Roberson
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!

Translated by