Thresholding is a technique for image segmentation where each pixel is classified as either foreground or background based on a threshold value. It can be used for images with light objects and a dark background by selecting a threshold that separates the intensities. More generally, multilevel thresholding can classify pixels into object classes or background based on multiple threshold values. Thresholding views segmentation as a test against a threshold function of pixel location and intensity. Global thresholding uses a single threshold across the image while adaptive thresholding uses local thresholds.