The background image produced by omdetect is first constructed by using a median-smoothing algorithm
that filters out bright pixels. When the sources have been found, the image is refined by masking-out source
regions and interpolating across them. Since this is one of the slowest parts of omdetect various
refinements have been made to the algorithm to make it run as fast as possible.