interactive_threshold: interactive thresholding
Description
Using image_threshold of 'magick' interactively.
threshold is a parameter of image_threshold. See reference manual of 'magick' for detail.
Usage
interactive_threshold(
image,
type = c("black", "white"),
channel = NULL,
resolution = 0.1,
return_param = FALSE,
scale
)
Value
a magick image object or threshold value
Arguments
- image
a magick image object
- type
type of thresholding, either one of lat, black or white
- channel
a value specifying which channel(s) to set
- resolution
resolution of slider
- return_param
If return_param is TRUE, returns threshold value. If return_param is FALSE, returns a magick image object.
- scale
geometry to be passed to image_scale function of magick package. image is scaled just for preview and result image is not scaled if scale is given.
Examples
Run this code# \donttest{
if (interactive())
{
interactive_threshold(wizard)
}
# }
Run the code above in your browser using DataLab