how to convert a binary code to image

10 次查看(过去 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?

采纳的回答

Walter Roberson
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 个评论
Hadiid Anugrah
Hadiid Anugrah 2015-6-18
编辑:Hadiid Anugrah 2015-6-18
Can it be converted back to binary code? I mean the image to binary code?
Walter Roberson
Walter Roberson 2015-6-18
Yes.
TheImage = imread('TheFileName.bmp');
ImgBin = im2bw(TheImage, 0.5);
b = ImgBin(1,:);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by