You can use the DefaultName argument to specify a start path and a default file name for the dialog box.
filename = uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';... '*.*','All Files' },'mytitle',... 'C:\Work\setpos1.png')
上面是matalb里参考文档里的,一开始我也懒得翻直接百度结果百度不到又去看doc uigetfile ,看完就在这边写出来,给之后用的大家一个方便
[filename,pathname]=uigetfile('*','选择将要消噪的图片','.\source_image');
这是我的代码
filename返回的是文件全名,如’00.jpg’等
pathname