how to convert a binary code to image

9 ビュー (過去 30 日間)
Hadiid Anugrah
Hadiid Anugrah 2015 年 6 月 16 日
コメント済み: Walter Roberson 2015 年 6 月 18 日
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 Center および File ExchangeConvert Image Type についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by