This is a simple tracking example of moving object. The basic concept is simple as following the steps
- Use background subtraction Code Here
- Draw a Rectangle over the object (blue) (Use coordinates of center (X,Y))
- Init Kalman filter (red object) with detected (X,Y) coordinates
- If the measured position of the object is available update the Kalman filter.
- If the measured position is not available just read the predicated state of the kalam filter