image in GUI matlab axes

i want to insert a picture in axes using GUI. and i want to specify the position in axes any help ?

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de En. de 2016

0 votos

image(handles.TheDestinationAxes, x, y, TheImageArray)

6 comentarios

Hgcvghh Vbbbb
Hgcvghh Vbbbb el 11 de En. de 2016
ImageArray=location of the image ?
Walter Roberson
Walter Roberson el 11 de En. de 2016
TheImageArray is the content of the image, not the location of the image. You would need to have read in the image already. For example,
TheImageArray = imread('YourImageFile.bmp');
Hgcvghh Vbbbb
Hgcvghh Vbbbb el 12 de En. de 2016
isn't work!!
Walter Roberson
Walter Roberson el 12 de En. de 2016
I have done it myself a number of times, except that I personally am more likely to use the alternate syntax
image(TheImageArray, 'XData', x, 'YData', y, 'Parent', handles.TheDestinationAxes)
which is equivalent.
What difficulty are you encountering? Are you getting an error message? Is the image not showing up? Is the image showing up in a place that is different than you are expecting?
Hgcvghh Vbbbb
Hgcvghh Vbbbb el 15 de En. de 2016
Editada: Image Analyst el 15 de En. de 2016
this is the code :
TheImageArray=imread('Array.jpg')
image(handles.axes1, 1, 1, TheImageArray)
the error: Too many input arguments.
Image Analyst
Image Analyst el 15 de En. de 2016
Editada: Image Analyst el 19 de En. de 2016
If you want it at 1,1, then you don't even need that.
TheImageArray=imread('Array.jpg')
image(handles.axes1, TheImageArray)
Or use
imshow(TheImageArray, 'Parent', handles.axes1);

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 11 de En. de 2016

Editada:

el 19 de En. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by