Error using imread (line 368) ; File "..." does not exist
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi all, I am getting this error , can please any tell what I am doing wrong, as file do exists.
myFolder = 'C:\Users\Ankit Gupta\Desktop\image\'; if ~isdir(myFolder) errorMessage = sprintf('Error: The following folder does not exist:\n%s', myFolder); uiwait(warndlg(errorMessage)); return; end filePattern = fullfile(myFolder, '*.png'); pngfiles = dir(filePattern); >> im1 = imread(pngfiles(1).name) Error using imread (line 368)
댓글 수: 0
채택된 답변
Iman Ansari
2013년 5월 3일
Hi. change your current folder to myFolder:
cd(myFolder)
or use this:
im1 = imread([myFolder pngfiles(1).name])
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!