@@ -0,0 +1,860 @@
+from PIL import Image;%0Afrom os import listdir;%0Aimport numpy;%0A%0Adef stackImages(directory):%0A%09%22%22%22Employ median stacking to combine images and remove noise%0A%0A%09Args:%0A%09%09directory (str): The path to the folder containing your input images%0A%0A%09Returns:%0A%09%09list: A list of tuples containing the image data%0A%09%22%22%22%0A%09images = %5B%5D;%0A%0A%09# For every file inside our working directory...%0A%09for fileName in (listdir(directory + %22%5C%5C%22)):%0A%09%09# Open the image and create an array from it, then append that image array into our image list%0A%09%09img = Image.open(directory + %22%5C%5C%22 + fileName);%0A%09%09images.append(numpy.array(img));%0A%0A%09# Use the built-in median function inside numpy to find the median image, and convert all values to uint8 (0 - 255)%0A%09stacked = numpy.uint8(numpy.median(images, axis = 0));%0A%0A%09# Return the list of tuples so the user can do whatever he/she wants with it%0A%09return stacked;%0A

Create stacker-alt.py