calculate translation, untested with realtime video