File Exchange

image thumbnail

Global Threshold computation using Otsu's Method

version (1.65 KB) by Reza Ahmadzadeh
Global Threshold computation using Otsu's Method


Updated 10 Aug 2015

View License

Computes the global image threshold using Otsu's method by minimizing the
inter-class variance.

histogramCounts : is the histogram data of the image, that can be calculated
using `imhist` function.

total: is the total number of pixels that can be counted using the
`numel` function.

ll : is the level of the global threshold in [0 1]


consider the grayscale image is Ig

>> otsu(imhist(Ig),numel(Ig))
>> 04414

Comments and Ratings (2)

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