how to convert a binary code to image
조회 수: 9 (최근 30일)
이전 댓글 표시
I want to convert binary code like 0 1 1 0 1 0 1 0 1 1
to a binary image. Can it be done? please help?
댓글 수: 0
채택된 답변
Walter Roberson
2015년 6월 16일
편집: Walter Roberson
2015년 6월 16일
b = [0 1 1 0 1 0 1 0 1 1];
image(logical(b));
colormap(gray(2))
댓글 수: 2
Walter Roberson
2015년 6월 18일
Yes.
TheImage = imread('TheFileName.bmp');
ImgBin = im2bw(TheImage, 0.5);
b = ImgBin(1,:);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!