Ask Your Question

Stitching Video Stream

asked 2014-12-29 05:45:19 -0600

Icetray gravatar image

Hi guys,

I'm attempting to stitch the following video stream (

I've used SURF and homographs to carry out the stitching and this part is going well. However, I'm having issues knowing when to push back my stitched image into the loop to carry on stitching for the whole video.

frame2: current video frame stitched: stitched image (also frame1 at the start)

the loop: stitched + frame2 = stitched

Thanks in advance guys!

edit retag flag offensive close merge delete


Can you describe what kind of error you are getting so we know how to help you?

Pedro Batista gravatar imagePedro Batista ( 2014-12-29 08:54:05 -0600 )edit

I'm not getting any errors. Right now it stitches well with the first frame of the image until it runs out of common features to match with. i.e. frame1 stitches with "capture.grab()" until it runs out of features. This shows that my stitching algorithm works.

To continue the stitching process, I'll need to feed back the stitched image back into the loop but I'm having huge problems doing this as at times, the image can be warped. In essence, what I'm trying to achieve is this: Outputting one smooth stitched image in the end.

Icetray gravatar imageIcetray ( 2014-12-30 00:28:17 -0600 )edit

When I read your question I thought the problem would be in the stitching algorithm, which would be something that I could help with. If the output stitched image is warpped it means that the feature matching between images is not working well, and this could be because of too many things. I'd recommend that you follow this tutorial and recreate the results.

Pedro Batista gravatar imagePedro Batista ( 2014-12-30 04:59:10 -0600 )edit

My algorithm is actually very similar to the one you posted just that when used for video stitching, at certain frames the image is warped and at other times it warps back. I think I found away to ignore certain stitches by looking for any warping in the homography and so far it looks...okay. fingers crossed

Now I just have an issue pushing back my stitched image as my first image for stitching. For some reason after awhile it just stops and there is a weird black box appearing in my stitched image. Here's a video of what's going on:

Previous Frame: Frame1 plus whatever has been stitched Current Frame: Current Video frame Stitched: Current Stitched Image

Thanks so much for your help. :)

Icetray gravatar imageIcetray ( 2014-12-30 21:36:55 -0600 )edit

Hi, I've tried to do this: Loop: stitched + frame2 = stitched

It keeps stitching the images from the left to right, creating a panorama. But the left side of the image is getting blurred. Any ideas why? I'm just using the Stitch function.

Is there any algorithm to stitch sequential images?

Thank you

Ribs gravatar imageRibs ( 2015-02-10 09:10:08 -0600 )edit

Hi Ribs,

Would you happen to have a video recording of what's happening? Perhaps you can send me your code and we can see how we can take mine and yours to produce a decent result. :)

Icetray gravatar imageIcetray ( 2015-03-07 04:35:26 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-06-05 10:07:44 -0600

vin gravatar image

We built panorama on video streams using slit scan approach. This approach can be used to make panorama out of a video or camera in real time. For more details, check this link

edit flag offensive delete link more


Hi vin, I am new to OpenCv and have an assignment where I have to stitch a vertical video stream of a tower into a panaroma. Any pointers on how to go about it?

falinshort gravatar imagefalinshort ( 2017-08-15 08:23:49 -0600 )edit

Question Tools

1 follower


Asked: 2014-12-29 05:45:19 -0600

Seen: 3,610 times

Last updated: Jun 05 '17