code to choose an image from a folder

3 次查看(过去 30 天)
hello i tried the following code
path = 'c:\users\userName\my documents\matlab';
filter = '*.bmp';
selectedFile = uigetfile(fullfile(path , filter));
imshow(selectedFile)
iam not able to display the image. please help.
thank you

采纳的回答

Chad Greene
Chad Greene 2017-3-15
Try
I = imread(selectedFile);
imshow(I)

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by