upvote
Almost any astronomy processing software does this for free, because when you stack a whole load of images it rejects outlier pixels (e.g. a trail present on only one image out of hundreds).

It then usually gives you an image of both the combined success, and an image of just those pixels that were rejected. So, this.

reply
An astronomer would presumably not erase the stars.
reply
Why not? Stars are boring, the cool things are galaxies.
reply
Actually, this is pretty common for non-scientific astrophotography! Erase Stars -> Edit background and stars colour, contrast etc separately -> Recombine!
reply