Create images with sub-pixel shift I want to test some motion estimation algorithms which compute motion with sub-pixel accuracy. I can create images shifted by the order of pixel (e.g. [2,2]) using MATLAB or OpenCV but I am not clear on how can I shift images with sub-pixel (e.g. [3.57,4.83]) accuracy. Any help regarding this will be much appreciated.
The science of finding values in between those points where you actually have samples is called Interpolation. 

It's a rich field, and every signal processing toolkit (be it Matlab or OpenCV, or …) has functions for it.

Picking the right interpolator has a lot to do with the nature of your input, and the purpose of you doing the interpolation  – so, no general advice can be given on what specific interpolator to use.