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