code to choose an image from a folder

조회 수: 1 (최근 30일)
Shweta Naiskar
Shweta Naiskar 2017년 3월 15일
댓글: Shweta Naiskar 2017년 3월 15일
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개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by