Hugin

From HerzbubeWiki
Jump to: navigation, search

References

Software websites

Homepage 
http://hugin.sourceforge.net/
Wiki panotools.org 
http://wiki.panotools.org/
autopano-sift-c 
http://wiki.panotools.org/Autopano-sift-C
panomatic 
http://wiki.panotools.org/Panomatic
ransac
http://en.wikipedia.org/wiki/RANSAC


Tutorials

Hugin-Tutorial
Panoramabilder erstellen: http://freenet-homepage.de/martin_wehner/Tutorial/panorama.html


Installation & Configuration

Hugin

Hugin installation

  • Download Mac OS X package (URL see above)
  • Copy everything from within the .dmg into /Applications/Hugin


Control point generators

Control point generators are no longer distributed with Hugin due to either patents or unclear licenses. The disk image, however, contains an URL that will point you to the website where you can manually download these tools. Also, you should read the following file, it has excellent, detailed and correct (!) information on how to install and configure control point generators:

Read me first (Mac).rtfd


Nevertheless, I document here the steps that I usually do to install and configure control point generators:

  • Installation
    • Download the 2 disk images (one for autopano-sift-c, and one for panomatic)
    • Log in as an admin user, then for each disk image do the following steps:
    • Open the disk image
    • Manually copy the control point generator program file, which should be located inside a "Generator" folder within the disk image, to the system-wide directory /Library/Application Support/Hugin/Autopano
    • Close the disk image
    • If you prefer to launch the installer which is enclosed within the disk image, the following notes apply
      • The installer will copy the program into the user-specific folder ~/Library/Application Support/Hugin/Autopano
      • For this reason, you need to log in as the user who wants to use Hugin (not the admin user)
      • The installer works only if the disk image is located on your Desktop
  • After the control point generators are installed, they need to be added to each user's configuration.
    • Log in as the user who wants to use Hugin
    • Launch Hugin
    • Open the Preferences window
    • On the "Control Point Detectors" pane select "New..." for each generator that you want to use and enter its details (description, path to the program, arguments and type)


As said above, the file Read me first (Mac).rtf should be consulted for details; in case the file will be MIA in a future Hugin release, these are the details that I used for my Hugin 2009.4 release

  • panomatic
    • description = panomatic
    • program = /Library/Application Support/Hugin/Autopano/panomatic
    • arguments = -o %o %i
    • type = Autopano-SIFT
  • autopano-sift-c
    • description = autopano-sift-c
    • program = /Library/Application Support/Hugin/Autopano/autopano-sift-c
    • arguments = --maxmatches %p %o %i
    • type = Autopano-SIFT
  • autopano-sift-c 120+ images
    • description = autopano-sift-c 120+ images
    • program = /Library/Application Support/Hugin/Autopano/autopano-sift-c
    • arguments = --maxmatches %p %o %s
    • type = Autopano-SIFT


Technical specificatons for cameras

Glossary

See LearningPhotography


Konica Minolta DiMAGE X50

  • Aspect ratio = 4:3
  • Maximum aperture = f/2.8 - f/5.0
  • Focal length = 6.1 - 17.1 mm (35mm equivalent: 37 - 105 mm)
  • File formats = JPEG. DCF 1.0, DPOF, and Exif 2.2 compliant


Panasonic Lumix DMC-TZ10

From the Panasonic website:

  • Aspect ratio = 4:3, 3:2, 16:9
  • Maximum aperture = f/3.3 - f/4.9 (Multistage Iris Diaphragm: f/3.3 - f/6.3 (W), f/4.9 - f/6.3 (T))
  • Focal length = 4.1 - 49.2 mm (35mm equivalent: 25 - 300 mm)
    • Crop factor (or focal length multiplier) = 25 / 4.1 = 6.097560975609756
  • File formats = JPEG (DCF/Exif2.21)


Sony Cyber-shot DSC-HX7V

From the Sony website:

  • Aspect ratio = 4:3, 16:9
  • Maximum aperture = f/3.5 - f/5.5
  • Focal length = 4.25 - 42.5 mm (35mm equivalent: Aspect ratio 4:3 = 25 - 250 mm; Aspect ratio 16:9 = 28 - 280 mm)
    • Crop factor (or focal length multiplier) = 25 / 4.25 = 5.882352941176471
  • File formats = JPEG


Basic tips for taking pictures

The source for these tips is http://hugin.sourceforge.net/tutorials/overview/en.shtml. I copied most of the text verbatim:

  • When taking your series of photographs, try to get about 20% to 30% overlap between shots, so you'll have enough detail to stitch images together.
  • Some lenses have blurry performance near the edges, so you might want even more overlap to ensure the mosaic will feature your best detail from the centers of each image.
  • If there's a principal feature in the scene, try to capture that feature completely in just one of the images.
  • If your camera allows you to specify a "Manual" exposure mode, use it. Meter for the average or the brightest area of your panorama, and use the same metering for all images of the set. This technique will give the best color blending overall. Hugin can try to blend the exposure levels but post-processing is never as good as capturing the right images directly in the camera.
  • Another trick to keep the tonality even is to specify the white balance, instead of leaving it to auto. Either calculate the white balance using a white or neutral grey surface, or just choose one of preselected white balance settings: sun, shade, etc. The reason is that auto white balance can change between views, giving for example a blue cast on one picture and a yellow cast on another.


Quick guide to create panoramas using Autopano

