Borrar filtros
Borrar filtros

imshow - Stretching image to fill axis

26 visualizaciones (últimos 30 días)
Matt
Matt el 13 de En. de 2013
I'm trying to display an image on an axis within a GUI. I'm using the imshow function, but it keeps the dimension ratio of the image. I would like to stretch the image, ignoring the dimension ratio, to fill the axis. Any suggestions?
Thanks, Matt

Respuesta aceptada

Image Analyst
Image Analyst el 13 de En. de 2013
Editada: Image Analyst el 14 de En. de 2013
You can display with imshow() and use the 'XData' and 'YData' property. For example:
imshow(grayImage, [], 'XData', [0 .5], 'YData', [0 .1]);
  2 comentarios
Walter Roberson
Walter Roberson el 14 de En. de 2013
You can pass in coordinates to image() and imagesc()
Matt
Matt el 14 de En. de 2013
Xdata and Ydata worked great, thanks!

Iniciar sesión para comentar.

Más respuestas (1)

Jurgen
Jurgen el 13 de En. de 2013
Have you tried image or imagesc? Or the 'axis image' command?

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by