code to choose an image from a folder

1 visualización (últimos 30 días)
Shweta Naiskar
Shweta Naiskar el 15 de Mzo. de 2017
Comentada: Shweta Naiskar el 15 de Mzo. de 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

Respuesta aceptada

Chad Greene
Chad Greene el 15 de Mzo. de 2017
Try
I = imread(selectedFile);
imshow(I)

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by