Ask Your Question

Revision history [back]

Controlling focal length and rotation in bundle adjuster module

Hello,

Recently i had been working with various opencv modules mostly related to stitching and features2d module to make stitching reliable for the app i am working on. After lot of study and effort i could able to detect and match key-points as per my requirement, but as of now i am stuck at controlling focal length and rotation. Right now i am getting stitching results very accurate in some cases but in most of the cases result is very bad.

After checking the code of various modules like camera estimator, adjuster, warper etc, i think the problem is within the module BundleAdjusterRay. I know there is also other adjuster modules and i had tried them all but what i can see is BundleAdjusterRay is the only better work around and i think it is doing its job right and giving the right results when i have the images taken with perfect angle and rotation between each of them. But since the images are supposed to taken with bare hands using phone camera i believe that there will always chance of minor rotation or angle errors which i want to control and balance by tweaking and/or customizing code of opencv modules.

Where i am stuck right now is i could not able to figure out how to simply control Rotation and focal length within BundleAdjusterRay class which is derived from implementation of calcError, calcJacobian methods or even the CvLevMarq LevMarq algorithm implementation. I know they are required but what i want is just make it balanced and controllable based on known parameters of rotation and angle of my images so that it will just not give me very bad results.

PS: My app involves stitching few images say 10 to 20, the regions, order of images are static and rotation between two images are also known up to some level of accuracy. Images are taken from iPhone/iPad camera.