Path: news.mathworks.com!not-for-mail
From: "Jeroen " <bincky@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: image import struct
Date: Thu, 5 Nov 2009 13:55:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <hculga$ivf$1@fred.mathworks.com>
References: <hcueen$12c$1@fred.mathworks.com> <93efcec9-17cc-48db-82ca-3e3ce9348b9c@a31g2000yqn.googlegroups.com>
Reply-To: "Jeroen " <bincky@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257429322 19439 172.30.248.38 (5 Nov 2009 13:55:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Nov 2009 13:55:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1785667
Xref: news.mathworks.com comp.soft-sys.matlab:582713


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <93efcec9-17cc-48db-82ca-3e3ce9348b9c@a31g2000yqn.googlegroups.com>...
> 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.

Hi!

Thank you. But that isn't what i ment.
For my project I have to compare 2 images. A reference and a imported image.
That import image is not the same image everytime. 
When I import an image by myself with imread there is nothing wrong, it is an unit8 type. But when I import the same image with uiimport it is an struct type. 
What is going wrong? Is the struct type the default value? Is there another way to import images without uiimport? 

thank you.

gr jeroen