These outlier points are rejected and the remaining data are treated as Gaussian. The calculation is accelerated by saving the intermediate values and . During the rejection phase, rejected values are subtracted from and and the sample number is updated. The algorithm calculates the median of N pixel values. It sorts them in ascending order, and identifies the central value, thereby automatically rejecting the outliers which will be sorted to one end of the list or the other.
All pixel values are within an acceptance range.
The maximum number of iterations was reached. The algorithm is expected to work best with Gaussian or symmetric heavy-tailed distributions with few outlier points which have large , but zero mean. This algorithm calculates the median value after excluding some of the highest and lowest values, and excluding values based on the variance about a trial mean.