![](http://www.feng-gui.com/blog/uploaded_images/907LNCAOZZHACCABT2DTVCASIWUCICAHGK26LCA34JQDNCACOH34SCAQMS2I4CA8ATUSLCAR3G12YCAP9Q0NHCAFQQBR0CARG571OCA9M3DCVCAR03IDMCAFFDNW9CACFA80RCA73GBDHCAHN2MMVCAFMTCTN-715753.jpg)
PhotoSynth underlying "magic" is using SIFT (Scale Invariant Feature Transform) http://en.wikipedia.org/wiki/Scale-invariant_feature_transform
quoting 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=1454
David Lowe's Autostitch project.
http://www.cs.ubc.ca/~lowe/home.html
http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html
more SIFT implementations and source code