The following quick guide was written for the Mac OS X version of Hugin 0.7.0:

  • Open Hugin; a new project will be automatically created and you will be placed on the "Assistant" tab
  • Click the "Load pictures" button; navigate to the folder that contains the pictures that make up your panorama scene and select the picture files (if you manage your pictures in something like iPhoto, it is recommended to export the pictures because Hugin will create various files in the folder that contains the picture files, which might confuse your photo management tool)
  • Click the "Align" button; Hugin now starts calculating furiously :-)
  • When calculation is finished, Hugin displays a preview window that can be used to play around with some settings, esp. the projection type. Before I really start to make changes, I usually close the preview window, save the project .pto file so that the automatically calculated settings (which are usually good) are protected from my tinkerings. Then I reopen the preview window (using a toolbar button) and start playing around.
  • When finished with the preview window, close it. Go the the "Stitcher" tab. Under "Exposure blending", select the "Panorama" checkbox. This adds a new row to the "Processing" table where you can select the tool to be used for fusion. "Enfuse" is selected by default, in fact I have none other.
    • Note that exposure blending is optional. I have made good experiences with this, though, when I had pictures with different lighting
    • Example 1: One part of the scene has sun in it, another has only shadows
    • Example 2: Pictures are taken under fast changing weather conditions, i.e. racing clouds that let the sun come out between shots
  • On the "Assistant" tab, click the "Create panorama" button and enter the name of the final panorama picture file; now another row of furious calculation is performed
  • The output consists of two versions of the panorama: the regular file, and a file with the suffix "_fused". The latter contains the exposure-blended version of the panorama. Check which version you prefer, then go on with that
  • Open the panorama picture in Gimp.app or any other image processing tool
  • Select the rectangle that you want your final panorama to consist of and crop the picture
  • Save under the final name

TODO: Perspective correction.


How to manually create panoramas

I wrote the following quick'n'dirty HOWTO for myself when I made my first steps with Hugin in the days when Autopano was not available on the Mac. The HOWTO is probably obsolete since nowadays I am using Autopano for automatic control point detection...

  1. Tab "Bilder": Bilder in der Reihenfolge links-nach-rechts hinzufügen
  2. Tab "Bilder": Positionsanker dem mittleren Bild zuordnen
  3. Tab "Bilder": Belichtungsanker demjenigen Bild zuordnen, das die optimale Helligkeit hat, die man sich für das letztendliche Panorama wünscht
  4. Tab "Kamera und Objektiv": folgende Attribute setzen
    1. Objektivtyp = Normal (rectilinear), auch wenn es ein Weitwinkel-Objektiv ist
    2. Bildwinkel (v) = ? (im Weinberg-Beispiel 50.13545; der c't Artikel spricht von 60-70 Grad)
    3. Brennweite (focal length) = 6.1 (für DiMAGE); falls der 35mm-äquivalente Wert 37 eingegeben wird muss beim Beschnittfaktor der Wert 1 eingegeben werden
    4. Beschnittfaktor (crop factor) = 6.06557 (für DiMAGE); dieser Faktor multipliziert mit der Brennweite ergibt die 35mm-äquivalente Brennweite
  5. Tab "Kontrollpunkte": aktivieren der Optionen "automatisches Feinjustieren", "automatisches Hinzufügen" und "automatisches Schätzen"
  6. Tab "Kontrollpunkte": 2 benachbarte Bilder auswählen und nach Möglichkeit mind. 10 Kontrollpunkte setzen
    1. Kontrollpunkte möglichst gleichmässig verteilen
    2. klar identifizierbare Objekte wählen, die scharf und kontrastreich dargestellt sind
    3. Objekte wählen, die nicht zu nahe am Bildrand sind, da die Kamera dort tendenziell eine schlechtere Bildqualität erzielt
    4. keine Objekte im Vordergrund wählen, um Parallaxen-Verzerrung zu vermeiden
    5. die Punkte möglichst genau setzen, indem mit Zoom gearbeitet wird
  7. Tab "Optimieren": jedesmal, nachdem die Kontrollpunkte für ein Bildpaar gesetzt wurden
    1. Auswahl = Positionen (inkrementell, von Anker beginnend)
    2. "Jetzt optimieren" klicken
    3. Ist im darauffolgenden Info-Dialog die Standardabweichung >5, so sollten die Aenderungen verworfen und die Kontrollpunkte nochmals überarbeitet werden
  8. Tab "Optimieren": nachdem alle Kontrollpunkte gesetzt wurden
    1. Auswahl = "Alles"
    2. "Jetzt optimieren" klicken
    3. Vermutlich gilt hier die gleiche Faustregel, dass die Standardabweichung <= 5 sein sollte
  9. Tab "Zusammenfügen"
    1. Menüpunkt Ansehen->Vorschaufenster
    2. Projektion = üblicherweise sphärisch
    3. Blickwinkel = "Blickwinkel berechnen" liefert evt. gute Werte
    4. Panoramabildgrösse = "Grösse berechnen" liefert evt. gute Werte
    5. Bildformat auswählen
    6. "Jetzt zusammenfügen" klicken


Questions and Answers

One of the images that make up my panorama is over or under exposed, the stitched panorama looks bad because of this. 
You can attempt to fix this by going to the "Images" tab, selecting the over or under exposed image and clicking on the button to "anchor this image for exposure". This will indicate that the image should be used as an unchanging reference anchor when optimising Exposure or White balance in the hugin Exposure tab. Usually this should be the image with the least under or over-exposure or the image with the most typical White balance.