Why am I unable to read an image from a DVD drive in MATLAB 6.5.1(R13SP1) and later versions?

1 view (last 30 days)
I attempt to read data into MATLAB from BMP files on a DVD, using code similar to the following:
filename='D:\test.bmp'
I=imread(filename);
where D:\ is my DVD drive.
When I do this, I receive the following error message:
??? Attempt to reference field of non-structure array 'info'.
Error in ==> C:\MATLAB6p5p1\toolbox\matlab\iofun\private\readbmp.m
On line 17 ==> map = info.Colormap; Error in ==> C:\MATLAB6p5p1\toolbox\matlab\iofun\imread.m
If I copy the same file to my hard drive, and then attempt to read it in, it works.
In addition, I can read data from JPEG files on the DVD without any problems.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Our development staff is currently investigating this issue.
Currently to work around this issue, copy the file from the DVD drive to your hard drive and then read the copied file using IMREAD. You can do this programmatically using the MATLAB function COPYFILE as follows :
copyfile(''D:\test.bmp','C:\temp\work\test.bmp');
I=imread('C:\temp\work\test.bmp');

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!