Hi, here is part of my current project and I hope this would be helpful. Some of the code is from opencv samples or other open source projects. I will try my best to include the origin source for every tiny tool and please contact me if you find something wrong.
More information can be found on my website
This code implements a tool for finding the homography between two similar pictures(input1.png & input2.png). SURF features are used to find pairs. The result matrix can be used to "transform" input1 into input2! It means the result one should have the same "background". In other words, this can be used to combine several pictures together (to make a 360 degree photo, maybe~)
ps. This code is quiter simple and the main functions can be found in openCV. I make a wrap for it so this can be easily used in my whole project.