triangle {LFApp} | R Documentation |
Triangle Thresholding Algorithm
Description
The function computes a background theshold of an image using the triangle algorithm.
Usage
triangle(image, offset = 0.2, breaks = 256)
Arguments
image |
object of class |
offset |
numeric, additional offset added to the computed threshold. |
breaks |
integer, number of breaks used in the histogram. |
Details
The Triangle method is based on the histogram of the intensities. Based on the range of intensities and the maximum peak a threshold is determined. The method was proposed in Zack et al. (1977).
Value
numeric
vector with the computed threshold.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de
References
G.W. Zack, W. E. Rogers, and S. A. Latt (1977). Automatic measurement of sister chromatid exchange frequency. The journal of histochemistry and cytochemistry: official journal of the Histochemistry Society 25 (7): 741-53. https://doi.org/10.1177/25.7.70454.
Examples
library(EBImage)
x <- readImage(system.file("images", "sample.TIF", package="LFApp"))
triangle(x)