code to choose an image from a folder

1 vue (au cours des 30 derniers jours)
Shweta Naiskar
Shweta Naiskar le 15 Mar 2017
Commenté : Shweta Naiskar le 15 Mar 2017
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

Réponse acceptée

Chad Greene
Chad Greene le 15 Mar 2017
Try
I = imread(selectedFile);
imshow(I)

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by