Direction of camera

I want to find movement direction of robot vehicle. I’ve placed a camera on the vehicle. Can i use motion detection for example while rotating robot to left? Any suggestions?

You want to read up on