Simple image thresholding

This method first estimates a cutoff, then calculates the distribution of pixels within the cutoff in order to determine the final threshold. I have found this method to work well for fluorescence microscopy images in which most of the pixels are background and the background is approximately gaussian.