Domanda

i have a code which gives several images as ouput and i want to set all these images in particular axes in GUI in matlab. I'm trying to make a GUI of the code. For eg.

figure,imshow(s1);
figure,imshow(s2);
figure,imshow(s2&s1);

and i want to set the output image of first command in, say axes3, output image of second command in axes4 and similarly last output image in axes5.

Although i know i need to use

set(handles.axes...)

command but i don't know the exact syntax on how to make the image be shown in particular axes. Please give explain on how to make this happen with any suitable example. Thanks in advance.

È stato utile?

Soluzione

One line solution (for each image) is to set the axis as the parent of the image within the imshow command;

imshow(image_Data,'Parent',handles.axes1)

There should be no need to open the additional figure windows ( assuming the axes are with the gui...)

So specifically for the question above:

imshow(s1,'Parent',handles.axes3);
imshow(s2,'Parent',handles.axes4);
imshow(s2&s1,'Parent',handles.axes5);

Altri suggerimenti

First you should create an axes box in your gui, then in tag section get a name i.e. (original) and finaly in editor when you want to use it code something like this

 A = imread (Path);

 axes(handles.original);

 imshow(A);

I hope to help you...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top