threshold_li {LFApp} | R Documentation |
Li Thresholding Algorithm
Description
The function computes a background theshold of an image by using Li's iterative minimum cross entropy method.
Usage
threshold_li(image, tolerance = NULL, initial_guess = NULL, iter_callback = NULL)
Arguments
image |
object of class |
tolerance |
optional tolerance threshold. |
initial_guess |
optional initial value for the minimization. |
iter_callback |
optional function applied to the minimizsation criterion. |
Details
For more details about the method see Li and Lee (1993) as well as Li and Tam (1998).
Value
numeric
vector with the computed threshold.
Author(s)
Filip Paskali Filip.Paskali@gmail.de
References
C.H. Li and C.K. Lee (1993). Minimum cross entropy thresholding. Pattern Recognition 26 (4): 617-25. https://doi.org/10.1016/0031-3203(93)90115-D.
C.H. Li and P.K.S. Tam (1998). An iterative algorithm for minimum cross entropy thresholding. Pattern Recognition Letters 19 (8): 771-76. https://doi.org/10.1016/S0167-8655(98)00057-9.
Examples
library(EBImage)
x <- readImage(system.file("images", "sample.TIF", package="LFApp"))
threshold_li(x)