The following Matlab project contains the source code and Matlab examples used for mono and bidimensional box car convolution. fast..
It uses the recursion hence, it is much faster as the windows get large. Call it two times for triangular window convolution.
tic;y1 = conv2(x,ones(10,40),'same');toc
tic;y2 = boxconv(x,10,40);toc