how to take image as a user input from folder?

5 次查看(过去 30 天)
hi, i want to take an image from user as an input and selected/input image is saved to another new folder.. how can i do this?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-2-3
You can use uigetfile and copyfile functions
  3 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2014-2-3
编辑:Azzi Abdelmalek 2014-2-3
ext='*.bmp'
folder='C:\Users\Romesha\Desktop\2';
image=uigetfile([folder '\' ext])
old_image=fullfile(folder,image)
copyfile(old_image,['C:\Users\Romesha\images\' image]);

请先登录,再进行评论。

更多回答(2 个)

waseem almuhtaseb
waseem almuhtaseb 2019-2-14
[path,~]=imgetfile();
Im=imread(path);
Im=im2double(Im);

Alex Taylor
Alex Taylor 2014-2-3
Depending on your exact use case, I'd also recommend looking at the imsave and imputfile functions exposed by the Image Processing Toolbox.

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by