Image display in GUI

1 次查看(过去 30 天)
Khawaja Asim
Khawaja Asim 2012-5-26
I am 1st time making GUI in matlab... I need to display images. For this I have been using axes.. But image shown in axes is very small and it cannot reveal minor details... I want to display this image in a separate window, so that image can bee seen on full screen, (Like image shown by command figure,imshow(image))... And every time I press button, new image should replace the previous image, rather than opening in new window... Please show me ways of doing this..

采纳的回答

Image Analyst
Image Analyst 2012-5-26
You can set the 'InitialMagnification' property in imshow() to set an initial zoom level. Then you can call zoom() to adjust it further. I've posted code about zooming images either here or in the newsgroup. Search for "sldZoom" and see if you can find it.
  2 个评论
Khawaja Asim
Khawaja Asim 2012-5-26
actually i dont want to zoom image.. I just want to display it in new window as per requirement of the demonstration for which i am preparing
Image Analyst
Image Analyst 2012-5-26
Call the figure() command, but you'll still have to magnify the window somehow if you want to see that small minor details that you cannot see now.

请先登录,再进行评论。

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-5-26
newfig = figure();
newaxes = axes('Parent', newfig);
And to display or update the image,
image(YourArray, 'Parent', newaxes);
  3 个评论
Walter Roberson
Walter Roberson 2012-5-26
I didn't say handles.axes2(), I said axes() . axes() creates a new axes. You need a new axes to go in the new figure.
Image Analyst
Image Analyst 2012-5-26
"axes()" is the name of a special built-in function. It did not mean for you to substitute the actual name of your axes for it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by