Skip to content

loopbio/stitchup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stitchup

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

Operation

  • 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
Installation
  • conda env create -f environment.yaml
  • conda activate stitchup
  • python setup.py install
  • cd demo; python demo.py

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

Notes
  • Images/videos should be undistorted before stitching.
  • Alignment should be done using images with overlapping features (see demo.py)
  • When developing (working on c++ at least)
    • pip uninstall stitchup
    • ... edit code ...
    • make cython-inplace
    • ... test ...

About

Stitch multiple videos together into a larger panorama / mosaic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published