Getting the Affine transformations from the Stitcher

asked Apr 21 '19

trttrt gravatar image

Hello

I am interested in using OpenCV's Stitcher to create a panorama from N number of images but extracting the affine transformation from each image. Will this be possible ? I have looked in this example:

https://github.com/opencv/opencv/blob...

And I found this class that might help, https://docs.opencv.org/trunk/df/d15/... but it only mentions rotations.. What about translation?

Preview: (hide)

Comments

1

read this tutorial and affine motion is here

LBerger gravatar imageLBerger (Apr 21 '19)edit

Thanks! I read this: "Affine model expecting affine transformation with 6 DOF or 4 DOF implemented in cv::detail::AffineBestOf2NearestMatcher cv::detail::AffineBasedEstimator cv::detail::BundleAdjusterAffine cv::detail::BundleAdjusterAffinePartial cv::AffineWarper"

This is what I want but how do I use the 4 DOF ? It is not clear. I know I can pass a flag "–estimator affine" but that can either use 6 DOF or 4 DOF ? I dont know which one.

trttrt gravatar imagetrttrt (Apr 21 '19)edit
1

At bottom of the page :

For images captured using a scanner or a drone ( affine motion) you can use those arguments on command line :

newspaper1.jpg newspaper2.jpg work_megapix 0.6 features surf matcher affine estimator affine match_conf 0.3 conf_thresh 0.3 ba affine ba_refine_mask xxxxx wave_correct no warp affine

Try with affine I think it will work. You must set affine for all parameters bundle homography and adjuster

LBerger gravatar imageLBerger (Apr 22 '19)edit