is it possible to stitch two images using affine transformation ?

asked 2016-01-19 22:55:06 -0500

Himanshus gravatar image

actually , i have two images captured by an UAV , so scale translation shear rotation is there . now i want to mosaic these images using affine transformation

it is possible or not ?

i m using opencv

edit retag flag offensive close merge delete


Why not use the stitcher class directly?

StevenPuttemans gravatar imageStevenPuttemans ( 2016-01-20 02:32:45 -0500 )edit

I think so, but you need to compute the transformation matrix. So do a feature detection, match them and based on the matched featured detect the transformation matrix. then apply the transformation. Start with this and then come back with results and problems ;)

thdrksdfthmn gravatar imagethdrksdfthmn ( 2016-01-20 02:34:00 -0500 )edit

i need to do this after feature matching thats why i m not using stitcher class .

Himanshus gravatar imageHimanshus ( 2016-01-20 03:13:26 -0500 )edit

So, if you have matched the features, then try to compute the homography from them to have the transformation matrix. then see what perspectiveTransform does. Why do you need affine transformation?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2016-01-21 03:22:11 -0500 )edit

does homography work on all these scale translation rotation ?

Himanshus gravatar imageHimanshus ( 2016-01-21 07:21:06 -0500 )edit

IMHO, based on this tutorial it could

thdrksdfthmn gravatar imagethdrksdfthmn ( 2016-01-21 08:52:13 -0500 )edit

@thdrksdfthmn Because warping using perspective transform is stretching out the images after stitching multiple images (unlike in affine transform, I suppose), so we need to use affine transform in his case. So if I had the code for perspective transform could I be able to obtain all the information I need for an affine transform instead?

h2398 gravatar imageh2398 ( 2017-06-20 01:37:10 -0500 )edit