By modifying the projection matrix of an OpenGL program we can calibrate a projector image. See our paper Minimally Invasive Projector Calibration for 3D Applications appearing at the GI-VRAR 2006.
We also provide the code snippets to modify your application and the manual calibration program (source and Windows executable).