View source: R/thresholding_li.R
threshold_li | R Documentation |
The function computes a background theshold of an image by using Li's iterative minimum cross entropy method.
threshold_li(image, tolerance = NULL, initial_guess = NULL, iter_callback = NULL)
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. |
For more details about the method see Li and Lee (1993) as well as Li and Tam (1998).
numeric
vector with the computed threshold.
Filip Paskali Filip.Paskali@gmail.de
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.
library(EBImage)
x <- readImage(system.file("images", "sample.TIF", package="LFApp"))
threshold_li(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.