Segment images interactively, and generate MATLAB code

An interactive app and function for segmenting images.
Updated 11 Nov 2020

View License

Interactive UI for segmenting images. Explore different approaches, then export segmentation mask and reproduction code.
Supports all tunable parameters for EDGE detection, THRESHOLDING (including MULTITHRESH/IMQUANTIZE), HOUGH (line and circle detection), regional and extended minima and maxima, and COLOR thresholding.
PLEASE NOTE: From R2014b forward, this is intended as a REPLACEMENT for SegmentTool. This version will not work prior to R2014b, but SegmentTool will not work in R2014b.

Comments, suggestions appreciated!

Cite As

Brett Shoelson (2024). Segment images interactively, and generate MATLAB code (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

Modified the usage of adaptive thresholding.


Fixed shared-workspace issues.


I think I have fixed issues introduced by workspace changes in R2019b. Please notify me if you have any problems. Thanks!

Updated license