Skip to content
Stitch images and videos to make a panorama! (CIS 581, project 3a)
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
results
video_demo
.DS_Store
.gitignore
0L.jpg
0R.jpg
1L.jpg
1M.jpg
1R.jpg
2L.jpg
2LL.jpg
2M.jpg
2R.jpg
2RR.jpg
3L.jpg
3R.jpg
4L.jpg
4R.jpg
README.md
anms.py
corner_detector.py
est_homography.py
feat_desc.py
feat_match.py
interp.py
mymosaic.py
myvideomosaic.py
ransac_est_homography.py
utils.py

README.md

Project 3a: Image Stitching

Getting Started

Dependency

  • numpy
  • scipy
  • PIL
  • matplotlib
  • scikit_image*
  • annoy*

(package with * is not pre-installed in the CIS581 VM)

Usage

python mymosaic.py [-h] [-i INPUT [INPUT ...]] [-o OUTPUT] [-s] [-c] [-v]
  • INPUT is an optional argment, if not given the program will perform image stitching on default images.
  • OUTPUT is an optional argument, if not given the result will not be saved to file.
  • -s, --use_skimage is whether or not to use the corner detection functions provided in scikit_image library, enable this may yeild better results.
  • -c, --cylindrical is whether to project the result to a cylindrical surface.
  • -v, --visualize is whether to visualize intermidiate steps.

You can test the mymosaic.py on test images provided, make sure the INPUT args are in the correct order. For example:

python mymosaic.py -i 0L.jpg 0R.jpg -o result.jpg -scv

Method

Step 1: Corner Detection

corner_detector Implemented in corner_detector.py.

Step 2: ANMS

anms Implemented in anms.py.

Step 3: Feature Description

feat_desc Implemented in feat_desc.py. A 8x8 rotation invarient feature is downsampled from an oriented 40x40 rectangular region centered and blurred at each corner point.

Step 4: Feature Matching

feat_match Implemented in feat_match.py.

Step 5: Homography Estimation with RANSAC

ransac Implemented in ransac_est_homography.py. Homography is estimated using all the inliers.

Step 6: Geometric Transformation

transform Implemented in mymosaic.py.

Step 7: Image Blending

blending Implemented in mymosaic.py. Currently just computing the average of two image in their intersection.

Step 7: Cylindrical Projection

cylindricalproj Implemented in mymosaic.py.

You can’t perform that action at this time.