Getting the Affine transformations from the Stitcher

asked 2019-04-21 06:57:52 -0600

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?

edit retag flag offensive close merge delete

Comments

1

read this tutorial and affine motion is here

LBerger gravatar imageLBerger ( 2019-04-21 09:03:19 -0600 )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 ( 2019-04-21 16:43:59 -0600 )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 ( 2019-04-22 02:55:29 -0600 )edit