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.