Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!a31g2000yqn.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: image import struct
Date: Thu, 5 Nov 2009 05:14:54 -0800 (PST)
Organization: http://groups.google.com
Lines: 32
Message-ID: <93efcec9-17cc-48db-82ca-3e3ce9348b9c@a31g2000yqn.googlegroups.com>
References: <hcueen$12c$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257426894 19624 127.0.0.1 (5 Nov 2009 13:14:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 5 Nov 2009 13:14:54 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a31g2000yqn.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	CyberSafe-IWA-Enable; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; 
	.NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 
	3.5.30729),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:582707


On Nov 5, 6:55 am, "Jeroen " <bin...@gmail.com> wrote:
> Hi!
>
> When i import an image with uiimport matlab gives the error:
> 'MAP must be a m x 3 array.'
>
> But I am sure it is an RGB image. The code that I use is:
> meting = uiimport;
> meting_grayscale = rgb2gray(meting); %naar een grayscale
> meting_double = im2double(meting_grayscale); %naar een index
>
> And when I load an image it says in has the size 1024x1024x3. That is an a m x 3array.
>
> Do i have to convert the import image? Or do I have to change some settings? Or add another codeline? Or is it another the type of image?
>
> Thank you anyway!
>
> gr jeroen

---------------------------------------------------------------------------------------------------------------------
True color RGB images are M x N x 3 and do not have a color map.
Monochrome images are M x N and may or may not have a color map
applied to them.
If they use a color map, they are called "indexed images" by MATLAB
and have a GL x 3 color map array where GL is the number of gray
levels for that data type, for example 256 for uint8 images.
So as you can see, with your color image, it makes no sense for it to
talk about a colormap
Hopefully that explanation will allow you to complete your work.