Microscopy Primer
Light and Color
Microscope Basics
Special Techniques
Digital Imaging
Confocal Microscopy
Live-Cell Imaging
Microscopy Museum
Virtual Microscopy
Web Resources
License Info
Image Use
Custom Photos
Site Info
Contact Us

The Galleries:

Photo Gallery
Silicon Zoo
Chip Shots
DNA Gallery
Amino Acids
Religion Collection
Cocktail Collection
Screen Savers
Win Wallpaper
Mac Wallpaper
Movie Gallery


The most widely used thresholding methods utilize the image histogram. Manual interactive setting of thresholds on the histogram while viewing the image can be used to produce a binary image as shown in the Interactive Thresholding Java tutorial, and most programs offer this capability.

Interactive Java Tutorial
Interactive Thresholding
Discover how to create binary images by thresholding color or monochrome images interactively. 

Manual selection of threshold values makes use of powerful human capabilities for recognition, but also raises problems of reproducibility, and makes automation difficult. It is also hard to communicate to someone else the rationale for selecting a particular value. Consequently, there has been considerable interest in finding algorithms that can select threshold values. Various strategies for setting thresholds automatically have been proposed, with varying degrees of success. No method works well for all images, although finding one that produces good results for a given class of pictures is often possible.

A major area of application has been to discriminate printed text on paper (as a precursor to optical character recognition and the conversion of printed pages to files suitable for word processing). In the Automatic Threshold Level Selection interactive Java tutorial, four representative automatic methods that divide the pixels into two populations are compared:

  1. midpoint (average of the means of the two groups)
  2. statistical (maximizes the statistical difference between the groups based on the t-test)
  3. entropy (maximizes the combined entropy of the groups)
  4. probability (maximizes the probability that the pixels belong to each group)
Interactive Java Tutorial
Automatic Threshold Level Selection
Select a threshold level automatically using one of four algorithms. 

Note that each of these algorithms works on some types of images but not on others, and that they rarely pick a value on the histogram that corresponds to some “obvious” location such as the valley or midpoint between peaks. In fact, many images do not even have histograms with well defined, equal size, symmetrical peaks. Also, remember that many of the processing functions shown above can be applied to images as a precursor to thresholding, for example to sharpen steps or to convert textures to brightness differences.

For color images, thresholds may be applied to each color channel, and this may be done for RGB, LAB, HSI or any other set of color coordinates. In most cases, HSI coordinates correspond best to human interpretations of color. Selecting a target color from a point on an image and then adjusting tolerances to hue, saturation and intensity around that point (as shown in the HSI Slicing interactive Java tutorial) is often a good strategy, and much simpler to understand than trying to set limits on red, green and blue (as shown in the RGB Slicing interactive Java tutorial).

Interactive Java Tutorial
RGB Slicing
Select a threshold level interactively using the red, green, and blue channels of a color image. 

Interactive Java Tutorial
HSI Slicing
Select a threshold level interactively using the hue, saturation, and intensity representation of a color image. 

Another useful thresholding function does not try to select pixels with brightness or color values between limits, but instead draws contour lines that separate brighter from darker pixels as shown in the Contour Lines interactive Java tutorial. Contour lines are always continuous and are directly useful for measurement of structures, as will be seen in the next section. For sections through three-dimensional structures (typical sections examined in the light or electron microscope) the lines between structures represent the boundary surfaces. For surface images (e.g. from an atomic force microscope) the lines represent iso-elevation contours as on a topographic map.

Interactive Java Tutorial
Contour Lines
Create a binary iso-elevation contour image using an interactive threshold level selection. 

Contributing Authors

John C. Russ - Materials Science and Engineering Dept., North Carolina State University, Raleigh, North Carolina, 27695.

Matthew Parry-Hill and Michael W. Davidson - National High Magnetic Field Laboratory, 1800 East Paul Dirac Dr., The Florida State University, Tallahassee, Florida, 32310.



Questions or comments? Send us an email.
© 1998-2009 by Michael W. Davidson, John Russ, Olympus America Inc., and The Florida State University. All Rights Reserved. No images, graphics, scripts, or applets may be reproduced or used in any manner without permission from the copyright holders. Use of this website means you agree to all of the Legal Terms and Conditions set forth by the owners.
This website is maintained by our
Graphics & Web Programming Team
in collaboration with Optical Microscopy at the
National High Magnetic Field Laboratory.
Last modification: Friday, Nov 13, 2015 at 01:19 PM
Access Count Since July 20, 2006: 6393
For more information on microscope manufacturers,
use the buttons below to navigate to their websites: