Ask Your Question
1

gravity center for people tracking

asked 2013-05-07 09:31:20 -0600

ezzahout gravatar image

I'm beginner at using opencv with devc++, My works consists of tracking à person in a video sequence by firstly extract the foreground using the frame difference technique, after that i try to calculate the gravity center and tracing the point in this center for esche frame which gives the trajectory of the people, my cam is static. in this level i have the problem of tracing the gravity center. please help me, thank you very much

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2013-05-07 09:43:47 -0600

You can find the gravity center by computed a mean of all pixels in your blob. Or, you could ask OpenCV doing it for you:

  1. Find the contours (your blob) with findContours
  2. Fit an ellipse around your biggest contours (usually your person) with fitEllipse

The center of ellipse is your center of gravity, that you can track, maybe using the Kalman filter to smooth motion.

You could also look at OpenCV background subtraction classes here.

edit flag offensive delete link more

Comments

1

Thank you very much for your help Mr Mathieu Bamachon :

The program which i used to trace the gravity center as a small circle is :

ezzahout gravatar imageezzahout ( 2013-05-07 10:05:26 -0600 )edit

Question Tools

Stats

Asked: 2013-05-07 09:31:20 -0600

Seen: 555 times

Last updated: May 07 '13