Ask Your Question

How to compute a stitching model and reuse it on further image pairs?

asked 2017-05-04 17:18:40 -0500

mojovski gravatar image

I would like to use the stitching module for video stitching. The elapsed time is not important. Its the quality. However, when I simply apply the stitcher independently on each image pair, all the transformation and blending parameters are computed again and the fusion results jitter (of course).

How would I need to adopt the stitching code in order to precompute the required parameters on the first image pair, and then later to re-apply them on all further image pairs?

I tried to call the stitcher->estimateTransform once and then only to call stitcher->composePanorama but the result is not correct. The code for the experiment can be found here:

Thank you very much in advance!!

edit retag flag offensive close merge delete


Are these two different cameras with a fixed relationship?

And how does estimateTransform and composePanorama fail? Is it an error message, or does it just not look correct?

Tetragramm gravatar imageTetragramm ( 2017-05-04 19:03:20 -0500 )edit

the to images are from two different cameras. The results dont "look good". Thats the first stitching result: and thats the second:

mojovski gravatar imagemojovski ( 2017-05-06 16:05:13 -0500 )edit

Can you post the original images so I can experiment?

Tetragramm gravatar imageTetragramm ( 2017-05-06 18:48:12 -0500 )edit

Thank you! you can find the data here:

mojovski gravatar imagemojovski ( 2017-05-07 17:10:47 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-08 21:32:29 -0500

Tetragramm gravatar image

updated 2017-05-09 19:11:38 -0500

So, your code works as is. All I did was copy/paste. Release and Debug, GPU and no. I would run an update and re-compile. If you didn't compile yourself, then it should still work, but try compiling the problem or checking install issues.

Are you using the latest version of OpenCV?



edit flag offensive delete link more


Hmm, I just tried the same code with the latest opencv master branch. No effect. The second image (fused2.png) is still wrong. Could you upload your results you obtain with the same input? Thanks alot!

mojovski gravatar imagemojovski ( 2017-05-09 15:54:10 -0500 )edit

Result: Hmm, looks indeed good to me :)) Are you on Linux or Windows? (My experiments are on Linux - Ubuntu).

mojovski gravatar imagemojovski ( 2017-05-10 02:29:01 -0500 )edit

Windows, though I wouldn't think it would make a difference.

Tetragramm gravatar imageTetragramm ( 2017-05-10 16:38:15 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-05-04 17:18:40 -0500

Seen: 247 times

Last updated: May 09 '17