Module org.scijava.ops.image
Class ComputeLocalPhansalkarThreshold<T extends RealType<T>>
- java.lang.Object
-
- org.scijava.ops.image.threshold.localPhansalkar.ComputeLocalPhansalkarThreshold<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.'
-
-
Constructor Summary
Constructors Constructor Description ComputeLocalPhansalkarThreshold()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompute(Iterable<T> inputNeighborhood, T inputCenterPixel, Double k, Double r, BitType output)TODO-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.function.Computers.Arity4
accept
-
Methods inherited from interface org.scijava.function.Consumers.Arity5
andThen
-
-
-
-
Field Detail
-
DEFAULT_K
public static final double DEFAULT_K
- See Also:
- Constant Field Values
-
DEFAULT_R
public static final double DEFAULT_R
- See Also:
- Constant Field Values
-
-