An algorithm for motion parameter direct estimate