calculateThreshold {FISHalyseR}R Documentation

Compute threshold using Otsu's method

Description

Computes the binary image of a grayscale image by using Otsu thresholding

Usage

calculateThreshold(Image)

Arguments

Image

grayscale image

Details

The function computes a binary image using Otsu's method.

Value

calculateThreshold returns the threshold value

Author(s)

Karesh Arunakirinathan

References

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

See Also

calculateMaxEntropy

Examples

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


[Package FISHalyseR version 1.18.0 Index]