Panoramas From Video

This was my final project for CS 231A, Intro to Computer Vision.  Making panoramas from several still images of a larger scene is more or less a solved problem, with efficient methods existing and being available through libraries such as OpenCV.

However, it's sometimes more interesting to create a panorama from a video.  Taking a video of a scene is generally easier and faster for the user of the camera, and taking a video of the scene makes it easier for the user to assure they cover the scene completely, so as not to leave holes in the panorama.  It would also be appealing if one could detect multiple panoramas in a video, which may have been taken in a more casual context, not specifically intended for capturing a single panoramic scene.

It was the goal of my project to tackle these problems, and to build a procedure based on the OpenCV Stitching module (which is designed for still images as inputs) that would identify different panoramic scenes in a video and efficiently stitch them into panoramas.

Processing video for panorama creation presents some difficulties, most notably the simple fact that one has to deal with a very large number of frames, and many of the steps in the panorama creation procedure scale in a super-linear way.  It was also important to assure that the program would run reasonably in terms of CPU time and memory usage on standard personal computers, as my program should be general enough for most people to run on their machines.  Details about how these problems were approached in my project can be found in my paper, or a more brief description can be found in my poster.

The code is hosted at https://github.com/jasonrchaves/PanoramaFromVideo.  Compared to commercial software, it is quite slow, and it sometimes requires some command-line arguments for more complicated input videos, but it's a start and it gets the job done.  I hope that building on top of OpenCV's Stitching module makes the code more approachable to people already familiar with OpenCV's codebase.

Finally, here are some examples of panoramas generated by more program.










No comments:

Post a Comment