Question: Add on to the following code to compute a matrix holding the grayscale images standard deviation at each pixel (i.e., X(i,j) holds the standard deviation

Add on to the following code to compute a matrix holding the grayscale images standard deviation at each pixel (i.e., X(i,j) holds the standard deviation across all the images gray pixel intensities at row i, column j). Please comment your code!

% Matrix initialization setsum1 = zeros(215, 300, 3, 'double'); % Loop through all the image files in one directory and store in the matrix filelist = dir('set1\*.jpg'); for i=1:length(filelist) imname = ['\set1\' filelist(i).name]; nextim = imread(imname); setsum1 = setsum1 + im2double(nextim); end % Compute the average image in color setsum1_rgb = setsum1./length(filelist); % Compute the average image in grayscale setsum1_gray = rgb2gray(setsum1_rgb);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!