Module org.scijava.ops.image
Class ComputeIsoDataThreshold<T extends RealType<T>>
- java.lang.Object
-
- org.scijava.ops.image.threshold.AbstractComputeThresholdHistogram<T>
-
- org.scijava.ops.image.threshold.isoData.ComputeIsoDataThreshold<T>
-
- All Implemented Interfaces:
BiConsumer<Histogram1d<T>,T>,Computers.Arity1<Histogram1d<T>,T>
public class ComputeIsoDataThreshold<T extends RealType<T>> extends AbstractComputeThresholdHistogram<T>
Implements an IsoData (intermeans) threshold method by Ridler & Calvard.- Author:
- Barry DeZonia, Gabriel Landini
- Implementation Note:
- op names='threshold.isoData', priority='100.'
-
-
Constructor Summary
Constructors Constructor Description ComputeIsoDataThreshold()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longcomputeBin(long[] histogram)Also called intermeans
Iterative procedure based on the isodata algorithm [T.W.longcomputeBin(Histogram1d<T> hist)TODO-
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)
TODO- Specified by:
computeBinin classAbstractComputeThresholdHistogram<T extends RealType<T>>- Parameters:
hist- theHistogram1d- Returns:
- the IsoData threshold value
-
computeBin
public static long computeBin(long[] histogram)
Also called intermeans
Iterative procedure based on the isodata algorithm [T.W. Ridler,
S. Calvard, Picture thresholding using an iterative selection method,
IEEE Trans. System, Man and Cybernetics, SMC-8 (1978) 630-632.]
The procedure divides the image into objects and background by taking
an
initial threshold, then the averages of the pixels at or below the
threshold and pixels above are computed. The averages of those two
values
are computed, the threshold is incremented and the process is
repeated
until the threshold is larger than the composite average. That is,
threshold = (average background + average objects)/2
The code in ImageJ that implements this function is the
getAutoThreshold() method in the ImageProcessor class.
From: Tim Morris (dtm@ap.co.umist.ac.uk)
Subject: Re: Thresholding method?
posted to sci.image.processing on 1996/06/24
The algorithm implemented in NIH Image sets the threshold as that
grey
value, G, for which the average of the averages of the grey values
below and above G is equal to G. It does this by initialising G to
the
lowest sensible value and iterating:
L = the average grey value of pixels with intensities < G
H = the average grey value of pixels with intensities > G
is G = (L + H)/2?
yes => exit
no => increment G and repeat
There is a discrepancy with IJ because of slightly different methods
-
-