Why can't I save this BMP file in an array after converting it?
Ältere Kommentare anzeigen
Hi!
I can't save the attached BMP file in an array after converting it to class double.
[tmp, cmap] = imread('10.bmp');
tmp = ind2gray(tmp, cmap);
gabDouble{i} = im2double(tmp);
Saving images (JPGs) as class double in an array works without any problems.
Would be nice if someone knows what the issue is.
Many thanks!
4 Kommentare
Walter Roberson
am 1 Aug. 2015
Are you observing an error message?
John Kau
am 1 Aug. 2015
Jan
am 1 Aug. 2015
@John Kau: Please post as an answer, that you've solved the problem by restarting the computer and accept it. Of course we believe, that you are convinced, that you have not changed anything. But without any doubt restarting the computer removed the problem, e.g. by saving a changed M-file. So you did change something, even if you are not aware of what it was. Computers are not magic!
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 31 Jul. 2015
0 Stimmen
You did not initialize "i", so it will have its default value as being sqrt(-1), the imaginary unit. You cannot index a cell array at an imaginary unit.
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!