Hello, I'm wondering why I always get an empty 0x0 double
returned for the 'map' when I use imread.
I'm using the command:
[Img,map] = imread(ImageFilename);
I have tried different image file types and get the same
thing for my map every time. Does anybody know why I am
getting the empty 0x0 double instead of a colormap rescaled
in the range [0,1] ?
In article <g2pbgm$cik$1@fred.mathworks.com>, tkeil <tlkeil@vradc.com> wrote:
>Hello, I'm wondering why I always get an empty 0x0 double
>returned for the 'map' when I use imread.
>I'm using the command:
>[Img,map] = imread(ImageFilename);
>I have tried different image file types and get the same
>thing for my map every time. Does anybody know why I am
>getting the empty 0x0 double instead of a colormap rescaled
>in the range [0,1] ?
You get an empty map if the image is RGB. Colour maps only apply
to indexed images.
--
"All is vanity." -- Ecclesiastes
tkeil wrote:
> Hello, I'm wondering why I always get an empty 0x0 double
> returned for the 'map' when I use imread.
>
> I'm using the command:
>
> [Img,map] = imread(ImageFilename);
>
>
>
> I have tried different image file types and get the same
> thing for my map every time. Does anybody know why I am
> getting the empty 0x0 double instead of a colormap rescaled
> in the range [0,1] ?
>
> Thanks for any input
If you are getting an empty colormap, then the file does not contain a
colormap. Either the image is stored as gray scale or as truecolor.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.