Azzera filtri
Azzera filtri

imshow - Stretching image to fill axis

26 visualizzazioni (ultimi 30 giorni)
Matt
Matt il 13 Gen 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

Risposta accettata

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

Accedi per commentare.

Più risposte (1)

Jurgen
Jurgen il 13 Gen 2013
Have you tried image or imagesc? Or the 'axis image' command?

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by