As of rev.4978, Thomas Modes added to Hugin the masking feature. That is a very useful function that could save lot of time to panographer and photographer in general. Here I would like to illustarte a way to use POSITIVE masking in the latest version of Hugin. In my last vacation I went to NYC and I had the idea to shoot a photo of a same scene but with a moving object. The good occasion came in Central Park where some street artists where performing an (hilarious and kinda athletic) show. I was waiting for some free time to do some masking in Gimp and obtain a similar effect, but the introduction of the masking capability to Hugin makes the process more easy.
The photo I will use in this tutorial are here (so you could try it directly):
I also will use Hugin rev5004 compiled under Ubuntu 9.04 (Jaunty). If you would like to use this feature under Windows, Zoran Zorkic makes available a zip package of Hugin with masking feature at this link.
Let's start.! open up Hugin and a window of the file browser where the images are. Select the images in the file browser and drag'n drop them in the HuginAssistant tab.
Press the align button in the same tab and wait for your preferred control point generator to do his work.
Now it's time to create some mask. So head to the mask tab in the Hugin main window and select the first photo of the list on the left. Press now the button marked as add new mask and start adding some points on the image on the right using the left mouse button.
When you have finished adding points use the right mouse button to terminate the process.
As you can see in the left of the mask tab in the main window of Hugin, the mask type is set to "Exclude region and if fact if you look to the preview window you will see that the guy had disappeared.
Now modify the mask type from Exclude region to Include region by using the selector just below the mask type table. You will see now the guy appear in the preview window.
Do the same in all the remaining images by creating a mask that identify the jumping guy and by setting it as "Include region" type
When you have finished take a look at the fast preview window:
Now select the crop tab in the fast preview window and click on the Autocrop button: Hugin will take care of cutting the relevant area of the photo and excluding the black and empty areas
Now go back to the Hugin main window and select the stitcher tab; click on Calculate optimal size (in this way you will get as output the maximum resolution possible for the photo) and finally click on Stitch now!. Select a path to save the output and after Hugin has finished the calculation open a file browser and check the result.
Next is the final image I got using this method:
Thanks to Thomas Modes for this great addition to Hugin! ...and thanks to the guys that did the exhibition in Central Park for being so entertaining!
Thanks a TON for this little tutorial. It's great for masking out the little section of panorama head that's visible in the images, and the legs for the nadir shot.
I just spent an hour trying to figure out how to mask the images without having to run enblend manually, because of the aforementioned issues. Finally I found this tutorial, so I upgraded to the latest Hugin straight away, and BAM.