Video files are available on the class website and a tutorial on how to output videos can be found here.
If convenient, please make the video output format either H.264 (*.mp4) or Theora (*.ogg). This will allow for the videos to be embedded below, which will make the grading process easier. If you are having troubles with H.264, try downloading this DLL and placing it in the folder with the binary. Do not waste time on this. If you are unable to get these formats working within a few minutes, you are free to pick a different format or to let OpenCV pick its default.
CV_FOURCC('H','2','6','4'); // For H.264 CV_FOURCC('T','H','E','O'); // For Theora
Part 1: Traffic Monitoring
Write a program that counts how many cars, buses, and pedestrians pass by. In your output videos put a bounding box around each of the objects as they are tracked. Also, for each frame display a text counter (e.g., 3/2/1 which stands for 3 buses, 2 cars, and 1 pedestrian). Your program must work with at least two of the provided sample videos.
Part 2: Traffic Monitoring
Part A
For each input video generate a separate output video that shows only the buses in this video. You can use the initial frame of the video as the default background that can be displayed instead of frames in which no buses are detected.
Part B
For each input video generate a separate output video that shows only the cars that went from left to right in that video.
Part 3: Where is the ball?
Part A
Write a program that tracks the position of the orange ball in the movies with two cups. Create an output video that shows the position of the ball even when it is under one of the cups. You can assume that once a ball is covered by a cup it will move in the same way as the cup. Your program must work with at least two of the sample movies.