image thumbnail

Gray image thresholding using the Triangle Method

version 1.1.0.0 (2.8 KB) by Bernard Panneton
Computes a threshold the Triangle method.

5K Downloads

Updated 12 Jul 2010

View License

The Triangle method is due to Zack (Zack GW, Rogers WE, Latt SA (1977), "Automatic measurement of sister chromatid exchange frequency", J. Histochem. Cytochem. 25 (7): 741–53.

A line is constructed between the maximum of the histogram at b on the gray level axis and the lowest (or highest depending on context) value a on the gray level axis where the histogram is significantly larger than 0. The distance L normal to the line and between the line and the histogram is computed for all values from a to b. The level where the distance between the histogram and the line is maximal is the threshold value (level). This technique is particularly effective when the object pixels produce a weak peak in the histogram.

Cite As

Bernard Panneton (2021). Gray image thresholding using the Triangle Method (https://www.mathworks.com/matlabcentral/fileexchange/28047-gray-image-thresholding-using-the-triangle-method), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
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!