normalize {EBImage} | R Documentation

## Intensity values linear scaling

### Description

Linearly scale the intensity values of an image to a specified range.

### Usage

    ## S4 method for signature 'Image'
    normalize(object, separate=TRUE, ft=c(0,1), inputRange)

    ## S4 method for signature 'array'
    normalize(object, separate=TRUE, ft=c(0,1), inputRange)

### Arguments

`object` | an `Image` object or an array
`separate` | if `TRUE`, normalizes each frame separately
`ft` | a numeric vector of 2 values, target minimum and maximum intensity values after normalization
`inputRange` | a numeric vector of 2 values, sets the range of the input intensity values; values exceeding this range are clipped

### Details

`normalize` performs linear interpolation of the intensity values of an image to the specified range `ft`. If `inputRange` is not set the whole dynamic range of the image is used as input. By specifying `inputRange` the input intensity range of the image can be limited to [min, max]. Values exceeding this range are clipped, i.e. intensities lower/higher than `min`/`max` are set to `min`/`max`.

### Value

An `Image` object or an array, containing the transformed version of `object`.

### Author(s)

Oleg Sklyar, osklyar@ebi.ac.uk, 2006-2007 Andrzej Oles, andrzej.oles@embl.de, 2013

### Examples

      x = readImage(system.file('images', 'shapes.png', package='EBImage'))
      x = x[110:512,1:130]
      y = bwlabel(x)
      display(x, title='Original')

      print(range(y))
      y = normalize(y)
      print(range(y))
      display(y, title='Segmented')

[Package EBImage version 4.22.1 Index]