Class ComputeLocalPhansalkarThreshold<T extends RealType<T>>

  • All Implemented Interfaces:
    Computers.Arity4<Iterable<T>,​T,​Double,​Double,​BitType>, Consumers.Arity5<Iterable<T>,​T,​Double,​Double,​BitType>

    public class ComputeLocalPhansalkarThreshold<T extends RealType<T>>
    extends Object
    implements Computers.Arity4<Iterable<T>,​T,​Double,​Double,​BitType>

    This is a modification of Sauvola's thresholding method to deal with low contrast images. In this algorithm the threshold is computed as t = mean*(1+p*exp(-q*mean)+k*((stdev/r)-1)) for an image that is normalized to [0, 1].

    Phansalkar recommends k = 0.25, r = 0.5, p = 2 and q = 10. In the current implementation, the values of p and q are fixed but can be implemented as additional parameters.

    Originally implemented from Phansalkar's paper description by G. Landini.

    Phansalkar N. et al. Adaptive local thresholding for detection of nuclei in diversity stained cytology images. International Conference on Communications and Signal Processing (ICCSP), 2011, 218 - 220. doi:10.1109/ICCSP.2011.5739305

    Author:
    Stefan Helfrich (University of Konstanz)
    Implementation Note:
    op names='threshold.localPhansalkar', priority='-100.'