Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!a26g2000prf.googlegroups.com!not-for-mail
From: Adam Chapman <adam.chapman@student.manchester.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Can nobody help me???
Date: Tue, 11 Nov 2008 07:57:41 -0800 (PST)
Organization: http://groups.google.com
Lines: 33
Message-ID: <3fd61107-a98a-4e9f-a129-c8fa0feba6c4@a26g2000prf.googlegroups.com>
References: <gfc8tj$4mb$1@aioe.org> <gfc9ou$33r$1@fred.mathworks.com>
NNTP-Posting-Host: 84.68.8.220
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1226419062 17364 127.0.0.1 (11 Nov 2008 15:57:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 11 Nov 2008 15:57:42 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a26g2000prf.googlegroups.com; posting-host=84.68.8.220; 
	posting-account=QATl1QoAAADZYVAWORqO_aubcdzudO6s
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; 
	.NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; InfoPath.2; .NET 
	CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:500244


On Nov 11, 3:53=A0pm, "David" <d...@bigcompany.com> wrote:
> Vicky <bonsa...@gmx.de> wrote in message <gfc8tj$4m...@aioe.org>...
> > Hallo there,
>
> > this is my code:
>
> > image1 =3D imread('image1.bmp');
> > image1 =3D im2bw(image1);
> > M =3D bwlabel(image1, 8);
> > imwrite(M, 'myImage.bmp');
>
> > How can I save an image (bmp), so that in each pixel is the element of
> > the matrice M?
>
> > If I save the matrice M with the command "imwrite" in each pixel of the
> > myImage.bmp is an rgb-value. But I don't want a rgb-value, I want the
> > label (element) of the matrice M.
>
> > How can I realize it?
>
> > Please I need help!!!
>
> > Best regards,
> > Vicky
>
> well, a bmp file is normally a simple rgb format. =A0read the help for im=
write and see if one of the other formats may be better for what you want. =
=A0or you may just want to save M to something else, like a mat file instea=
d of as an image.- Hide quoted text -
>
> - Show quoted text -

Use the "save" command, and save the variable M in a .mat file