Skip to content

Instantly share code, notes, and snippets.

@mbrucher
Created Apr 4, 2022
Embed
What would you like to do?
Small script to stack astro photos
# -*- coding: utf-8 -*-
import glob
import sys
import numpy as np
from PIL import Image
def readFiles(images):
loaded = [np.asarray(Image.open(img)) for img in images]
return np.array(loaded)
if __name__ == "__main__":
r = np.max(readFiles(glob.glob(sys.argv[1])), axis=0)
Image.fromarray(r).save("result.jpg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment