function [px, py] = mvGen_f(m, coorX, coorY)

% generate motion field

factor = m(7).*coorX+m(8).*coorY+1;
px = (m(1).*coorX+m(2).*coorY+m(3))./factor-coorX;
py = (m(4).*coorX+m(5).*coorY+m(6))./factor-coorY;  
