ni: Vectorized Normalize Function for Images

View source: R/ni.R

niR Documentation

Vectorized Normalize Function for Images

Description

Vectorized wrapper for normalize with a default inputRange appropriate for 12-bit images.

Usage

ni(x, ir = c(0, 2^-4), separate = FALSE, ft = c(0, 1))

Arguments

x

An Image object or array or a list of Image objects

ir

A numeric vector or a list of vectors or a single numeric value indicating the bit depth to set the input intensity range. This value is passed to normalize as the inputRange parameter

separate

If TRUE each frame will be normalized independently and ir will be ignored

ft

A numeric vector of 2 values or list of vectors to be the target minimum and maximum intensity values after normalization

Details

See normalize for details. The default here differs from normalize the default value for ir forces the call to use separate = FALSE. The default value sets inputRange to c(0,2^-4), which is appropriate for 12-bit images. This function provides an easier-to-type replacement for normalize while extending it to accept lists of images.

If ir is a numeric value of length 1 between 1 and 16, it is interpreted as the effective bit depth of the input image and the value for ir is given by c(0, 2^-(16-ir). This allows the use of values such as 11.5 to increase the brightness of a 12-bit image.

Value

An Image object or array or a list of such objects containing the transformed object(s).


ornelles/EBImageExtra documentation built on Aug. 10, 2022, 11:44 p.m.