Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The Stitcher class was originally designed for a camera that rotates around itself. Therefore no translation is supported.

In summary, there are a number of stages in the pipeline affected by this.

1) Initially, homographies are estimated between pairs of matching images. The intrinsic camera parameters are estimated (focal length, aspect ratio, image center), then the extrinsic parameters (rotation, translation). Here translation is assumed to be 0.

2) During bundle adjustment, the translation is ignored and not updated. I have skipped this stage for now, but it is quite an important one. You could try out a different bundle adjustment library other than OpenCV, such as SBA. There exists an OpenCV wrapper for SBA. See also this thread. I have not tried any of this, but please let me know, if you succeed.

3) The warping stage supports rotation only as well. I've noticed that the PlaneWarper has functions, which accept camera translation as well, but I am not sure whether this is actually working.