How is the effectiveness metric in Otsu's method (graythresh) calculated?

What is the mathematical formula used to evaluate threshold effectiveness metric in graythresh method? What is the best way to use this metric?

Respuestas (2)

Image Analyst
Image Analyst el 19 de Mayo de 2015
I don't know and I wouldn't worry about it. It either works or it doesn't, and in my experience, it usually doesn't. It only seems to work well with images that have a uniform background and a nicely bimodal histogram, which is rarely encountered in the real world except in things like machine vision apps that are looking at parts, like for a robot "pick and place" type of app.
sujal
sujal el 14 de Sept. de 2025
What is the effectiveness metric for the dimes image? Recall from PracticeThresholdingGrayscaleImages Reading, effectiveness metric measures how well the threshold found by Otsu's method was able to segment the pixels into the two groups of foreground (white pixels in the masks above, represented by the logical true) and background (black pixels in the above masks, represented by the logical false).

1 comentario

@sujal, I think he was looking for the exact algorithm, which can be found here: https://en.wikipedia.org/wiki/Otsu's_method
The algorithm exhaustively searches for the threshold that minimizes the intra-class variance, defined as a weighted sum of variances of the two classes. It means that weighted sum of the variances within each class (above and below the threshold) should be at a minimum. Whatever threshold is at that minimum is the threshold to use. More details are in the link I gave above, including MATLAB code for computing it.

Iniciar sesión para comentar.

Productos

Versión

R2015a

Preguntada:

el 19 de Mayo de 2015

Comentada:

el 14 de Sept. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by