Module org.scijava.ops.image
Class ComputeIntermodesThreshold<T extends RealType<T>>
- java.lang.Object
-
- org.scijava.ops.image.threshold.AbstractComputeThresholdHistogram<T>
-
- org.scijava.ops.image.threshold.intermodes.ComputeIntermodesThreshold<T>
-
- All Implemented Interfaces:
BiConsumer<Histogram1d<T>,T>,Computers.Arity1<Histogram1d<T>,T>
public class ComputeIntermodesThreshold<T extends RealType<T>> extends AbstractComputeThresholdHistogram<T>
Implements an intermodes threshold method by Prewitt & Mendelsohn.- Author:
- Barry DeZonia, Gabriel Landini
- Implementation Note:
- op names='threshold.intermodes', priority='100.'
-
-
Constructor Summary
Constructors Constructor Description ComputeIntermodesThreshold()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longcomputeBin(long[] histogram)J.longcomputeBin(Histogram1d<T> hist)-
Methods inherited from class org.scijava.ops.image.threshold.AbstractComputeThresholdHistogram
compute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Methods inherited from interface org.scijava.function.Computers.Arity1
accept
-
-
-
-
Method Detail
-
computeBin
public long computeBin(Histogram1d<T> hist)
- Specified by:
computeBinin classAbstractComputeThresholdHistogram<T extends RealType<T>>- Parameters:
hist- theHistogram1d- Returns:
- the Intermodes threshold
-
computeBin
public static long computeBin(long[] histogram)
J. M. S. Prewitt and M. L. Mendelsohn, "The analysis of cell images,"
in
Annals of the New York Academy of Sciences, vol. 128, pp. 1035-1053,
1966.
ported to ImageJ plugin by G.Landini from Antti Niemisto's Matlab
code
(relicensed BSD 2-12-13)
Original Matlab code Copyright (C) 2004 Antti Niemisto
See http://www.cs.tut.fi/~ant/histthresh/ for an excellent slide
presentation and the original Matlab code.
Assumes a bimodal histogram. The histogram needs is smoothed (using a
running average of size 3, iteratively) until there are only two
local
maxima.
j and k
Threshold t is (j+k)/2.
Images with histograms having extremely unequal peaks or a broad and
??at valley are unsuitable for this method.
-
-