PhotoSynth underlying "magic" is using SIFT (Scale Invariant Feature Transform)
http://en.wikipedia.org/wiki/Scale-invariant_feature_transformquoting Seitz
"We use a feature-matching technique called SIFT, developed by David Lowe at the University of British Columbia, that handles very significant differences in lighting, shading, weather, scale, and so forth,"
http://www.spokesmanreview.com/blogs/txt/archive/?postID=1454David Lowe's Autostitch project.
http://www.cs.ubc.ca/~lowe/home.htmlhttp://www.cs.ubc.ca/~mbrown/autostitch/autostitch.htmlmore SIFT implementations and source code