# Comparison Between Average Kernel (Box Kernel) and Gaussian Kernel

In image processing, we have two kinds of major kernels that are average kernel and Gaussian kernel. For image segmentation, which is difference between average kernel and Gaussian kernel? I found some paper said that they are similar, and average kernel implement faster than Gaussian kernel, right?When we use average kernel

If you pre calculate the filter coefficients the complexity of the convolution is set by its radius only.

Yet, if all coefficients are the same, it could be reduced into summation and one normalization multiplication.

Yet, I don't think it will have major effect on modern CPU's.
Certainly not on those who supports fused multiply and addition.

• Except that for an average filter the coefficient for each input point is 1, so you only have one multiplication. – Paul R Aug 1 '14 at 7:10
• You're right. I will mention this. – Royi Aug 1 '14 at 7:18
• I read that average kernel similar gaussian kernel but it take larger error than gaussian kernel. So, when we use average kernel? – John Aug 1 '14 at 8:20
• What can be done is to approximate the Gaussian Blur by "Box Blur" (Average Blur). See my answer here: stackoverflow.com/questions/23489902/… – Royi Aug 1 '14 at 8:31
• Another optimisation with the average filter is that you can maintain column sums as you iterate, so for each new point you just calculate one new column sum. This means that an NxN average filter can be implemented with just 2N-2 adds rather than N^2-1 adds. – Paul R Aug 1 '14 at 8:41

Average Filter (Box Blur) can be approximated using Integral Images / Running Sums.
In those efficient methods their complexity depends on the size of the image only and not the radius of the filter.

Gaussian Blur is often approximated by repetitive Box Blur (Hence, in this method, is slower) hence also has ability to be approximated by operation with complexity of the size of the image only.