Autostitching Panoramic Images
Python application for stitching panoramic images.
Description
Implements stitching arbitrary images either through manually defined features or through SIFT feature matching based on the Harris corner detector, as described in Brown et Al. Stitching is accomplished using RANSAC to compute a robust homography between the set(s) of image correspondence, then warping each image toward a chosen reference image. Finally, multiresolution blending is accomplished using Laplacian pyramids. The application also supports image rectification.
Usage
Requirements are listed in requirements.txt
. Application is run from main.py
:
usage: main.py [-h] -r REF [-w WARP [WARP ...]] -m
{rectify,manual_mosaic,autostitch} [-v]
optional arguments:
-h, --help show this help message and exit
-r REF, --ref REF reference image path
-w WARP [WARP ...], --warp WARP [WARP ...]
warp image path(s)
-m {rectify,manual_mosaic,autostitch}, --mode {rectify,manual_mosaic,autostitch}
choose between image rectification, manual
correspondence mosaicing and autostitched mosaicing
-v, --verbose log file reads/writes to stdout & visualize
intermediate autostitching outputs
Modes
- rectify: requires only
-r REF
- manual_mosaic: requires
-r REF
and at least one-w WARP
, supports a single global feature set - autostitching: requires
-r REF
and at least one-w WARP
Global filepaths for intermediate and final outputs are set in utils.py
.
Note: Click same coordinate twice to end manual shape labelling.
Examples
Rectification
Hallway | Hallway Rectified |
Mosaicing
Building Left | Building Right | Building Mosaic |
Room Left | Room Right | Room Mosaic |