Skip to content
Stitch multiple videos together into a larger panorama / mosaic
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Stitchup is a python library for stitching multiple videos together to form a larger panorama / mosaic. It is designed for use with Loopbio motif video recording systems and imgstore videos, but can be used with any video or image source.

stitched panorama image

It is based on a modified version of the OpenCV stitcher machinery, but with several enhancements

  • Python binding
  • Can use different transforms for matching and homography estimation
  • Logging by default
  • Calibrations can be saved and re-loaded
  • Defaults more suited to motif camera array installations (mostly planar cameras)
    • seam carving/estimation disabled
    • multi-band blending disabled (introduces blurring)
    • minimal/no exposure compensation


  • You need to load the stitcher with a calibration
    • to load a 'calibraion' from images, do ok = load_calibration(*sorted_imgs)
  • When stitching multiple images from the loaded calibration call ok, img = s.stitch_images(*sorted_imgs)
    • the images must be passed in the same order as when calibrated. For example, if sorted_imgs is a list (top_left,top_right,bottom_left,bottom_right) then this order must be preserved between the load_calibration and the stitch_images call
  • conda env create -f environment.yaml
  • conda activate stitchup
  • python install
  • cd demo; python

note: be careful running code from within the source directory as python will preferentially import from the stitchup directory. See notes below re: make cython-implace

  • Images/videos should be undistorted before stitching.
  • Alignment should be done using images with overlapping features (see
  • When developing (working on c++ at least)
    • pip uninstall stitchup
    • ... edit code ...
    • make cython-inplace
    • ... test ...
You can’t perform that action at this time.