normalize: Intensity values linear scaling

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

1
2
3
4
5
## 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

1
2
3
4
5
6
7
8
9
  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')

Example output

[1] 0 7
[1] 0 1

EBImage documentation built on Nov. 8, 2020, 5:41 p.m.