MSmooth-Algorithm
Matrix smoothing is done by shrinking and expanding the matrix. The order of shrink/expand operations depends upon matrix dimensions: