Computer Vision (CSE 455), Autumn 2012
Project 2: Panoramic Mosaic Stitching
Assigned: Thursday, October 11th, 2012
Due: Wednesday, October 24th, 2012 (by 11:59 pm)
Artifact Due: Thursday, October 25th, 2012 (by 11:59 pm)
Project Head TA: James Gray (send your questions here first!)
Project Secondary TA: Avanish Kushal
Before you start
Turn-in Details
The only files you should put in your turnin folder are files that you created or modified. Do not turn in any skeleton files, Visual Studio files, or provided image sets.
The expected structure is:
student-folder
|
----turnin
|
|-----source contains only: .cpp and .h files which you modified or created
|
|-----binary contains only: your .exe file(s), compiled in Release
|
`-----artifact contains one image file named voting.jpg for artifact voting
contains one hypertext file index.html documenting your project, and optionally a .css file
contains any image files needed in .png, .jpg, or .gif format
contains any other project-specific files (e.g. the panorama viewer applet)
You can add a README file to any of the above if there is information we should know for grading - but consider whether it is better addressed via comments in your source code or via your write-up in the artifact.
There should be no other folders present beyond those above, which are created for you.
Some WYSIWYG HTML generators (Microsoft Word) will add an extra folder of "resource" files. These are permissible, but we strongly recommend that you look at other editors. As a CS student, you can get a free copy of Microsoft Expression Studio through the department's Dreamspark membership ("Expression Web" is the relevant component). If you need a non-Windows editor, try KompoZer (open source, runs on Linux and Mac OS, less refined GUI, not as good at producing clean and compatible source). See your TAs during office hours if you need additional help with web authoring.
If you do extra credit extensions:
Common Problems
Artifact Voting
Overview
In this project, you will write software which combines a series of photographs into a 360° panorama. Your software will detect useful features in the images, find the best matching features in your other images, align the photographs, then warp and blend the photos to create a seamless panorama. You will be able to view the resulting panorama inside an interactive web viewer.
This project can be thought of as two major components:
To start your project, you will be supplied with some test images and skeleton code you can use as the basis of your project. Because this project is more extensive you can work in groups of two. Each component will result in an executable which you will use via the command line and appropriate arguments (features.exe and panorama.exe). Calling these in the correct order with reasonable arguments will allow you to generate your panorama. More detailed descriptions of these can be found in the Features and Panorama sections.
Project Files
The following files are available for download. Alternately, you can have one with everything.
We have also added a .bat script which demonstrates running all commands except blendPairs for the test set, and a pairlist.txt file for the same set which includes the expected alignPairs results for the pano test set. Note that the .bat script assumes that it, features.exe, panorama.exe, and the target images are all present in the same folder. Here is a second .bat script (one command) that demonstrates using blendPairs, for which the pairlist file must also be present.
If you're unfamiliar with .bat scripts, it's a text file containing line-delimited console commands. You can open it in Notepad or another text editor to see what's going on. It can be helpful to execute them from within a terminal session so that the execution window stays open after the script runs (Start+R, enter cmd).
You may also want to install IrfanView. This program is very helpful for opening and transcoding image formats (among other things). This article on its batch conversion feature may be helpful when converting your photographs to .tga format. (Photoshop users: be aware that it does some sanity checking when opening files which may fool you while debugging, specifically about whether your alpha channel is correct.)
Getting Things to Run
The steps required to complete the panorama are listed below:
Step | EXE | |
---|---|---|
1. | Take pictures on a tripod (or handheld) | |
2. | Warp to spherical coordinates | Panorama |
3. | Extract features | Features |
4. | Match features | Features |
5. | Align neighboring pairs using RANSAC | Panorama |
6. | Write out list of neighboring translations | Panorama |
7. | Correct for drift | Panorama |
8. | Read in warped images and blend them | Panorama |
9. | Crop the result and import into a viewer | |
Although this is the final order of operations, you can complete Features.exe and Panorama.exe in parallel and test on other images.
Running the sample solution
Features.exe and Panorama.exe are command line programs that requires arguments to work properly. Thus you need to run it from the command line, or from a shortcut to the executable that has the arguments specified in the "Target" field of the shortcut properties. The one exception to this is that running Features.exe without command line arguments opens up the UI.
Running from the command line
To run from the command line, click the Windows Start button and select "Run". Then enter "cmd" in the "Run" dialog and click "OK". A command window will pop up where you can type DOS commands. Use the DOS "cd" (change directory) command to navigate to the directory where Features.exe or Panorama.exe is located. Then type "Features" or "Panorama" followed by your arguments. If you do not supply any arguments, the program will print out information on what arguments it expects or open the UI in the case of Features.exe.
Running from a shortcut
Another way to pass arguments to a program is to create a shortcut to it. To create a shortcut, right-click on the executable and drag to the location where you wish to place the shortcut. A menu will pop up when you let go of the mouse button. From the menu, select "Create Shortcut Here". Now right-click on the short-cut you've created and select "Properties". In the properties dialog select the "Shortcut" tab and add your arguments after the text in the "Target" field. Your arguments must be outside of the quotation marks and separated with spaces.
Running the skeleton program
You can run the skeleton program from inside Visual Studio. However, you will need to tell Visual Studio what arguments to pass. Here's how:
What to Turn In
In addition to your source code and executables, turn in a web page describing your approach and results. In particular:
Feature Detection and Matching
Panorama Mosaic Stitching
This portion of the web page should containin the following:
The web-page should be placed in the project2/artifact directory along with all the images in JPEG format. If you are unfamiliar with HTML you can use WYSIWYG-style editor such as Microsoft Word. It may be easiest to modify our template.
Panorama Links