Featured Multi-row panoramas sans tripod with Hugin

Discussion in 'Image Processing' started by fader, Mar 8, 2017.

  1. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    Some here were questioning the ability to capture and stitch multi-row panoramic photographs without the aid of the nodal point corrected panoramic head (also sometimes referred to as a "spherical" head).

    Not only can you do it without a spherical head, but you can do it without a tripod at all. Following is a walk-through of my use of the open source Hugin Panorama stitching software to do just that. It's a new skill I've been enthusiastically working on, leading me to think about my photography in terms of photographic sets - some parts of the final image are HDR, some parts can be focused stacks, and other parts of the composite just simple tweaks applied with a preset. It's changed how I think about telephoto lenses and how I approach shooting a scene, trying to break it down into a mental grid. The example below is a simple one.

    Software: Hugin is part of panotools.org offerings, and leans on two pieces of software: enblend, and enfuse. The awesome part is that these can be used outside of the desktop application. The edge detection and corresponding ability to map the composite onto a globe to correct the perspective is a miraculous feature. While it looks intimidating to begin, it is easy to use by narrowing your focus to the 3 buttons in "Assistant" panel. Just load the images in any order. Click "Align" and let it do it's magic. Then click "Create Panorama" and it will produce the final image. After doing this a few times, the rest of the panels begin to make sense and you can lose all of your free-time learning how to tweak various elements.

    Step 1 - fitting it together: a composite of 13 images in a 5x2 grid, taken with the Oly 45mm which provides roughly 21 degrees of viewing angle for each singular image. (5 columns wide, 2 rows high). I applied a preset in Darktable to bump default sharpening, micro-contrast, and a base curve adjustment equally to all 13 images. There are 3 images in column 2, with a high degree of overlap and differing focus planes. Likewise, in column 3, 4 images capture detail of the fluffy bits of the upper surface and erosion areas, then 2 shots high for columns 4 and 5.

    5x2_pano_layout.

    Perspective mapping: here we can see the composite modeled onto a sphere. Hugin uses the view angle of the lens to calculate the perspective, assuming the shooter is panning around with their body as the fixed point. This can be tricky and doesn't always work out. If even just 1 image has a horizon that is not level or consistent across images it will confuse the entire composite. Oddly enough, my attempts to to correct the horizon in an errant photo and recalculate is still disastrous. I'm not sure why but this messes up the voodoo in the algorithms. Luckily, it's pretty tolerant of minor variations. More extreme ones cannot be fully corrected. The horizon in the 5th column images were off by about 5~8 degrees, and no amount of straightening and re-mapping led to a fully flat sea level in the auto-result. Quite correctly, the software shows the curvature outward from my standing position just in front of the lichen covered rocks.
    Screenshot from 2017-03-08 09-15-37.


    Final result: pretty good, but not perfect. With 5 columns shot in landscape, the final shot should be a bit wider than 12mm (24mm FF) FoV at 73 degrees. To find out Hugin's calculated FoV, change the interface type from "simple" to "advanced", then click onto the "Stitcher" panel. In fact, the final calculated horizontal FoV is 69 degrees - somewhere between a 24mm and 28mm lens in FF. Is it right? I don't know ... without a 12mm lens to compare with, this figure seems conservative.

    It's worth noting that the misalignment of the horizon in the right part of the image will need to be corrected with a perspective shift in a photo-editor. Not a big deal, consider the amount of work that's already been done for us automatically. You may also note that the green lumps in the center are out of focus. If you want to blend images to produce more depth of field you'll need to do it before adding to Hugin, as the final results are erratic. Having said that, the bit of green turf in the lower-left frame has been blended nicely by the enfuse algorithm, using contrast weighting and a series of masks to achieve this automatically. We may also note that the ghost dog is no longer in the middle left, and has rejoined my lovely wife. The black on the rocks is petroleum stains due to a shipwreck and resultant oil spill in 1978. It was the largest spill to that date.

    Amoco Cadiz oil spill - Wikipedia


    _2130158 - _2130170.

    Make a mental grid: it bears repeating that one must not be too hasty. Here's an example where my mental grid didn't work out so well. Bracing against 30 to 50 mph winds of an approaching Atlantic storm, I was just aiming the camera and snapping with a high shutter speed while standing on the coast. One of these images I posted into Seascapes. It's a shame becaue the detail on the water for a full pano would have been incredible, a full shot resulting in ~100 megapixel image. If you don't keep careful mental accounting of the scene while shooting, it's ruined. Hugin will automatically select the crop area for a continuous image, but as you can see, a lot of resolution is left on the table due to my lack of tenacity. Behind me out of view were at least 5 photographers setup behind rocks with tripod, all sporting ginormous Canikons, overlooking dozens of other people like me flying past with point and shoots. I'm happy to be in this latter camp, really, and not at all too worried that 1/1000 shutter speed is capable of freezing any body movement, whatever the conditions might be ...

    _3050004 - _3050023_blended_fused_sm.

    Quick HDR example: this was shot in a roughly 3x2 grid. The 3rd (right side) column contained 3 shots at different exposures. Hugin detected the exposure difference and blended for HDR automatically. Unfortunately, there's also a seam transition error if pixel peeping at larger resolutions, killing any hopes for a print. I made 3 different versions of this and none came out perfectly. The auto methods have their limitations.
    hdr_aversion_final - middle_pano.


    Get Vertical: 1x5 grid. This shot of a tree canopy is lacking in attention to detail or artistic merit, but I include it here to show that it can be done. 5 images shot in landscape, 90 degree view from horizon to directly overhead. I'd like to shoot a whole series of these and select 3 for a nice print in triptych.

    tree_verti_pano.

    Overlap possibilities - not just for panos: How much overlap is needed to still work? that's the great thing. Anywhere from 10% to 90% seems to work fine. In this 5 image composite, the center of the frame was the same. The final crop is pleasing and would have been otherwise an impossible shot. I call this zoom-by-composite, and it's opened a lot of new possibilities for me, a prime shooter. If I can't squeeze something into a single frame, I just lock the cameras settings and shoot the details I want to capture, then let Hugin produce the final result. Have a lens that's dark or un-sharp in the corners? No problem. Just treat the edges of the final result as the middle of the outside frames and stitch your way to complete corner-to-corner sharpness. In most of my panos I convert the RAW to 16 bit TIF and then re-import to Darktable. Final post-processing on the composite TIF is the same as any single image.

    house_example.


    Final note: I hope this quick walk through encourages you to experiment more on your own. While I still want to get one of the fancy spherical heads to do panos, a great deal is still possible hand-held thanks to the Hugin software. More advanced use of Hugin would no doubt yield better results on a tripod and pano heads. That's Phase II of my learning curve. A lot of the techniques here are familiar to many of you through Adobe products. If you haven't ventured outside of those I encourage you to give it a try. Happy shooting!

    Hugin - PanoTools.org Wiki
     
    Last edited: Mar 8, 2017
    • Informative x 14
    • Like x 4
    • Winner x 2
    • Agree x 1
    • Useful x 1
  2. Tenpenny

    Tenpenny Mu-43 Veteran Subscribing Member

    236
    Mar 16, 2015
    Nampa, Idaho
    Brent Watkins
    I do a lot of panorama stitching lately. Also playing around a bit with the Brenizer method. I'm curious to hear your view on using Hugin software vs LR or Photoshop. I've never used Hugin software before and I'm interested in the differences, strengths and weakness as compared with the other software. Nice writeup btw ;)
     
  3. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    @Tenpenny@Tenpenny thank you, much appreciated.

    re: comparison to Adobe products: I couldn't say, honestly, as Hugin is all I've used. Digital workflow was relatively new to me when I bought the EPL-7. Since I'm a techie by work, my choice of OS is Ubuntu Linux and I can't run the windows based software. I use open source for everything on a cheap Dell laptop upgraded to 8GB of ram and a 512GB SSD drive. For software I use Hugin and the Panotools command line utilities, Imagemagick CLI tools, Darktable, and Gimp. I don't feel like I'm missing out, and free is a good price.
     
    • Agree Agree x 1
  4. Tenpenny

    Tenpenny Mu-43 Veteran Subscribing Member

    236
    Mar 16, 2015
    Nampa, Idaho
    Brent Watkins
    No, I don't think you're missing out on anything either and free is always my preferred price. :D I run an Ubuntu box as well as my windows machine. It sounds like a good excuse to play around a bit and run some comparisons. I'll go out and grab a panorama or two this coming weekend and try to remember to post back on whatever differences I see concerning the stitching abilities. You have definitely sparked some curiosity on the subject for me.
     
    • Like Like x 1
  5. coffeecat

    coffeecat Mu-43 Top Veteran Subscribing Member

    927
    Aug 4, 2012
    SW England
    Rob
    Thanks for the comprehensive write up! I have used Hugin to stitch handheld panoramas with good success. My biggest problem is I only do it rarely, so when I come back to it I can't remember what to do. So I think your post will be useful.

    Rob
     
    • Like Like x 1
  6. Chris5107

    Chris5107 Mu-43 Top Veteran Subscribing Member

    961
    Jan 28, 2011
    USA
    Chris
    The Microsoft ICE program is also very good at this for PC's

    And I will add its almost idiot proof to use. Very simple.
     
    Last edited: Mar 8, 2017
    • Agree Agree x 6
    • Like Like x 2
  7. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    more polished example - hugin, gimp, and darktable. unfortunately, the gradient filter plugin led to a lot of jpeg artefacts in the sky. g'mic "freaky details" plugin for contrast in the stones worked well here.

    1600px_st-michel.
     
    • Like Like x 3
    • Winner Winner x 1
  8. Tilman Paulin

    Tilman Paulin Mu-43 Veteran

    348
    Jun 10, 2013
    Dublin, Ireland
    Also it has one killer feature: Content-Aware Fill ("Autocomplete") for incomplete/steppy areas around the edges of the stitch.
    Saved me often from having to crop too tight.

    And it's freeware too :)
     
    • Agree Agree x 3
    • Informative Informative x 1
  9. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    just looked at the ICE page on the web. Indeed it looks pretty great. Maybe I can try it on my wife's Windows 10 laptop.
     
    • Like Like x 1
  10. coffeecat

    coffeecat Mu-43 Top Veteran Subscribing Member

    927
    Aug 4, 2012
    SW England
    Rob
    Yes - I use ICE when I'm in a hurry or feeling a bit lazy, and it is very good. It has sometimes been a bit flaky with difficult matches, but to fix them I have had to go into Hugin and manually set more matching points etc which can sometimes be very time consuming.
     
  11. junkyardsparkle

    junkyardsparkle Mu-43 Veteran

    Nice write-up, I've often used a similar darktable > Hugin > darktable workflow, using 16-bit TIFF as the intermediate format... works great. One thing I've found that helps with preserving the image quality through the chain is to do as much dynamic-range-intensive stuff as possible in the initial RAW developement. Obviously, you don't want to apply things like gradient filters and spatial-dependent tonemapping stuff at that point, but if you can correct lens vignetting, and get the base curve and white balance as close as possible to the desired result at this stage (and correct any exposure variation amongst the images, if need be), you'll maximize the useful information that gets squeezed into the TIFFs, and reduce the amount that this information needs to be "stretched" in subsequent steps.

    A few other things that may or may not be obvious: turn off any sharpening during RAW developing - do this once, on the final stitched image. Turn ON whatever noise reduction methods you want to use, they'll work much better at the RAW stage. It also makes sense to disable distortion correction of the lens, and let Hugin handle this (helps to profile your lens in Hugin). This will avoid multiple interpolation operations... just correct the vignetting in RAW. Exposure-wise, make sure none of your RAW exports have clipped highlights in areas that might possibly have their exposure pulled down by gradient or tone-mapping processes in the final step; basic ETTR principles apply here similarly to when shooting the RAWs.

    Picking the best projection for the final image is an interesting topic, too, but that's a whole 'nother can of worms, and there are many discussions about it out there already... enough random brain-dumping for now. ;)
     
    Last edited: Mar 9, 2017
    • Informative Informative x 3
  12. junkyardsparkle

    junkyardsparkle Mu-43 Veteran

    Simple rotation shouldn't be an issue for Hugin at all, as long as there's still plenty of overlap. Try to set a fairly level image as the anchor image, though. How exactly did you go about correcting the horizon in the single photo?
     
  13. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    I use Darktable's crop&straighten widget. I think the horizon was off for not just 1 column of photos but for 2 or more of them. When I straightened the image with water it knackered the whole thing because the control points and orientation was thrown off for the surrounding images. If Hugin's sphere were the earth, the panorama went from being stretched across Mexico (~horizon level) to a location originating in the Arctic circle, and extending at an angle south down through the North Atlantic. weird.
     
  14. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    thanks all for the comments and likes. I've felt like a Jr. high kid in an arcade with a found $20 bill these past couple of weeks!
     
  15. junkyardsparkle

    junkyardsparkle Mu-43 Veteran

    It's actually not that weird, if you think about it... doing this produces an image with a narrower field of view than what you're telling Hugin that all the images have, because of the inherent cropping. This is like giving somebody a jigsaw puzzle with one piece that's not quite the size that it should be... Hugin will go crazy trying to make sense of it. Don't do this. :p

    (It's actually possible to specify a different camera/lens for individual pictures in Hugin, but this isn't something you would normally want to mess with. Just let Hugin handle the rotation.)
     
  16. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    @junkyardsparkle@junkyardsparkle - yep, already went down that road by stripping the exif data on export and keying in slightly longer lens data for that pic in the "advanced" version of the tool. it changed the position around but not back to where it should be. It's worth noting that there is a horizon straighten button in advanced mode. If I remember right I used that to produce the final shallow cliffs image above.
     
  17. fader

    fader Mu-43 Veteran

    271
    Aug 20, 2016
    Brest, France
    Isaac
    humbled for the feature add - thanks @barry13@barry13

    I encourage others to post their Hugin experiments and shots in here as well, questions, tips, and winners all alike. I know some of you have some real stunners!

    cheers,
    Isaac
     
    Last edited: Mar 10, 2017
    • Appreciate Appreciate x 1
  18. pellicle

    pellicle Mu-43 Hall of Famer

    Feb 10, 2010
    Southport, OzTrailEYa
    pellicle
    @fader@fader
    Great work.Thanks for posting.

    I can't imagine anyone saying it can't be done hand held but of course better tools make it easier.

    I've done this for some years using PTGui, but that is paid ware. Back in 2010 it was streets ahead of Hugin, but the gap has closed imo. Especially with hugin being free.

    If anyone isn't fond of Hugin then I would point then towards PTGui (also based on Panorama Tools), just be aware its not free
     
    Last edited: Mar 10, 2017
    • Like Like x 1
    • Informative Informative x 1
  19. Balinov

    Balinov Mu-43 Regular

    74
    Oct 8, 2015
    Dublin
    Balazs
    thanks fader for the post, for me this was an eye opener, reminding how stupid I was a month ago in Algarve, Portugal with all those amazing seastacks, arches, beaches that I've forgot to do pano shoots...will give Hugin a try now (tried 3 years ago to stitch a pano series taken @ top of the Rock, Gibraltar, but I couldn't get good result out of it..only with PS pano feature.

    Also, big KUDOS to Chris5107 to mention ICE...I gave it a go yesterday on a 10 expo material I shoot in Wicklow Mountains during Xmas...It does take EM5MK1's ORF with no harm and got impressive results! the Content aware feature is just simply amazing!
     
    Last edited: Mar 10, 2017
    • Like Like x 2
    • Appreciate Appreciate x 1
  20. barry13

    barry13 Super Moderator; Photon Wrangler Subscribing Member

    Mar 7, 2014
    Southern California
    Barry
    I tried ICE last night too; I'm guessing that it takes the JPEG preview from the ORF. Regardless, it works well.
     
    • Agree Agree x 1