The preceding program can be expanded and improved in various ways, depending on the requirements of a particular application. Consider the following examples:
- You could remove a Pedestrian object from the pedestrians list (and thereby destroy the Pedestrian object) if the Kalman filter predicts the pedestrian's position to be outside the frame.
- You could check whether each detected moving object corresponds to an existing Pedestrian instance in the pedestrians list, and, if not, add a new object to the list so that it will be tracked in subsequent frames.
- You could train a support vector machine (SVM) and use it to classify each moving object. Using these means, you could establish whether or not the moving object ...