function q = dummy(a,b) % motion from fft % fast conv; see how much image is shifted over % motion_estimation by fft methods: cross spectrum, CROSS SPECTRUM A = fft(a); B = fft(b); BA = conj(B).*A; % conj is like reversal in time domain Q = BA(:); %%%./sqrt(A(:).*conj(A(:)).*B(:).*conj(B(:))); q = ifft(Q); %clg %hold off %subplot(211) %plot(real(q)) %title('RE of cross/sqrt(pwrA pwrB)') %plot(real(ifft(BA))) %title('cross')