calculateThreshold {FISHalyseR} | R Documentation |
Computes the binary image of a grayscale image by using Otsu thresholding
calculateThreshold(Image)
Image |
grayscale image |
The function computes a binary image using Otsu's method.
calculateThreshold returns the threshold value
Karesh Arunakirinathan
Nobuyuki Otsu: A threshold selection method from grey level histograms. In: IEEE Transactions on Systems, Man, and Cybernetics. New York 9.1979, S.62-66. ISSN 1083-4419
calculateMaxEntropy
f = system.file( "extdata", "SampleFISHgray.jpg", package="FISHalyseR") img = readImage(f) t = calculateThreshold(img) ##Threshold image using the value computed via Otsu's method img[img<t] <- 0 img[img>=t] <- 1