Applies a transformation to the Frames object in a way that the intensities throughout the acquisition are normalized overall in term of pixel values sums. It can be used to compensate for example a global change in the illumination values, e.g. due to changed acquisition conditions in experiments that span long timescales.

normalizeFrames(frames, normFun = "median")

Arguments

frames

A Frames object to normalize

normFun

The normalization function chosen. Can be one of mean or median

Value

A Frames object with normalized pixel values.

Author

Federico Marini, marinif@uni-mainz.de, 2014

Examples

data(MesenteriumSubset)
normalizeFrames(MesenteriumSubset,normFun="median") 
#> Frames 
#>   colorMode    : Color 
#>   storage.mode : double 
#>   dim          : 271 131 3 20 
#>   frames.total : 60 
#>   frames.render: 20 
#> 
#> imageData(object)[1:5,1:6,1,1]
#>           [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
#> [1,] 0.2604547 0.3348703 0.2976625 0.2852599 0.2542534 0.2108443
#> [2,] 0.3720781 0.2976625 0.2852599 0.2480521 0.2232469 0.2170456
#> [3,] 0.3720781 0.3162664 0.2790586 0.2356495 0.2108443 0.2108443
#> [4,] 0.3720781 0.3348703 0.2790586 0.2418508 0.2232469 0.2232469
#> [5,] 0.3658768 0.3286690 0.2728573 0.2232469 0.2046430 0.2232469