필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how do I allow user to choose a folder to run the rest of the functions?

조회 수: 1 (최근 30일)
Shu Yi Ho
Shu Yi Ho 2019년 8월 14일
마감: MATLAB Answer Bot 2021년 8월 20일
%% ACCESS ALL IMAGES IN THE FOLDER
imageFolder = dir('C:\Users\85042513\MATLAB\Projects\BAT CVE\Images\NG\*.jpg');
numfiles = length(imageFolder);
ori_roi = cell(numfiles, 1);
i = 1;
filename = strcat('C:\Users\85042513\MATLAB\Projects\BAT CVE\Images\NG\',imageFolder(i).name);
originalImage = imread(filename);
%% LOOP THROUGH ALL IMAGES IN THE FOLDER & RUN ALL THE 5 FUNCTIONS
for i=1:length(imageFolder)
tic
functionError = 0;
filename = strcat('C:\Users\85042513\MATLAB\Projects\BAT CVE\Images\NG\',imageFolder(i).name);
originalImage = imread(filename);
ori_roi{i} = originalImage( rect(2) : (rect(2)+rect(4)) , rect(1) : (rect(1)+rect(3)) , : );
fprintf("Image name: %s\n",imageFolder(i).name);
...

답변 (1개)

TADA
TADA 2019년 8월 14일
  댓글 수: 4
TADA
TADA 2019년 8월 14일
I want to select a folder instead of the images inside.
What exactly do you intend to do with the folder once it is selected?

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by