Thread Subject: imread Help

Subject: imread Help

From: tkeil

Date: 11 Jun, 2008 20:11:02

Message: 1 of 3

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

Subject: imread Help

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 11 Jun, 2008 20:33:48

Message: 2 of 3

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

Subject: imread Help

From: Steve Eddins

Date: 11 Jun, 2008 20:33:55

Message: 3 of 3

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.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
colormap tkeil 11 Jun, 2008 16:15:12
imread tkeil 11 Jun, 2008 16:15:12
rssFeed for this Thread

Public Submission Policy

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.

Contact us at files@mathworks.com