Various photometry packages use the modal value for the background value, but most compute it from the empirical relationship between the mean, median, and mode, which appears to hold for unimodal curves of moderate asymmetry and is given by mean-mode approx 3(mean-median). Bickel, D.R. 2002 ("Robust estimators of the mode and skewness of continuous data", Bickel, D.R., 2002, Computational Statistics and Data analysis Volume 39, Issue 2, pages 153-163) has presented a simple and robust algorithm to compute the mode. Our background-mode algorithm is based on his algorithm with a minor modification for low pixel values.
It can give a good estimate of the background value in crowded fiels (ie even if up to 75 percent of the pixels used are contaminated by sources).