File Exchange

image thumbnail

Average Filter

version 1.6 (6.63 KB) by

Average filter performs image smoothing with integral image method.

7 Downloads

Updated

View License

The advantage of this implementation in comparison to imfilter from Image Processing Toolbox is that the processing time is independent of window size. In practise it means that this implementation of mean filter is faster than imfilter whenever once windows size goes beyond 7 pixels.

Comments and Ratings (3)

sara

sara (view profile)

Jan Motl

Jan Motl (view profile)

Hi Jan,
thank you for your feedback. The biggest gain from the vectorised version is in calculation of the integral image - cumsum accelerated the whole function by 5%. And that is good.

Jan Simon

Jan Simon (view profile)

Although I like FOR loops, here a vectorized approach would be much more efficient, e.g.:
  output = (t(1+m:rows+m, 1+n:columns+n) + t(1:rows, 1:columns) -
           t(1+m:rows+m, 1:columns) - t(1:rows, 1+n:columns+n)) / winNum;

The documentation is very good: H1 line, exhaustive descritpion of inputs and outputs, "See also" line. I only miss a date and the author.
The inputs are check reliably.

Updates

1.6

Allowed reuse of the integral image.

1.5

Added support for even sized kernels.

1.4

Vectorised version.

1.3

Improved the help text. (Thanks Jan!)

1.1

Added padding parameters.

1.2

Fixed copyright owner.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video