Name
CalculateOtsuThreshold — calculates threshold by Otsu method
Calling Sequence
Threshold = CalculateOtsuThreshold(Image);
Parameters
- Image
2D matrix of type uint8, uint16, uint32 or double
- Threshold
result of threshold calculation. The type of Threshold is the
same as the type of Image.
Description
This function calculates the threshold of a numeric image using the
Otsu method.
Examples
RGB = ReadImage('contrib\IPD-5.0\demos\teaset.png');
Image = RGB2Gray(RGB);
Image = uint8(255 * ones(size(Image, 1), size(Image, 2))) - Image;
Threshold = CalculateOtsuThreshold(Image)