Fixed Kuwahara filter: now it works for non-square pictures.