Moving-window mean and variance

Efficient computation of moving-window mean and moving-window variance

Vous suivez désormais cette soumission

This function computes the moving-window mean (also know as moving average) and moving-window variance of a sequence of one-dimensional or two-dimensional data frames (e.g. a sequence of images). For two-dimensional data, the moving-window mean and variance are computed per individual entry (e.g. per pixel).
The expressions were derived using the approach of [Welford, 1962], who provides expressions for the running mean and running variance.
The running mean and variance are calculated during start-up (i.e. while the window is not yet full).
References:
Welford, BP, "Note on a method for calculating corrected sums of squares and products." Technometrics, 4(3), pp.419-420, 1962.
NOTE: In the present implementation a moving history is maintained (similar to a shift register). This might still represent quite a computational burden. If memory size permits, one could maintain a longer history that is shifted only when full. This will be implemented in a future release.

Citation pour cette source

Dennis (2026). Moving-window mean and variance (https://fr.mathworks.com/matlabcentral/fileexchange/47061-moving-window-mean-and-variance), MATLAB Central File Exchange. Extrait(e) le .

Remerciements

A inspiré : scatstat2 2D local statistics

Catégories

En savoir plus sur Mathematics and Optimization dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.2.0.0

Added a note to the file description

1.1.0.0

changed title

1.0.0.0