Ask Your Question

Revision history [back]

How to calculate the average speed of monitored points?

Hi,

I'm tracking significant points in a video, representing moving objects. Currently, I have implemented the following:

  1. Open video
  2. Get next frame
  3. Convert color images to grayscale image
  4. Get significant points (using goodFeaturesToTrack)
  5. Get the next frame and his conversion
  6. Find significant points from the previous frame to the next (using calcOpticalFlowPyrLK)

Now, I want to perform the following:

  1. Calculate the velocity vector for each significant point
  2. Create a cluster of significant points according to their average velocity vectors (in other words, create a cluster for each moving object)

Is there any opencv method to perform that?

Thanks!