Added parts of my developments to the vigra Computer Vision library...

Finally I managed to integrate the first few things, which I developed for my PhD thesis:

1. A local (window based) filter function environment. 
    applywindowfunction.hxx, medianfilter.hxx, specklefilters.hxx
It can be used to apply any given filter function on a complete image. Like convolveImage, this environment also supports correct border handling at the image boundaries. To demonstrate the use, I added a generic median filter and some of the most commonly used filters for speckle removal as well. 

2. A Coherence Enhancing Shock Filter
    shockfilter.hxx
This one was proposed by J. Weickert 2002 in "Coherence-Enhancing Shock Filters". It uses the Structure Tensor, a map and a weighted erosions/dilation function which perfoms "discrete upwinding" according to signums of the computed map. The results are images, that look like from Munch or van Gogh.

3. A correlation environment
    correlation.hxx
This one provides traditional correlation approaches using sliding windows as well as FFT powered fast versions of the cross-correlation as well as the normalized cross-correlation according to J.P. Lewis 1995: "Fast normalized cross correlation".

All of the included components are tested - tests are supplied by means of vigra tests (test/filters and test/correlation). And they are all documented by means of doxygen comments. All callable algorithms provide the new MultiArrayView calling mechanisms as well as the good old image iterators.
How about performance in that case? Independent of the size of the correlation mask, this/my/Lewis et al. approach needs just to prepare the sum tables. This can be performed in O(n) roughly. Afterwards, all the computations are just accesses, which may be performed in about constant time. In case of separable (averaging) convolution, we had corr_width*N + corr_height*N I'm guessing. Although this would be more generic, it would slow down the function...