Thresholding (image processing)

Thresholding (image processing)

Thresholding is the simplest method of image segmentation. From a grayscale image, thresholding can be used to create binary images .

During the thresholding process, individual pixels in an image are marked as “object” pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as “background” pixels otherwise. This convention is known as "threshold above". Variants include "threshold below", which is opposite of threshold above; "threshold inside", where a pixel is labeled "object" if its value is between two thresholds; and "threshold outside", which is the opposite of threshold inside . Typically, an object pixel is given a value of “1” while a background pixel is given a value of “0.” Finally, a binary image is created by coloring each pixel white or black, depending on a pixel's label.

Thresholding is called adaptive thresholding when a different threshold is used for different regions in the image. This may also be known as "local" or "dynamic" thresholding .

The key parameter in the thresholding process is the choice of the threshold value (or "values", as mentioned earlier). Several different methods for choosing a threshold exist; users can manually choose a threshold value, or a thresholding algorithm can compute a value automatically, which is known as "automatic thresholding" . A simple method would be to choose the mean or median value, the rationale being that if the object pixels are brighter than the background, they should also be brighter than the average. In a noiseless image with uniform background and object values, the mean or median will work well as the threshold, however, this will generally not be the case. A more sophisticated approach might be to create a histogram of the image pixel intensities and use the valley point as the threshold. The histogram approach assumes that there is some average value for the background and object pixels, but that the actual pixel values have some variation around these average values. However, this may be computationally expensive, and image histograms may not have clearly defined valley points, often making the selection of an accurate threshold difficult. One method that is relatively simple, does not require much specific knowledge of the image, and is robust against image noise, is the following iterative method:

#An initial threshold (T) is chosen, this can be done randomly or according to any other method desired.
#The image is segmented into object and background pixels as described above, creating two sets:
##G_1 = {f(m,n):f(m,n)>T} (object pixels)
##G_2 = {f(m,n):f(m,n)leT} (background pixels) (note, f(m,n) is the value of the pixel located in the m^{th} column, n^{th} row)
#The average of each set is computed.
##m_1 = average value of G_1
##m_2 = average value of G_2
#A new threshold is created that is the average of m_1 and m_2
##T’ = (m_1 + m_2)/2
#Go back to step two, now using the new threshold computed in step four, keep repeating until the new threshold matches the one before it (i.e. until convergence has been reached).

This iterative algorithm is a special one-dimensional case of the k-means clustering algorithm, which has been proven to converge at a "local" minimum—meaning that a different initial threshold "may" give a different final result.

Categorizing Thresholding Methods

Sezgin and Sankur (2004) categorize thresholding methods into the following six groups based on the information the algorithm manipulates (Sezgin et al, 2004):

* "histogram shape-based methods, where, for example, the peaks, valleys and curvatures of the smoothed histogram are analyzed
* clustering-based methods, where the gray-level samples are clustered in two parts as background and foreground (object), or alternately are modeled as a mixture of two Gaussians
* entropy-based methods result in algorithms that use the entropy of the foreground and background regions, the cross-entropy between the original and binarized image, etc.
* object attribute-based methods search a measure of similarity between the gray-level and the binarized images, such as fuzzy shape similarity, edge coincidence, etc.
* [...] spatial methods [that] use higher-order probability distribution and/or correlation between pixels
* local methods adapt the threshold value on each pixel to the local image characteristics."

Multiband Thresholding

Colour images can also be thresholded. One approach is to designate a separate threshold for each of the RGB components of the image and then combine them with an AND operation. This reflects the way the camera works and how the data is stored in the computer, but it does not correspond to the way that people recognize colour. Therefore, the HSL and HSV colour models are more often used. An interesting new method uses the CMYK colour model to threshold colour images (Pham et al., 2007).

Citations

* Pham N, Morrison A, Schwock J et al. (2007). Quantitative image analysis of immunohistochemical stains using a CMYK color model. [http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=17326824 "Diagn Pathol." 2:8] .

* Shapiro, Linda G. & Stockman, George C. (2002). "Computer Vision". Prentice Hall. ISBN 0-13-030796-3

* Mehmet Sezgin and Bulent Sankur, Survey over image thresholding techniques and quantitative performance evaluation, Journal of Electronic Imaging 13(1), 146–165 (January 2004). doi|10.1117/1.1631315

References and Further Reading

*Gonzalez, Rafael C. & Woods, Richard E. (2002). Thresholding. In Digital Image Processing, pp. 595–611. Pearson Education. ISBN 81-7808-629-8


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Scilab Image Processing — SIP is a toolbox for processing images in Scilab. SIP is meant to be a free, complete, and useful image toolbox for Scilab. Its goals include tasks such as filtering, blurring, edge detection, thresholding, histogram manipulation, segmentation,… …   Wikipedia

  • Comparison of image processing software — The following table provides a comparison of image processing software. Functionality Matlab*[1] Mathematica[2] imageJ FIJI (software) Population Extract alpha channel No …   Wikipedia

  • Seuillage d'image — Image originale …   Wikipédia en Français

  • Binary image — A binary image is a digital image that has only two possible values for each pixel. cite news |url=http://www.codersource.net/csharp color image to binary.aspx |title=Conversion of a Color Image to a Binary Image |publisher=CoderSource.net… …   Wikipedia

  • Threshold — may refer to:Books and comics* Threshold (novel), a 1985 science fiction novel by David R. Palmer * Threshold (Sara Douglass novel), a 1997 fantasy novel by Sara Douglass * Threshold , a 2001 science fiction novel by Caitlín R. KiernanFilm and… …   Wikipedia

  • Edge detection — is a terminology in image processing and computer vision, particularly in the areas of feature detection and feature extraction, to refer to algorithms which aim at identifying points in a digital image at which the image brightness changes… …   Wikipedia

  • Otsu's method — An example image thresholded using Otsu s algorithm …   Wikipedia

  • Dither — For other uses, see Dither (disambiguation). Provincial definition of to dither from The Rural Economy of Yorkshire: Comprizing the Management of Landed Estates, and the Present Practice of Husbandry in the Agricultural Districts of that County,… …   Wikipedia

  • Canny edge detector — The Canny edge detection operator was developed by John F. Canny in 1986 and uses a multi stage algorithm to detect a wide range of edges in images. Most importantly, Canny also produced a computational theory of edge detection explaining why the …   Wikipedia

  • Wavelet — A wavelet is a mathematical function used to divide a given function or continuous time signal into different frequency components and study each component with a resolution that matches its scale. A wavelet transform is the representation of a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”