Shift estimation using fourier transform
Assume the image is 256x256, The shift in spatial domain corresponds to a linear phase in the frequency domain.

u=-128:127;
v=-128:127;
u=repmat(u,size(u,2),1);
v=repmat(v',1,size(v,2));

linear_phase= exp(-2*pi*1i.*(((v).*dy)+((u).*dx)));


dx shift in $x$ and dy shift in $y$, and A equals linear_phaseso i can get a lot of equations to solve for dx and dy

If dx or dy is $0.5/128$ the shift is one pixel in $x$ or $y$