1 | initial version |
The code you are using is the "old" manual approach to stitching. The effects are not as nice as with the new Stitcher class, which has exposure compensation, seam blending and various projections etc. For a start you could continue using the code you have. If your cameras are really stationary and your scene is feature-rich, you can easily compute the transformation once for the first image pair and subsequent pairs you simply warp with this transformation. So, for the first pair, you go all the way until
Mat H = findHomography( obj, scene, CV_RANSAC );
You have found the transformation. From now on, you just load a pair of images and you warp them WITHOUT finding SURF keypoints, matching them and calculating the homography. This should go very fast.
For better results, you should do the same with the new Stitcher class. It will be much more difficult (at least for me), but the result should be perfect.