Thread Subject: How to load a JPG image ?

Subject: How to load a JPG image ?

From: Claus

Date: 11 Nov, 2008 19:21:02

Message: 1 of 2

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 should 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 question 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 Pack 2)
Java VM Version: Java 1.6.0_04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
-------------------------------------------------------------------------------------
MATLAB Version 7.7 (R2008b)
Simulink Version 7.2 (R2008b)
Financial Toolbox Version 3.5 (R2008b)
Mapping Toolbox Version 2.7.1 (R2008b)
Optimization Toolbox Version 4.1 (R2008b)
SimEvents Version 2.3 (R2008b)
Spreadsheet Link EX Version 3.0.2 (R2008b)
Stateflow Version 7.2 (R2008b)
Statistics Toolbox Version 7.0 (R2008b)

Subject: How to load a JPG image ?

From: Adam Chapman

Date: 11 Nov, 2008 19:27:26

Message: 2 of 2

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,[])

Tags for this Thread

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.

rssFeed for this Thread
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com