autoNormalize: Image normalization with automated histogram adjustment

View source: R/autoNormalize.R

autoNormalizeR Documentation

Image normalization with automated histogram adjustment

Description

Normalize image pixel intensities between 0 and 1

Usage

autoNormalize(
  x,
  inputRange,
  autoRange = T,
  RangeOnly = F,
  separate = T,
  step = 5 * 10^-3
)

Arguments

x

An array, or a 2D/3D matrix

inputRange

The targeted min and max pixel intensities

autoRange

A boolean indicating if inputRange should be calculated automatically

RangeOnly

If set to true, only calculated ranges are returned

separate

Shall image frames normalized separately ?

step

A numeric value, indicating probs from quantile option for inputRange automated calculation

Value

An array, a matrix or an image with values ranged from 0 to 1

Author(s)

Allan Sauvat, allan.sauvat@gustaveroussy.fr

Examples

m = replicate(100, rnorm(1,mean=0,sd=0.5))
m.norm = autoNormalize(m,autoRange=F);m.autoNorm = autoNormalize(m,autoRange=T,step=10**-1)
plot(density(m));points(density(m.norm),type='l',col='red');points(density(m.autoNorm),type='l',col='blue')


kroemerlab/MorphR documentation built on Oct. 9, 2022, 3:19 a.m.