Gradient-based edge preserving interpolation and its application to super-resolution