Fast Algorithm for Local Statistics Calculation for N-Dimensional Images L ocal mean and variance measures are frequently required in multi-dimensional image analysis. These measures are needed when calculating correlation coefficients for local image matching purposes. Other measures such as skewness and autocorrelation are useful for texture analysis. This paper presents a fast algorithm for calculating these local statistics in a window of an N-dimensional image. The new algorithm, which is called the plunger method, recursively reduces the dimensions of the input N-dimensional image to achieve fast computation. The speed of the algorithm is independent of the window size. Another advantage of the algorithm is that it calculates the local statistics in one pass. Real image tests have been performed. # 2001 Academic Press Changming Sun CSIRO Mathematical and Information Sciences, Locked Bag 17, North Ryde, NSW 1670, Australia E-mail: changming.sun@cmis.csiro.au Introduction Local mean estimator provides one of the methods for smoothing an image and is often useful as a general- purpose smoothing algorithm when the exact form of the smoothing point-spread function is not important and when the computational speed is an issue. This application applies a square or rectangular box filter to a one- or two-dimensional image for smoothing purposes. Each output pixel is the mean of the input pixels within the filter box. Local variance calculation in an image is also important. Apart from the application of mean and variance filtering of an image, the obtained local mean and variance can be used for fast calculation of cross correlation or sum of squared differences between two images for image matching or registration purpose. Local skewness and autocorrelation measures can be used for image texture analysis [1, Ch. 9]. McDonnell [2] described several box-filtering proce- dures for 2D images. The main advantage of box filtering is its speed, which approaches four operations for each output pixel and is independent of box size. Sun [3–5] extends the idea of box filtering for fast calculation of normalized cross correlations for 2D images for the purpose of stereo matching and image motion estima- tion. Luciano da Fontoura Costa describes a numerical approach to the expedite calculation of vector fields in two-dimensional spaces and how it has allowed the effective application of Gauss’ law in image analysis and computer vision [6]. 3D images, especially in the medical area such as MRI, CT, PET, and ultrasound, are becoming more readily available. We might also like to treat a sequence of 2D images as a 3D image volume for spatiotemporal analysis [7]. Other types of 3D data include seismic data 1077-2014/01/060519+09 $35.00/0 # 2001 Academic Press Real-Time Imaging 7, 519–527 (2001) doi:10.1006/rtim.2001.0265, available online at http://www.idealibrary.com on