Main Content

Color Thresholder

Threshold color image


The Color Thresholder app lets you segment color images by thresholding the color channels based on different color spaces. Using this app, you can create a binary segmentation mask for a color image.

Color Thresholder supports segmentation in four color spaces. In each color space, the app displays the image, the three color channels, and the color value of all pixels as points in a 3-D color space plot. You can select the colors included in the mask by windowing the color channel values or by drawing an ROI in the image or 3-D color space plot. For an example of using the app, see Segment Image and Create Mask Using Color Thresholder.

Color SpaceColor Channel Thresholding Controls

Three histograms of the red, green, and blue pixel intensities


The circular hue colorwheel and two histograms of the saturation and value intensities


Three histograms of the Y, Cb, and Cr intensities


Three histograms of the L*, a*, and b* intensities

Color Thresholder app

Open the Color Thresholder App

  • MATLAB® Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the Color Thresholder app icon.

  • From the MATLAB command prompt, use the colorThresholder function with a syntax described in Programmatic Use.

Programmatic Use

expand all

colorThresholder opens Color Thresholder, which enables you to create a segmentation mask of a color image based on the exploration of different color spaces.

colorThresholder(im) opens Color Thresholder, loading the image im into the app.

colorThresholder close closes all open instances of Color Thresholder.

Version History

Introduced in R2014a