I read the following in the documentation of im2double
Class Support:
Intensity and truecolor images can be uint8, uint16, double, logical, single**, or int16. Indexed images can be uint8, uint16, double or logical. Binary input images must be logical. The output image is double
I am working on a 64 bit machine (i.e. MATLAB uses 8 bytes to represent variables of type double). I have an indexed image of type uint32 and I believe I should be able to convert it to type double, but im2double
doesn't seem to support it, i.e. I get the following error:
Error using im2double Expected input number 1, Image, to be one of these types:
double, logical, uint8, uint16, int16, single
Instead its type was uint32.
So, how can I convert a matrix (an indexed image) of type uint32
to double
?
This is all on MATLAB 2012a
According to this page (some info here as well):
therefore MATLAB does not support indexed images of class uint32. I guess you'll have to do some sort of color quantization.