How to imread this binary image this way?

10 ビュー (過去 30 日間)
Veronika
Veronika 2017 年 4 月 6 日
回答済み: Jan 2017 年 4 月 6 日
Dear all,
I would like to read and show my binary imagy this way:
fprintf(1,'loading binary image...\n');
for i=1:256
okoli(:,:,i)=imread('binaryImage_okoli.mat',i);
end
and I have this error:
Error using imread (line 362)
Unable to determine the file format.
Error in model (line 117)
okoli(:,:,i)=imread('binaryImage_okoli.mat',i);
If I tried image format .tif it works correctly. So I wanted to know, how I should change this code for binary image in format .mat.
Thank you for your answers.
  1 件のコメント
KSSV
KSSV 2017 年 4 月 6 日
編集済み: KSSV 2017 年 4 月 6 日
Why don't you read with extension .tif then?

サインインしてコメントする。

採用された回答

Jan
Jan 2017 年 4 月 6 日
How did you store the image in MAT format? By save? Then simply load it:
Data = load('binaryImage_okoli.mat');
Now I guess the image is in Data.okoli, but you can find the out by: disp(data)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCode Generation, GPU, and Third-Party Support についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by