How is the effectiveness metric in Otsu's method (graythresh) calculated?
12 次查看(过去 30 天)
显示 更早的评论
What is the mathematical formula used to evaluate threshold effectiveness metric in graythresh method? What is the best way to use this metric?
0 个评论
回答(2 个)
Image Analyst
2015-5-19
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.
0 个评论
sujal
2025-9-14
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 个评论
Image Analyst
2025-9-14
@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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!