A smooth density model is derived for the data with logspline
. Based on the density peaks and valleys are detected and the final threshold is defined as the valley (if available) with the highest x
value.
1 | threshold_valleys(x, x_eval = 101, ...)
|
x |
vector of (pixel) gray levels to be thresholded |
x_eval |
... |
... |
arguemnts passed to peaks_and_valleys |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.