Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

video processing command help

Asked by James on 14 Jul 2011

Can anyone tell me what the following command does?

imgI = double(imread(imgIFile))





No products are associated with this question.

1 Answer

Answer by Jan Simon on 14 Jul 2011
Accepted answer

imglFile : String variable, which contains the name of an image file

imread: Read the image file into a Matlab array

double: convert the array to the double type.

The whole line imports the contents of the image file into a DOUBLE array. "help imread", "help double" would be helpful also.


James on 14 Jul 2011

The double is what I am having difficulty understanding and "help double" does not help explain it either.

Please help

Sean de Wolski on 14 Jul 2011

Your image is probably 8bit unsigned integer - that is, it can be any integer between 0 and 255. So, converting it to double allows it to be any value, up to 16 sigfigs between: 2.2251e-308 and 1.7977e+308

Walter Roberson on 14 Jul 2011

Note: it might perhaps make more sense to use im2double() as that rescales the data as well as changing the data type.

Jan Simon

Contact us