How can I paint a mesh using projections of real photographs? We have a series of real (not rendered, taken using canon cameras) photographs, arranged roughly in a sphere around a real world object.  We have used various Structure from Motion techniques to figure out precise camera pose parameters (position, quaternion, focal length) for each shot, and using that information, we successfully "scanned" this object into a mesh.  For instance, I've had a great deal of luck taking the camera information into Blender with the mesh, creating a virtual camera for each of the real world cameras, and rendering depth maps that lineup perfectly with the original photographs.

We're now interested in attempting to texture the mesh using the original photographs.  Conceptually this is simple; I position the cameras in Blender around the mesh just like I did for depth maps, and turn them into projectors (think old school slide projectors), projecting the photograph from the real world camera each represents back out onto the mesh.

The target output of this is a UV-mapped texture+mesh I can take out of Blender and into another environment, such as a game.

Can Blender do something like this?

I'm very new to Blender.  I'm aware of both (http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Painting/Projection) and (http://wiki.blender.org/index.php/Doc:2.4/Manual/Textures/Painting/Projection), but at first glance this appears to be an artist driven approach rather than a mechanical one.  The end result is something we can hopefully automate in python, since there are many images.
You might be able to use some of the techniques from this tutorial on camera mapping.

Namely, you may want to try using "Project from View" to project selected mesh faces' UV coordinates based on the current camera view. I've never tried using it via scripting, though.