- Convert files from Raw to Tiff
- Add Files, Select Lens Type, e.g. Samyang Fisheye Multiplier 1.532, Angle of View 167
- Shift-F2 and Set the masks to remove the tripod / bracket etc
- Shift-F1 and Find control points (Hugin CP Find)
- Geometric Optimise Positions and Geometric Everything
- F3 and remove rogue control points
- Shift-F3 and Manually add control points if necessary
- Shift-F1 and Photometric Optomisation
- Control-Shift-P and change the orientation with Move/Drag northwards and level horizon
- Assistant, Create Panorama
Converting FilesThe best detail and most information is available in the camera's raw file format (for Canon, these are the .CR2 files). JPEG uses only 8-bit depths, and discards information. Hugin cannot work with CR2 files, but it does work with the next best thing (TIFF), so if you have managed to take CR2 images, convert them to 16-bit TIFF with minimal processing:
ufraw-batch --lensfun=auto --out-depth=16 --out-type=tiff *.CR2
Selecting and Loading Files
Click the Add Files... button to load your images, and select the images for one panorama (remember to exclude the photo of your hand!).
If your lens does not have an electronic connection, and the lens characteristics are not stored as EXIF data within the loaded photos, you will be prompted for the lens type - the Samyang 8mm fisheye requires the following settings:
- Lens type: Full Frame Fisheye
- Focal Length Multiplier: 1.532 or 1.58 (TBC)
- Angle of View: 167
Another trick here, is to assign the upward shot to have a different lens (1 instead of 0) - the lens is actually the same, but this assignment will make it easier when assigning masks.
Setting a MaskNow the files are loaded, you need to mask out any part of the image that is not to be used for the alignment, and is not to be included in the final photos.
Select 'Add New Mask' and draw a box around any part of the panoramic head that you can see. Double click to complete the mask, and make sure it is set to "Exclude region from all images of this lens" - that way, you only need to add a single mask. If you assigned the upwards shot to a different lens, the upward shot will not have a mask, or can have a different mask, which is exactly what you need.
If you are using a normal lens you may want to add a separate mask for the images as you are likely to 'see' different parts of the panoramic head as you step through the photos.
You can also take the opportunity to mask out any anomalies e.g. a person who appears in two photos - the only caveats being that there must be sufficient unmasked overlap to enable the processing, and that every part of the panorama must be available at least in one photograph.
Finding and Optimising Control PointsSwitch back to the first tab, and select "Find Control Points' using 'Hugins CPFind' and wait for the processing to finish. This will search all of the images for the same features in overlapping regions.
Now, select 'Geometric Optimise Positions (incremental starting from anchor) - this will cause the control points to be fine-tuned.
All control points have a distance figure which shows how accurate the software believes the point is - at this stage, you should remove all of the wildly inaccurate ones: press F3 to view the control points table, and press the 'select by distance' button - enter a low figure, say, 60 and select delete - this will remove the rogue control points.
If you have many points, you may be able to select a lower figure - the lower the better, but you mustn't remove too many control points, otherwise there will not be enough to do the stitching, and you must manually add control points - make sure you save before you start adding!
Now change the drop down for the Geometric to 'Everything without translation' which will further improve the tuning - you may also find that 'Position and view (y,p,r,v)' is effective. Try different optimisations, and if the post-optimisation dialog says that everything went well, accept it, otherwise, try a different optimisation.
It may be that you will need to manually add some control points.
Manually adding control points is a difficult and time-consuming task, which involves carefully placing a cursor at the same point in two photographs. When you have done this, for as many points as far apart from each other as possible, don't forget to re-optimise.
Keep going back to the control point list (F3) and remove the really bad points. Ideally at the end of the optimisation, the worst distances are < 2.
Finally, for tuning, select 'Photometric, Low Dynamic Range'.
Changing the OrientationWith Control-Shift-P, open up the fast preview, and select Move/Drag - here you should drag the image so that North is in the centre of the screen, and the black masked out area where the tripod existed is stretched out along the bottom of the screen.
It is important to get the image horizontal, and you can use the 'Roll' and Apply buttons to rotate as necessary - when you are finished, the horizon should look flat, and the masked out area for the tripod should be as tall at the left and right sides of the image.
In the following image, you will see the result - note the inset image of the chair leg, where the tripod was placed too near to an object - in this case it was a near miss and the leg is fully defined, but only by a few pixels. The more clearance you can have, the easier it is in the photoshopping stage later.
Saving the Output
Once the image looks correct, you can now save the output to a tif file - I select 12000 x 6000, which provides an excellent level of detail in the post-processed images - don't worry about the loading speed, as the multi-res images still have a tiny initial image, and then do a staged load depending on where you are looking and at what zoom level.
I find it easiest to use the Assistant/Create Panorama button for this. Depending on the images you have, you need to select the best merging options - I've found that High Dynamic Range has been useful when bright skies are present.
And that's it for Hugin - now you have an equirectangular image for use in the next stage.