scalar = | isoDataThreshold (inImg,histogram) |
outImg,outThreshold = | isoDataThresholdImg (inImg) |
scalar = | isoDataThresholdImg (inImg,outBinImg) |
outImg,outThreshold = | isoDataThresholdImg (inImg,histogram) |
scalar = | isoDataThresholdImg (inImg,histogram,outBinImg) |
computation of iso data threshold on one image
Ridler and Calvard's method is used to automatically perform the binarization of an input image. It assumes that the image is bi-modal (pixel intensities can be distinguished in 2 classes: background pixels and foreground pixels) and calculate the optimal threshold that separates these 2 classes. The threshold is the equidistant value between the average intensities of both classes:
On output, binarized image values are given by:
with the threshold computed from isodata-based method.
Input and output images must have same size.
Here is an example of automatic isodata image thresholding applied to a 8-bits grey level image (on ouput, computed threshold ) :