Binary Slicing of Digital Images
Isolating specimen details from background noise in low-contrast digital images often benefits from the application of contrast enhancement methods. Binary slicing is a technique that can be utilized to create a high-contrast binary image from a low-contrast grayscale image captured in the microscope. Even in situations where a digital image has adequate contrast, binary slicing is very useful for highlighting individual specimen details.
This interactive tutorial explores grayscale digital image contrast enhancement through the methods of binary segmentation and binary slicing. When the tutorial initializes, a randomly selected specimen image (captured in the microscope) is displayed in the left hand window entitled Specimen Image. Each specimen name includes, in parentheses, an abbreviation designating the contrast mechanism employed in obtaining the image. The following nomenclature is used: (FL), fluorescence; (BF), brightfield; (DF), darkfield; (PC), phase contrast; (DIC), differential interference contrast (Nomarski); (HMC), Hoffman modulation contrast; and (POL), polarized light. Visitors will note that specimens captured using the various techniques available in optical microscopy behave differently during image processing in the tutorial.
Adjacent to the Specimen Image window is the Grayscale Histogram window that contains the gray-level histogram of the original specimen image. To operate the tutorial, select a specimen image from the Choose A Specimen pull-down menu, and then select a threshold level or range using the Threshold Levels sliders. The Display Image radio button collection determines whether the Original, Masked Original, or Binary version of the specimen image is displayed. The Lower threshold slider is activated only when the Masked Original or Binary radio buttons are selected. To enable binary slicing, select the Binary Slicing checkbox, positioned beneath the threshold sliders. Only when binary slicing is enabled will both threshold sliders (Lower and Upper) be activated. The bottom slider controls the lower, and the top slider the upper, gray-level boundary for the binary slicing operation. Selecting the Original radio button from the Display Image collection (the default positon) will produce a display of the original grayscale image in the left-hand window. When the Masked Original radio button is selected, the window title changes to Masked Image and, likewise, when the Binary radio button is selected, the window title changes to Binary Image. Visitors should explore the effects of selecting various threshold and slicing levels on the appearance of the binary and masked images.
A binary image is one whose pixel intensity range consists of only two possible values: on or off (referring to the binary values of one or zero, respectively). In the tutorial, a pixel that is on will be represented by the maximum gray-level intensity of white, and a pixel that is off will display at the minimum gray-level intensity of black.
Binary segmentation involves setting a pixel on or off depending on how it compares to a selected threshold level. In the tutorial, a pixel in the specimen image is turned off if its gray-level intensity is less than the threshold level, and a pixel is turned on if its gray-level intensity is greater than or equal to the threshold level. Single threshold level binary segmentation is often useful for isolating individual features that are surrounded by background detail, but the technique is seldom useful for isolating specific features within a complex specimen.
Binary slicing involves setting a pixel on or off depending on whether or not it lies within a selected threshold range. When binary slicing is enabled in the tutorial, a pixel in the binary image is turned on if it lies inside (or off if it lies outside) of the threshold range defined by the upper and lower threshold levels. A gray-level is considered to lie inside of the threshold range if it is greater than the lower threshold gray-level, and less than the upper threshold gray-level. The gray-level threshold range defined by the upper and lower threshold boundaries is indicated in red as a rectangular spike inside of the Grayscale Histogram window. Because binary slicing allows the isolation of a very small portion of the total gray-level range present in a grayscale image, the technique can often be useful in distinguishing fine details within a specimen, such as internal cellular components.
The result of binary slicing can either be the binary image alone, or the binary image can serve as a mask for the original grayscale image. When the grayscale image is masked with the binary image, each grayscale pixel from the original image will be copied to the masked image and displayed if and only if the corresponding pixel in the binary image is turned on. In the tutorial, selecting the Masked Original item from the Display Image collection will enable binary masking, and the masked image will be displayed in the left-hand window, whose title will then be changed to Masked Image.
Kenneth R. Spring - Scientific Consultant, Lusby, Maryland, 20657.
John C. Russ - Materials Science and Engineering Department, North Carolina State University, Raleigh, North Carolina, 27695.
Matthew J. Parry-Hill, John C. Long, Thomas J. Fellers, Laurence D. Zuckerman, and Michael W. Davidson - National High Magnetic Field Laboratory, 1800 East Paul Dirac Dr., The Florida State University, Tallahassee, Florida, 32310.
BACK TO DIGITAL IMAGE PROCESSING TUTORIALS
Questions or comments? Send us an email.
© 1998-2022 by Michael W. Davidson 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