Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
read an image to gui matlab

Subject: read an image to gui matlab

From: norfaizayu

Date: 28 Jan, 2012 19:06:09

Message: 1 of 5

i have problem to view the image from the folder choose in gui matlab. my gui function like, when push the push button,we need to select the image from the file then view the image in gui. my problem is how to view the image, i mean in specific place. is it possible i use axes or something else?i don't want using coding imshow because it will show not in specific place. i hope anyone can help me.

thank you.

Subject: read an image to gui matlab

From: lav

Date: 28 Jan, 2012 20:05:10

Message: 2 of 5

"norfaizayu " <ayu_anie85@yahoo.com.my> wrote in message <jg1gv1$kc9$1@newscl01ah.mathworks.com>...
> i have problem to view the image from the folder choose in gui matlab. my gui function like, when push the push button,we need to select the image from the file then view the image in gui. my problem is how to view the image, i mean in specific place. is it possible i use axes or something else?i don't want using coding imshow because it will show not in specific place. i hope anyone can help me.
>
> thank you.

ya. you can use the axes and plot the image in a specific place.
for example.
a=imread('your image.jpg'); // read the image
image(a); // display in the axes.

yesterday only i was working on this, if it doesn't work, get back to me. i can surely help you with this.

Subject: read an image to gui matlab

From: norfaizayu

Date: 29 Jan, 2012 00:57:10

Message: 3 of 5

"lav " <vijay.easwari@gmail.com> wrote in message <jg1kdl$h1$1@newscl01ah.mathworks.com>...
> "norfaizayu " <ayu_anie85@yahoo.com.my> wrote in message <jg1gv1$kc9$1@newscl01ah.mathworks.com>...
> > i have problem to view the image from the folder choose in gui matlab. my gui function like, when push the push button,we need to select the image from the file then view the image in gui. my problem is how to view the image, i mean in specific place. is it possible i use axes or something else?i don't want using coding imshow because it will show not in specific place. i hope anyone can help me.
> >
> > thank you.
>
> ya. you can use the axes and plot the image in a specific place.
> for example.
> a=imread('your image.jpg'); // read the image
> image(a); // display in the axes.
>
> yesterday only i was working on this, if it doesn't work, get back to me. i can surely help you with this.

yes..i know when do that coding it will display in axes but in my situation, i mean that when read the image it can place at specific place that i want like place that i already create to place that image.is it can?

Subject: read an image to gui matlab

From: Sadik

Date: 29 Jan, 2012 01:52:10

Message: 4 of 5

Norfaizayu,

You can place an axes object to your gui. Let's say that the name of this axes object is axes1. Then, you do:

imagesc(myImage,'Parent','handles.axes1');

Best.

Subject: read an image to gui matlab

From: Sadik

Date: 29 Jan, 2012 01:59:10

Message: 5 of 5

Correction: Please remove quotes from the last input. That is,

imagesc(myImage,'Parent',handles.axes1);

Best.

Tags for this Thread

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.

Contact us