insert image in frame or panel?
显示 更早的评论
Hi I am want to create a panel or frame on the MATLAB fig such that when the user selects an image by clicking on the open button the image should open in the space that is alloted by the pre-designed frame/panel.How do I do this?
回答(2 个)
Walter Roberson
2011-4-29
ph = uipanel(....)
pax = axis('Parent',ph);
Then to put the image up,
image(pax, ImageData)
researcher
2011-4-29
4 个评论
Walter Roberson
2011-4-29
Add 'Visible','off' to the axis() call.
Walter Roberson
2011-4-29
Also, you should explicitly parent the imshow() against the axis you want it to show up in.
researcher
2011-4-30
Walter Roberson
2011-4-30
imshow(IMG,'Parent',TheAxisHandleToDrawOn)
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!