farhi / matlab-mastrostack

Ma(e)stroStack: load, align, stack, and identify astrophotography images.
GNU General Public License v2.0
2 stars 0 forks source link

Improve stacking: use sigma rejection #3

Open farhi opened 3 years ago

farhi commented 3 years ago

Rather than a bare sum/mean value, a sigma rejection could be used so that e.g satellite traces are not stacked.

From https://skyandtelescope.org/astronomy-resources/the-abcs-of-ccd-imaging/

Software typically offers several methods to combine subexposures, with sum, average, median, and sigma reject being the most common. Because of some inevitable random signal present in many images (such as cosmic ray artifacts or satellite and airplane trails), the sum and average methods are not my first choice because they include these artifacts in the stacked result, though they produce the highest signal. To deal with these anomalies, you should use a statistical-rejection method. Median combine removes many of these image artifacts, but it produces a grainy result. Most imagers choose a sigma-rejection stacking method, essentially an excellent compromise between average and median combine. Sigma-reject stacking checks to see if a given pixel’s brightness value is relatively similar in a majority of the subexposures, and rejects any pixel value that is beyond the standard deviation of the majority.