imshow - Stretching image to fill axis

24 次查看(过去 30 天)
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

采纳的回答

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

请先登录,再进行评论。

更多回答(1 个)

Jurgen
Jurgen 2013-1-13
Have you tried image or imagesc? Or the 'axis image' command?

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by