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.
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)
- to load a 'calibraion' from images, do
- 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 thestitch_images
call
- 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
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
- 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 ...