how to insert image to gui?

15 visualizaciones (últimos 30 días)
sandy
sandy el 22 de Mayo de 2014
Comentada: Walter Roberson el 19 de En. de 2025
i want to insert image to gui.i created axes and tried to insert.imaged is loaded,but error is ,imaged not loading inside the axes og gui o/p.it opening as separate image window.help needed

Respuestas (2)

Romain
Romain el 22 de Mayo de 2014
Editada: Romain el 22 de Mayo de 2014
You can use the function 'axes' to select the axe for your image :
axes(axisHandle)
matlabImage = imread('image.png');
image(matlabImage)
axis off
axis image
if you are using GUIDE, add this code in the OpeningFcn
  7 comentarios
Romain
Romain el 22 de Mayo de 2014
Nothing in particular. For Example, I have create a new project in GUIDE : an 'GUI with Axes and Menu' and just add this line in the test_OpeningFcn:
axes(handles.axes1)
matlabImage = imread('C:\UsersDocuments\image.jpg');
image(matlabImage)
axis off
axis image
And it's working perfectly.
sandy
sandy el 22 de Mayo de 2014
Editada: sandy el 22 de Mayo de 2014
thanks romain ....i try again with new file. also i have clarification how to rotate a image.thing is .i need to rotate a steering of a car in gui,so i am going for rotating a steering image file.can you help with this.. http://www.mathworks.com/matlabcentral/answers/130637-how-to-rotate-a-image-in-gui

Iniciar sesión para comentar.


erick rafael
erick rafael el 19 de En. de 2025
Editada: erick rafael el 19 de En. de 2025
My problem is persisting, i dont not continue, help me please.
  1 comentario
Walter Roberson
Walter Roberson el 19 de En. de 2025
It is not clear what you were doing that triggered this message?
That message looks a bit like you might get when attempting to attach an icon to a compiled application.

Iniciar sesión para comentar.

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by