Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在做小matlab代码,必须打开一个目录,然后从那里选择图像,选择的图像必须存储在一个变量中我已经使用加载目录
matlab
[mat, dirc] = uigetfile('*.png', 'Select a file');
像这样在matlab中加载图像
我希望“将所选图像保存在变量中”。 请帮我做。
您可以读取图像文件
img = imread( fullfile(dirc, mat) );