Thresholding an image

version 1.3.0.0 (101 KB) by Image Analyst
Interactively threshold an image. Make a binary image.

18.7K Downloads

Updated 4 Mar 2022

View License

This program takes a color or monochrome image and lets the user interactively/manually threshold the monochrome image, or a single color band of a color image, via sliders to set the maximum and minimum thresholds. The thresholded image is a binary image that can be used as a mask image for other images. The pixels in the thresholded range are shown in the middle image as a binary image (black/white), and the original image pixels are shown masked in the left image (gray scale or color). Inputs are the low and high thresholds to start with and the image file name or image matrix. The program returns the threshold values and the last color band that was used to select the threshold. The image can be of type integer (uint8, uint16, etc.) or floating point (single, double).

Cite As

Image Analyst (2022). Thresholding an image (https://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with R2014b to R2021b
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Parametric Mapping Scripts for MRI data

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Thresholding