MATLAB Answers

0

How to read images from the folder and select region of interest (rectangular) once

Asked by Shu Yi Ho on 21 Jun 2019
Latest activity Answered by Akshay Malav on 21 Jun 2019
1) read all images from a folder
2) only need to select region of interest once then it will apply to all images

  0 Comments

Sign in to comment.

1 Answer

Answer by Akshay Malav on 21 Jun 2019

1) I am attaching a self explanatory code
% Get list of all jpg files in this directory
imagefiles = dir('*.jpg');
nfiles = length(imagefiles); % Number of files in the folder
for i=1:nfiles
currentfilename = imagefiles(i).name;
currentimage = imread(currentfilename);
images{i} = currentimage;
end
2) Please refer to this documentation Here for selecting a rectangular region of Interest

  0 Comments

Sign in to comment.