×
☰ Menu

Non-contextual thresholding

The easiest method of non-contextual segmentation is thresholding. It turns a grayscale or color image into a binary image, which can be thought of as a binary region map, with a single threshold. The binary map contains two possibly disjoint regions, one of them containing pixels with input data values smaller than a threshold and another relating to the input values that are at or above the threshold. The former and latter regions are usually labeled with zero (0) and non-zero (1) labels, respectively. The segmentation depends on the image property being thresholded and on how the threshold is chosen.
In general, non-contextual thresholding can use two or more thresholds and create more than two types of regions. The thresholds are used to separate the ranges of input image signals that belong to each type of region. How to automatically figure out the threshold value is the question of thresholding.

Simple thresholding

The most common image property to threshold is pixel grey level: g(x,y) = 0 if f(x,y) < T and g(x,y) = 1 if f(x,y) ≥ T, where T is the threshold. Using two thresholds, T1 < T2, a range of grey levels related to region 1 can be defined: g(x,y) = 0 if f(x,y) < T1 OR f(x,y) > T2 and g(x,y) = 1 if T1 ≤ f(x,y) ≤ T2.

Adaptive thresholding

The threshold separates the object from the background. The adaptive separation may take into account the empirical probability distributions of pixels that are dark in the object and bright in the background. Such a threshold has to balance out two types of expected errors: giving an object pixel to the background and giving a background pixel to an object. More complicated adaptive thresholding techniques use a threshold that changes in space to account for the effects of the local spatial context (such a spatially varying threshold can be thought of as a background normalization).
A simple iterative adaptation of the threshold is based on successive refinement of the estimated peak positions. It assumes that 
(i) each peak coincides with the mean grey level for all pixels that relate to that peak.
(ii) the pixel probability decreases monotonically on the absolute difference between the pixel and peak values both for an object and background peak. 

Color thresholding

Grayscale images don't have as much information at the pixel level as color images do. This could make color segmentation more accurate. The standard Red-Green-Blue (RGB) color representation has strongly interrelated color components, and a number of other color systems such as HSI Hue-Saturation-Intensity have been designed in order to exclude redundancy, determine actual object/background colors irrespectively of illumination, and obtain a more stable segmentation. An example below shows that color thresholding can focus on an object of interest much better than its greyscale analog.

 

Segmentation of colour images involve a partitioning of the colour space, i.e. RGB or HSI space. One simple approach is based on some reference (or dominant) colour (R0, G0, B0) and thresholding of Cartesian distances to it from every pixel colour f(x,y) = (R(x,y),G(x,y),B(x,y)).