code to choose an image from a folder

1 Ansicht (letzte 30 Tage)
Shweta Naiskar
Shweta Naiskar am 15 Mär. 2017
Kommentiert: Shweta Naiskar am 15 Mär. 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

Akzeptierte Antwort

Chad Greene
Chad Greene am 15 Mär. 2017
Try
I = imread(selectedFile);
imshow(I)

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by