Woolz Image Processing  Version 1.7.0
WlzCompThresh - Compute a threshold value from a grey-level histogram
WlzCompThresh [-o<out file>] [-d] [-f] [-g] [-s] [-x#] [-h] [<in object>]
-d Use histogram depth method.
-f Use histogram foot method.
-g Use histogram gradient method.
-s Use histogram smooth split method.
-x Extra fraction to add to computed threshold value.
-u Use Otsu's optimal histogram partition method (default).
-o Output object file name.
-h Help - print help message
-v Verbose operation
The input object is read from stdin and values are written to stdout unless the filenames are given.
Computes a threshold value from the given histogram using one of the following methods:
  • WLZ_COMPTHRESH_DEPTH The threshold value is the point on the histogram which is maximally (perpendicularly) distant from the chord joining the histogram peak with the right hand histogram end point.
  • WLZ_COMPTHRESH_FOOT The threshold value is intercept of a line fitted to the upper slope (90% to 33%) to the right of the histogram main peak with the abscissa.
  • WLZ_COMPTHRESH_GRADIENT The threshold value is the first point to the right of the histogram main peak at which the gradient falls to zero.
  • WLZ_COMPTHRESH_SMOOTHSPLIT The threshold value is the found by first finding the minimum of a heavily smoothed histogram and then the closest minimum in successively less smoothed histograms.
  • WLZ_COMPTHRESH_OTSU The threshold value is the found by a clustering-based algorithm which computes an optimum threshold value that separates the two classes of the (assumed) bi-modal histogram.
# Calculate the threshold using the "foot" method.
WlzHistogramObj embryo_2_WM_left.wlz | WlzCompThresh -f
See Also
WlzHistogramObj(1) WlzCompThreshold(3)