Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!v39g2000pro.googlegroups.com!not-for-mail
From: Adam Chapman <adam.chapman@student.manchester.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to load a JPG image ?
Date: Tue, 11 Nov 2008 11:27:26 -0800 (PST)
Organization: http://groups.google.com
Lines: 56
Message-ID: <e5d4825d-1ad6-43c2-a12e-61faa47cf1fc@v39g2000pro.googlegroups.com>
References: <gfcluu$1jt$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 1226431646 24654 127.0.0.1 (11 Nov 2008 19:27:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 11 Nov 2008 19:27:26 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v39g2000pro.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)
Bytes: 3751
Xref: news.mathworks.com comp.soft-sys.matlab:500280


On Nov 11, 7:21=A0pm, "Claus " <il_consigli...@excite.com> wrote:
> I feel silly asking this question, but can't figure out how to load a jpg=
 image from my desktop.
>
> When I enter:
> load 'C:\Documents and Settings\cbecker\Desktop\Tree.jpg'
> a file pops up in the workspace called "Tree". It is empty, however.
>
> If I put the path into Explorer the right image pops up, so the path shou=
ld be correct.
>
> I searched for the image files that come with Matlab, but could not find =
one (e.g. Clown, or Durer) of that name, even if I can "load Durer".
>
> I searched through the help files, but can't find that anyone asked the q=
uestion previously.
>
> It is probably really trivial, but I can't figure it out. Can you help?
>
> Thanks,
>
> Claus
>
> Here is my info:
> Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service P=
ack 2)
> Java VM Version: Java 1.6.0_04 with Sun Microsystems Inc. Java HotSpot(TM=
) Client VM mixed mode
> -------------------------------------------------------------------------=
--=AD----------
> MATLAB =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Version 7.7 =A0 =A0 =A0 =A0(R2008b)
> Simulink =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0Version 7.2 =A0 =A0 =A0 =A0(R2008b)
> Financial Toolbox =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 Version 3.5 =A0 =A0 =A0 =A0(R2008b)
> Mapping Toolbox =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 Version 2.7.1 =A0 =A0 =A0(R2008b)
> Optimization Toolbox =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0Version 4.1 =A0 =A0 =A0 =A0(R2008b)
> SimEvents =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 Version 2.3 =A0 =A0 =A0 =A0(R2008b)
> Spreadsheet Link EX =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 Version 3.0.2 =A0 =A0 =A0(R2008b)
> Stateflow =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 Version 7.2 =A0 =A0 =A0 =A0(R2008b)
> Statistics Toolbox =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0Version 7.0 =A0 =A0 =A0 =A0(R2008b)

Loading an image is a very complicated thing for a computer to do.

Use the dedicatse imread function:

im=3Dimread('C:\Documents and Settings\cbecker\Desktop\Tree.jpg');
imshow(im,[])