clc ; close all ; clear ;
import_directory = uigetdir('Locate Folder for Input Images') ;
image_extension = '*.tif' ;
direc = dir([import_directory , filesep , image_extension] ) ;
filenames = {} ;
[filenames{1:numel(direc) , 1}] = deal(direc.name) ;
filenames = sortrows(filenames) ;
num_of_images = length(filenames) ;
pj = uint16(zeros(size(imread([import_directory , filesep , filenames{1}])))) ;
export_directory = uigetdir('Locate Folder for Output Images') ;
tic
for i = 1:num_of_images
name2 = sprintf([export_directory , filesep , 'Background_Subtracted_Output_File_%6.6i.tif'] , i) ;
imwrite(pj , name2) ;
end
t(1) = to
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/658698-background-subtraction-in-images#comment_1154238
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/658698-background-subtraction-in-images#comment_1154238
Sign in to comment.