Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/calculateThreshold.R
Computes the binary image of a grayscale image by using Otsu thresholding
1 | 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
1 2 3 4 5 6 7 8 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.