How to figure out the Face movement velocity?

Assalamualaikum,i am working on android based project and already able to detect face and eyes.I need to sort out the face movement velocity.I mean when moving my face from left to right or right to left there is a speed,i want to detect that.It would be very helpful if get any suggestion.


show, what you tried, so far, please

I have used these two for face and eye detection :-

  1. haarcascade_frontalface_alt2
  2. haarcascade_eye_tree_eyeglasses

so far everything is working.

velocity is just dx/dt, you got the corners of the detections, so what exactly is the problem ?

(and what are you trying to achieve, in general ?)

i want to show the velocity on screen while moving my face ,thats all i need after detection.

Do have suggestion how do i maintain the time for velocity?