interactive_threshold: interactive thresholding

View source: R/interactive_threshold.R

interactive_thresholdR Documentation

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
)

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.

Value

a magick image object or threshold value

Author(s)

Shota Ochi

Examples


if (interactive())
{
  interactive_threshold(wizard)
}


magickGUI documentation built on Sept. 11, 2023, 5:06 p.m.