Download and install OpenCV if you have not already done so. Systematically go through the directory structure. Note in particular the docs directory; there you can load index.htm, which further links to the main documentation of the library. Further explore the main areas of the library. Cxcore contains the basic data structures and algorithms, cv contains the image processing and vision algorithms, ml includes algorithms for machine learning and clustering, and otherlibs/highgui contains the I/O functions. Check out the _make directory (containing the OpenCV build files) and also the samples directory, where example code is stored.
Go to the …/opencv/_make directory. On Windows, open the solution file opencv.sln; on Linux, open the appropriate makefile. Build the library in both the debug and the release versions. This may take some time, but you will need the resulting library and dll files.
Go to the …/opencv/samples/c/ directory. Create a project or make file and then import and build lkdemo.c (this is an example motion tracking program). Attach a camera to your system and run the code. With the display window selected, type "r" to initialize tracking. You can add points by clicking on video positions with the mouse. You can also switch to watching only the points (and not the image) by typing "n". Typing "n" again will toggle between "night" and "day" views.
Use the capture and store code in Example 2-10, together with the doPyrDown()
code of Example 2-5 to create a program that reads
from a camera and stores downsampled color images to disk.
Modify the code in exercise 3 and combine it with the window display code in Example 2-1 to display the frames as they are processed.
Modify the program of exercise 4 with a slider control from Example 2-3 so that the user can dynamically vary the pyramid downsampling reduction level by factors of between 2 and 8. You may skip writing this to disk, but you should display the results.