triangle: Triangle Thresholding Algorithm

Description Usage Arguments Details Value Author(s) References Examples

View source: R/triangle.R

Description

The function computes a background theshold of an image using the triangle algorithm.

Usage

1
triangle(image, offset = 0.2, breaks = 256)

Arguments

image

object of class Image from package EBImage.

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

1
2
3
library(EBImage)
x <- readImage(system.file("images", "sample.TIF", package="LFApp"))
triangle(x)

LFApp documentation built on July 28, 2021, 5:09 p.m.