
i
i
i
i
i
i
i
i
512 18. Building on the Basics, Some Projects in VR
We can put together a program to produce the chroma-key effect using a
webcam and an AVI movie. DirectShow provides all the software components
needed, and we’ve covered most of the other detail in Chapter 15 already. It is
simply a matter of building a suitable FilterGraph. If you have two webcams,
you can even do it in stereo. We will base most of our application on the code
from Section 15.4 concerning live video capture into an OpenGL texture.
The program has three threads of execution:
1. A thread to run the parent window and the control panel dialog box.
2. A thread to run the camera