Ask Your Question
0

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

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

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: https://gist.github.com/mojovski/ff4e...

Thank you very much in advance!!

edit retag flag offensive close merge delete

Comments

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 -0600 )edit

the to images are from two different cameras. The results dont "look good". Thats the first stitching result: http://pasteboard.co/398rIHAsy.png and thats the second: http://pasteboard.co/3999mFnfa.png

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

Can you post the original images so I can experiment?

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

Thank you! you can find the data here: https://drive.google.com/file/d/0B2fi...

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

1 answer

Sort by ยป oldest newest most voted
0

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

Tetragramm gravatar image

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

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:

Result

edit flag offensive delete link more

Comments

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 -0600 )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 -0600 )edit

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

Tetragramm gravatar imageTetragramm ( 2017-05-10 16:38:15 -0600 )edit

Question Tools

3 followers

Stats

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

Seen: 475 times

Last updated: May 09 '17