thresh2: Adaptive Threshold with a Moving Disc Window

View source: R/thresh2.R

thresh2R Documentation

Adaptive Threshold with a Moving Disc Window

Description

Threshold an image using a disc rather than rectangle.

Usage

thresh2(x, width, offset, boundary = c("replicate", "circular"))

Arguments

x

Image object or array.

width

Half-width of the moving disc window.

offset

Thresholding value from the averaged value.

boundary

Behavior at image border, where default is to extend the image beyond the borders, which differs from the default for filter2.

Details

This function returns the binary image generated by a local thresholding algorithm using a moving disc.

Examples


  x <- readImage(system.file("extdata", "by_stack/file001.tif", package = "virustiter"))
  xb <- normalize(gblur(x[,,c(1,3)], 2))
  xt <- thresh2(xb, width = 12, offset = 0.05)
  plot(combine(xb, xt), all = TRUE)


ornelles/virustiter documentation built on March 15, 2024, 9:28 a.m.