normalize | R Documentation |
Linearly scale the intensity values of an image to a specified range.
## 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)
object |
an |
separate |
if |
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 |
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
.
An Image
object or an array, containing the transformed version
of object
.
Oleg Sklyar, osklyar@ebi.ac.uk, 2006-2007 Andrzej Oles, andrzej.oles@embl.de, 2013
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.