필터 지우기
필터 지우기

application compiler - change search path

조회 수: 5 (최근 30일)
Marcin Kowalski
Marcin Kowalski 2020년 9월 6일
댓글: Marcin Kowalski 2020년 9월 7일
Hi all,
I would like to compile an exe application from a script for processing images. What I want to do is to run the app which will process all the images stored in specified or current directory.
I use 'dir' to obtain the list of all tiff files in a current directory and I am processing images one by one in a loop.
I know that changing search path is not allowed with applicationCompiler, so I tried to search the current folder, but I still get the same error that changing path is not possible. Is there a way to cope with that issue?
regards,
Marcin

채택된 답변

Walter Roberson
Walter Roberson 2020년 9월 6일
filedir = uigetdir('Choose a directory');
dinfo = dir(fullfile(filedir, '*.png'));
filenames = fullfile(filedir, {dinfo.name});
numfiles = length(filenames);
images = cell(numfiles,1);
for K = 1 : numfiles
thisfile = filenames{K};
images{K} = imread(thisfile);
end
  댓글 수: 1
Marcin Kowalski
Marcin Kowalski 2020년 9월 7일
Hi Walter,
Thank you for answer. My code looked very similar with this exception that I added 'addpath'. And this seems to be an issue. Thank you for help!
regards,
Marcin

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by