Thursday, May 15, 2008

Google Summer of Code 2008

My application to hugin/panotools was accepted for Google Summer of Code 2008. The project is called "Masking in GUI". Thanks to Adil bhai for giving me a reminder when I was bogged down with course work and almost forgot about GSoC. To give you an idea of what the project is about, let me first talk a little bit about panoramic image creation using Hugin and related tools.

The main idea behind panorama creation is to take a bunch of overlapping photographs and find homography between pairs of images. This is generally known as aligning images. Once this is done, the final step is to create a single image which is a composite of all the aligned images.

Hugin is a GUI front-end for a set of tools used for panoramic image creation. It takes a set of images and first executes a feature detection and matching tool (aka control point generator) on those images. Currently, there are a bunch of them but most are based on SIFT and recently as part of GSoC 2007 hugin/panotools project a new feature detector - matchpoint - was created. For more on these tools see this post. The control point generator finds similar features between pairs of images. The homography matrix for pairs of images is then calculated using these control points. Hugin then transform those images and gives a preview of the result to the user. Of course, Hugin also provides options like setting different optimization and output parameters etc. And this greatly simplifies panorama creation. Ultimately, Hugin creates a project file that reflects all the desired setting. Finally, when the user chooses to create a panorama Hugin calls another tool called hugin_stitch_project which basically reads the project file and calls appropriate stitcher (eg. Nona) and blending tool (eg. enblend) to produce the final output.

Now the final image that is produced after blending may have some artifacts. For instance the seam line (ie. the line between two images) may go over a foreground object resulting in a part of the foreground object being absent in the final image. In these cases, the alpha channel corresponding to those pixels are marked so that the blending tools avoids placing a seam line near those regions. This is where my project comes in. I'll be developing an easy to use mask editor that will be embedded in Hugin and simplify the workflow for the users (the current process requires using external tools for this).

I'll be adding the details of the project in this wiki and project blog. I hope this project turns out to be a successful one.