top of page

mosaic : Automatic 2D Image Mosaics

CIS581 Project at UPenn

Fall 2016

I am fascinated by photographic technology, from the manufacturing of CMOS sensors to the mechanisms of film cameras, so I was particularly excited to have the chance to implement an end-to-end image stitching algorithm that automatically transformed a series of images into a panorama for CIS581: Computer Vision (CV) and Computational Photography.

Automatically creating a panorama from a video is an involved process (see image gallery below for more details):

  1. Find the corners in each image (using a Harris Corner Detector)

  2. Determine the strength of each corner (using MATLAB's cornermetric function)

  3. Downsample to strong, spatially distributed corners (using Adaptive Non-Maximal Suppression, or ANMS)

  4. Build a list of feature descriptors for each image (by selecting a grid around each corner, subsampling, and normalizing)

  5. Match feature descriptors between consecutive images (using kNN search on a k-d tree)

  6. Estimate the homography (by maximizing matched feature inliers via RANSAC)

  7. Refine the homography (using least-squares on those inliers)

  8. Transform each image by that homography

  9. Stitch the images together (by overlaying the corners and blending the pixels)

  10. Recompose the panorama around the center image to reduce warp effects

I refined my implementation of the mosaic algorithm as I tested it on my own image sequences. For example, I upgraded the ANMS algorithm to find local maxima using a sliding filter and then used a sorted search through those maxima to determine which corners to suppress - these modifications sped up ANMS by 6x and reduced it from ~90% to ~55% of total computation time. I also implemented functionality that allowed me to generate a panorama from a continuous video, and automatically select good frames to stitch together. See below for some examples of panoramas-from-video generated by my mosaic algorithm.

PANORAMA FROM VIDEO EXAMPLE: BIG SUR, CA

PANORAMA FROM VIDEO EXAMPLE: MILLS CANYON, CA

bottom of page