- Astrophotography for Dummies and How to Stack Photos Without Background Noise
- How to Efficiently Stacking Multiple Astrophotographies
- How to Improve a Single Night Photography?
- Chroma Smoothing to Compensate for Chromatic Distortion
Well, not too much background noise at least!
I love photos, and I’m beginning to get into astrophotos as well. One issue I face is how to get long exposures from the sky when you have light noise. I want to see arcs in the sky, but the longer you expose, the brighter the background becomes. The same problem occurs if you are using a polar tracker, you get more light, but also more noise!
So I decided to get a small script together to generate images like this one:

It feels a little bit artificial because the noise is minimal and because there are not that many small stars, but it’s a good start. The script is very easy, it just reads all images from the command line pattern, and then gets the maximum pixel value for all pixels across these images. Saving in “result.jpg”, and this is it!
# -*- 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") |
The script doesn’t try to align images at all, as we want to see the arcs (at least I want to!), so to use this script, you need to capture many images on a tripod and a remote control.
Anyway, easy, there may be other small scripts like this in the future, who knows.