Heading detection using motion templates and eye velocity gain fields