threshIMG: Apply thresholding on image and save as RDS

View source: R/threshIMG.R

threshIMGR Documentation

Apply thresholding on image and save as RDS

Description

A single threshold is found for each image/z-stack.

Usage

threshIMG(
  imgs,
  method = "Manual",
  cores = 1,
  breaks = 100,
  opt = 0.1,
  thresh = rep(0, length(imgs)),
  BEM.opt = list(start = list(a = -1e+06, b = 0.1, c = 1e+06), control =
    nls.lm.control(maxiter = 1000))
)

Arguments

imgs

The paths of array files; i.e. output from loadIMG or findIMG functions.

method

Either Manual, Otsu, or BEM

cores

Integer. Number of cores to use for parallel computing.

breaks

Integer. Number of breaks for Otsu's threshold. Increase for increased precision

opt

Numeric. Between 0 and 1. Parameter for BEM method. Increase to decrease threshold

thresh

Numeric. Vector of thresholds for manual thresholding, one for each image.

BEM.opt

List. A list of options for model fitting for the BEM method. Passed to the nlsLM function.

Value

Prints thresholds. saves thresholded RDS files and outputs the path for the thresholded images.


Russel88/RCon3D documentation built on Dec. 14, 2022, 11:06 p.m.