what is 2D otsu algorithm and how to implement it
11 次查看(过去 30 天)
显示 更早的评论
I'm a little confusing about what does 2D-Otsu mean? and how to implement it? I didn't find enough information about it in the site. and I hope anyone can help me
0 个评论
采纳的回答
Image Analyst
2014-8-20
It's a thresholding method. It's implemented in the Image Processing Toolbox function graythresh(). In most cases I find it to be sub-optimal. It's best for images with a nice bimodal histogram, like you'd get with a light part/object/region on a uniform background. For anything complicated it's not so great and you'd need to write a custom thresholding algorithm.
6 个评论
Aaron Greenbaum
2017-9-6
I believe that the Otsu method used in Graythresh is the 1d Ostsu method which only accounts for graylevels over the whole image. the 2d Ostsu method looks at the graylevels over the whole image and also the spatial relationship between pixels. I'm not sure if you did say that.
Do you have any advice for creating custom Thresholding algorithms? Maybe you know some good references or examples? I will check out your demos later but I've been having a lot of trouble automatically thresholding an image with a gaussian looking grayscale histogram.
Image Analyst
2021-1-9
I don't know that method. Exactly what spatial relationship does it look at and what does it do with those? So I guess you're saying this is neither a global Otsu threshold over the whole image, nor a spatially adaptive one that computes the threshold based on a scanning 2-D window. But I don't know what other kinds of Otsu there are.
Personally I find Otsu not as useful as triangle thresholding, which I attach code for. This is because often/usually you don't have nice bimodal histograms and usually what I see are skewed unimodal histograms which the triangle threshold is perfect for.
更多回答(2 个)
William Frane
2014-8-20
编辑:William Frane
2014-8-20
Otsu's method (as it's more commonly known) is an image thresholding method used to convert a grayscale image to a binary one. MATLAB's graythresh() function (see this page) is an implementation of Otsu's method. If you're curious about the actual algorithm, it's described in the appropriate Wikipedia article.
Also, just a side note: the MATLAB documentation page for graythresh() that I linked to above was the first result for a Google search of the string matlab otsu algorithm, so don't hesitate to check Google for queries such as this; there's often useful information already available.
1 个评论
Lars Abrahamsson
2021-1-9
But the question was about 2-dimensional Otsu. That is not included in Matlab and has to be written manually, I think.
Meshooo
2014-8-21
编辑:Walter Roberson
2021-1-9
Otsu method is a well-known thresholding method. In other words, it can find the threshold value to convert your image to two levels (bilevels) 0 and 1.
This work was published lone time ago in 1979.
[1] Otsu, N., "A Threshold Selection Method from Gray-Level Histograms," IEEE Transactions on Systems, Man, and Cybernetics, Vol. 9, No. 1, 1979, pp. 62-66.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!