Simple Image Thresholding

Simple method to calculate the threshold of an image


Updated 20 Nov 2013

View License

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 quite well for fluorescence microscopy images in which most of the pixels are background and the background is approximately gaussian.

There are a couple parameters than can be used to tune the threshold.

Cite As

Jake Hughey (2023). Simple Image Thresholding (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Ridler-Calvard image thresholding

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Slight refinement to only use pixels below the cutoff for calculating the threshold.

Updated the description.

Fixed bug caused by mode not accepting integers.