| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 934 人关注过本帖
标题:求助,怎样用gui显示一个图像?能解释一下这段程序么?谢谢
只看楼主 加入收藏
danender
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-8-28
收藏
 问题点数:0 回复次数:1 
求助,怎样用gui显示一个图像?能解释一下这段程序么?谢谢
set(hObject, 'Units', 'pixels');
handles.banner = imread([matlabroot filesep 'demos' filesep
'banner.jpg']); % Read the image file banner.jpg
info = imfinfo([matlabroot filesep 'demos' filesep
'banner.jpg']); % Determine the size of the image file
position = get(hObject, 'Position');
set(hObject, 'Position', [position(1:2) info.Width + 100
info.Height + 100]);
axes(handles.axes1);
image(handles.banner)
set(handles.axes1, ...
'Visible', 'off', ...
'Units', 'pixels', ...
'Position', [50 50 info.Width info.Height]);
在具体执行的时候应该怎么用呢?能给一个真实的例子么?
搜索更多相关主题的帖子: gui 图像 解释 
2007-08-28 15:55
xiaofu_haha
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-4-22
收藏
得分:0 

I=imread('图象的路径');
axes(handles.axes1);
imread(I);

2007-09-12 15:49
快速回复:求助,怎样用gui显示一个图像?能解释一下这段程序么?谢谢
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014110 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved