Skip to content

Commit

Permalink
Fixed imageSet deprecation in MATLAB R2024b.
Browse files Browse the repository at this point in the history
  • Loading branch information
preethamam committed Nov 15, 2024
1 parent ff83ede commit b1f9e9f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MATLAB/Procedural Program/Inputs.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

%% Inputs 3
% Warping
input.warpType = 'planar'; % 'spherical' | 'cylindrical' | 'planar' (projective)
input.warpType = 'spherical'; % 'spherical' | 'cylindrical' | 'planar' (projective)

% Focal length
input.fx = 2000; % focal length of camera in pixels
Expand Down
16 changes: 10 additions & 6 deletions MATLAB/Procedural Program/Main_AutoPanoStitch.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,25 @@
%--------------------------------------------------------------------------
% Image sets
%--------------------------------------------------------------------------
imgSetVector = imageSet(fullfile(folderPath,folderName),'recursive');
datasetName = cat(1,{imgSetVector.Description})';
foldersLen = length(imgSetVector);
imgFolders = dir(fullfile(folderPath,folderName));
imgFolders = imgFolders([imgFolders(:).isdir]);
imgFolders = imgFolders(~ismember({imgFolders(:).name},{'.','..'}));

% Dataset name and folders length
datasetName = {imgFolders.name}';
foldersLen = length(datasetName);

%% Panorama stitcher
%--------------------------------------------------------------------------
% Stitches panoramas
%--------------------------------------------------------------------------
for myImg = 62 %1:foldersLen
for myImg = 65 %1:foldersLen
stitchStart = tic;
fprintf('Image number: %i | Current folder: %s\n', myImg, imgSetVector(myImg).Description);
fprintf('Image number: %i | Current folder: %s\n', myImg, imgFolders(myImg).name);

%% Load images
loadimagestic = tic;
[keypoints, allDescriptors, images, numImg] = loadImages(input, imgSetVector, myImg);
[keypoints, allDescriptors, images, numImg] = loadImages(input, imgFolders, myImg);
fprintf('Loading images (+ features): %f seconds\n', toc(loadimagestic));

%% Get feature matrices and keypoints
Expand Down
2 changes: 1 addition & 1 deletion MATLAB/Procedural Program/loadImages.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%************************************************************************%

% Read images
imgFolder = fileparts(imgSetVector(myImg).ImageLocation(1));
imgFolder = fullfile(imgSetVector(myImg).folder, imgSetVector(myImg).name);
imds = imageDatastore(imgFolder);
imageFiles = readall(imds);

Expand Down

0 comments on commit b1f9e9f

Please sign in to comment.