Harvey Mudd College
Computer Science 182a
Assignment 3
Due Friday, March 11, by 11:59pm

Image stitching and auto-mosiacking: 2d visual geometry

Thanks to A. Efros for the inspiration for this assignment!


     

Goals

For this assignment, you will create image mosaics and composites, first from hand-selected features and then from automatically-selected features. There are many opportunities for extensions -- either using robots and/or the Kinect or in exploring additional capabilities with the 2d image geometry that is at the heart of this project.

Part 1: hand-crafted homographies

This part of the assignment is, in part, data-collection and groundwork for the automated image-stitching application in part 2. You may use OpenCV, Matlab, or PIL - or another system, if you'd like.



Tasks for Part 1

  • Planar warping of a known quadrilateral    The first image-warping piece of this assignment will use your predominantly planar image. Choose four corners of the image of square or rectangle, whose image coordinates will not form a rectangle if the scene was viewed "at an angle" as mentioned above. Then, create a 3x3 homography H that maps the pixel coordinates of those corners into a rectangle of appropriate aspect ratio. Finally, warp the entire image according to that homography H. In your write-up you should include the raw image, the 3x3 H, and the resulting "unwarped" image.

  • Image compositing    In addition, you should create a composite image that warps one image into a quadrilateral within a second image. This warping should use an appropriate homography so that the composite "looks right" geometrically in the target image. You might use your source image from above or other images entirely. The choice of the subject and the target is entirely up to you: there are a number of interesting composites you might create... . For example, you could put fake graffiti on buildings or chalk drawings on the ground (taken from other images) -- or you could replace a road sign with a personal portrait - or spam!

    You should use the capabilities built in to OpenCV or Matlab to do this. In OpenCV,


    and in Matlab, you should use the built-in help routine to investigate the functions


  • A two-image, hand-sitched mosaic    From your set of four overlapping images taken from the same point, choose two of the images and hand-select the pixel-coordinates of four corresponding points between the two images. Then, create at least two mosaics from the two images: The key here is creating a function or sequence of functions that places the images into the same pixel plane, i.e., coordinate system. The three images at the top of this page (on the left) are an example of this hand-built mosaicking run on two images of Sprague.

    There are a number of interesting features you might include in your mosaic:


  • Write-up

    In your write-up for this part, be sure to include



    Part 2: automatically-matched mosaics

    This part of the assignment automates the procedure that was human-driven above. In particular, you'll build a system that takes in two images. With those images the system then should

    Our approach will follow the "MOPs" paper, i.e., Multi-Image Matching using Multi-Scale Oriented Patches by Brown et al. (2005). Our implementatione will make a few simplifications. Read the description below and then look over the paper, making sure you understand the sections this project asks you to implement! We will also discuss some of these techniques in more detail in class.

    Tasks for Part 2


    Write-up

    In your write-up for this part, be sure to include pictures of the intermediate results for two overlapping images of your choice, as well as the final mosaic created. The intermediate results include In addition, you should include a brief description of any detours or personalized design decisions you made -- and where any difficulties arose, if any.

    Please include an archive file of all of your code, as well as the results from at least one successful run and one unsuccessful run, along with an explanation of why the unsuccessful run did not work!


    Extensions

       For full credit, you should include at least one extension for this project's assignment - it can be of your own choosing or a variant on one of the ideas below. If you do, be sure to include an example in your write-up and an explanation of the results!