Class ComputeIsoDataThreshold<T extends RealType<T>>

    • Constructor Detail

      • ComputeIsoDataThreshold

        public ComputeIsoDataThreshold()
    • Method Detail

      • 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