在Matlab中使用uigetfile选择特定文件 [英] Selecting Specific file using uigetfile in Matlab

查看:123
本文介绍了在Matlab中使用uigetfile选择特定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行小的matlab代码,必须在其中打开目录,然后从中选择图像,所选图像必须存储在变量中,我已经使用

i am doing small matlab code where have to open a directory and then select image from there , the selected image has to be stored in a variable I i have loaded directory using

  [mat, dirc] = uigetfile('*.png', 'Select a  file');

图像已像这样加载到matlab中

image is loaded loaded in matlab like this

我希望选定的图像保存在变量中".
请帮我做.

i want "selected image to be saved in a variable".
Please help me to do it .

推荐答案

您可以读取图像文件

img = imread( fullfile(dirc, mat) );

这篇关于在Matlab中使用uigetfile选择特定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