I'm working on image project using Matlab & I heard about 2D-otsu algorithm as effective segmentation with low SNR and low contrast images, but I can't find enough information about it or how to implement it. I'll be thankful if anyone can help me in such case.
-
$\begingroup$ the 2D otsu which counts the local average gray level as w by w window so the decision is taken by both the max variance between class and the min within class $\endgroup$– hendCommented Aug 22, 2014 at 9:52
-
$\begingroup$ If I understand correctly from your description, it is an algorithm based on Otsu histogram bimodal thresholding method which has been modified to perform locally adaptive thresholding? You can read about locally adaptive thresholding in general (which performs thresholding with sliding windows), and then plug in Otsu there. $\endgroup$– rwongCommented Oct 22, 2014 at 7:59
3 Answers
The Otsu algorithm most responders are referring to, is the 1D algorithm indeed, exactly for the reason mentioned above. The main drawback is that it does not work very well in images with low s/N ratio or low contrast. Also, when you only have a small object with a big background, Otsu will incorrectly select background pixels.
The 2D Otsu provides a solution to this. I don't know the maths involved, but it performs '2D histogram projection', I found it was well documented in: J. Zhang, J. Hu, 2008 International Conference on Computer Science and Software Engineering From what I understand it projects the histograms in such way and then applies some filters to it so that the peaks relating to the 'object' will appear more profound in the resulting histogram, enabling better segmentation.
Both algorithms can be applied in 2D and 3D ( to add some more confusion).
The Otsu's method works on the histogram of the image, and it is implemented by the graythresh function. I don't know what 2D-otsu algorithm is...
Otsu's method sets a threshold on the image such that the intra class variance is minimized. The wikipedia article has a reasonable description and example implementation.
As Dima points out it is implentented by graythresh in matlab, but only if you have the image processing toolbox.
If you want to see Otsu's original article it is here (might be paywalled I didn't check).
It is a bit of a misnomer to call it the 2D-Otsu as the method set the threshold only on the pixel intensity and does not account for position/dimensionality of the image.