I would like to add a cell array of images together using imadd, but imadd only takes two arguments. Is there a reduce function in MATLAB which I could use add all of these images together without writing a for loop?
images = {im1, im2, im3};
sum = reduce(@imadd, images);
You could just use an array with an extra dimension. E.g. for 2-d (grayscale images)
Of course there’s no need to create the cell array in the first place; you could go straight to
or even
which also more generally combines any dimensional matrices.