What Is Matlab's 'box' Interpolation Kernel
A "box" kernel is an averaging kernel with uniform weights. If it is an interpolation kernel, then it corresponds to nearest neighbor interpolation (it always takes the average of one input sample).
A bit of theory: an interpolating kernel is one that has a value of 1 at the origin, and a value of 0 at integer distances from the origin. In between it can do different things. Thus, to make from "box" an interpolating kernel, we'd make its width somewhere in between infinitesimally thin and just under 2 sample spacings. That makes it fit the definition of an interpolating kernel. However, if it is thinner than 1 sample spacing, it will generate an output of 0 for some displacements -- not desirable. And if it is wider than 1 sample spacing, there will be displacements where the output is the addition of two input samples, twice as large as it should be -- not desirable either. Thus, making it exactly 1 sample spacing wide is the only useful width here. With this width, at any displacement it always covers exactly one input sample -- hence it does linear interpolation.
Does anyone know the equation/algorithm/theorem used by MATLAB's 'box' interpolation kernel in the imresize function? Or (even better) know a numpy equivelant?