GUI included with selectable threshold value.
Thresholds the grayscale image at the given threshold value.
Alister Fong (2021). Thresholding Grayscale Image (https://www.mathworks.com/matlabcentral/fileexchange/4258-thresholding-grayscale-image), MATLAB Central File Exchange. Retrieved .
Matlab graythresh() works better.
Not bad. Shows original image on left and binarized image on right. Binarized image changes as you interactively set the low and high threshold limits. Button for a popup window with the binary image applied to the original image. Handles color images after you select a color band (which they call "Scale" for some reason) to work with. A little bit clunky and could use several user interface improvements (e.g. there is no way to interactively browse for an image file), but it's a good starting point for you to use to build something like this into your own application.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!