Category Archives: Behind the picture

Example Files for Hugin

I am making available image files and the Hugin PTO file for the purposes of education and training. I presuppose some familiarity with Hugin. Tutorials on the basic functionality can be found here.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Panorama Preview

Suggested steps:

  • Download Example Files (from above) and extract to folder
  • Open Hugin and import source files
  • Set the lens parameters (Focal Length 8.7mm, Crop 1.5), Full Frame Fisheye for images taken around at 90 degree yaw intervals, Circular Fisheye for the Zenith and Nadir images. Assign lenses so that the the first 4 images are Lens 0, Zenith is Lens 1, Nadir is Lens 2.
  • Mask each image. For the first 4 images, mask off the tripod/panohead and any other extraneous objects, also the corners. Set crop circles for the Zenith and Nadir.
  • Now add control points to each overlapping pair of images. Concentrate on placing a good spread of points along the centre of the overlapping regions. There is no need for placing points away from the likely seam lines.
  • Add vertical control points/lines so that the pano will be level
  • Start optimising the position, gradually including field of view, barrel, then everything except translation. Periodically check for control points with large errors, correct if necessary. Use the Custom Optimisation options to fine tune the process.
  • Check that the geometry of the assembly is satisfactory using the Preview Window.
  • Start on optimising exposure. Choose Low Dynamic Range, then Custom. Deselect optimisation of Vignetting and Camera Response. Optimise just the exposure values, the the Red and Blue Multipliers.
  • Finally, stitch and export the panorama in your preferred format.
Final Stitched Panorama – Projection: Equirectangular (2) FOV: 360 x 180 Ev: -0.42

You try stitching the image using the automatic mode in Hugin, or in any other panoramic programme of your choice.

London Calling

I had the opportunity to visit London and managed to find some time to shoot some panoramas. The weather wasn’t ideal with scattered showers and cloudy skies but the rain managed to hold off for the time I had available. In the lead up to Christmas, festivities were in full swing so Christmas lights, trees, and markets would provide colourful subjects.

Piccadilly Circus

Piccadilly Circus at Dusk. This is a popular area for panoramas. The residual wet sheen gives some interesting reflections. It was very busy so I had to take many shots to try to get frames that would stitch together without too many mismatched seams. The high contrast in the scene means that bracketing is required to capture the highlights.

Irving Street

Irving St, off Leicester Square, Luckily the foot traffic wasn’t too heavy so I could set up my tripod without being in the way. The dynamic range of the A7m3 is sufficient to be able to cope with the contrast in this scene without bracketing.

Trafalgar Square

Trafalgar Square. It was a challenge to find a spot where there were no strong shadows to complicate the stitch. I chose a spot directly under one of the lamps. Some bracketing could have been useful to deal with the extreme contrast between the lit stalls and the rest of the night scene. Focus bracketing could also have been used to make the lamp post sharper.
Centre of Trafalgar Square. I’ve tried to balance the Christmas tree and Nelson’s Column. Luckily the plaque in the centre was at just the right position.

London Eye

London Eye. This is a retaken pano of a previous one taken many years ago. This was a straightforward shoot, 4+1+1 and no bracketing. The latitude of the A7m3 was impressive.

Waterloo Place

Waterloo Place off Pall Mall. Another straightforward pano shoot. Main issue was shadows cast by spotlights on the corner buildings. These were removed in Photoshop.

Covent Garden

St Paul’s Church, Covent Garden. St Paul’s is also known as the “Actor’s Church”. Some flare spots due to the bright lights were removed in Photoshop prior to stitching.

Shooting Details

I use a Sony A7m3 “fullframe mirrorless” camera. Previously I used a Sony A5100 with an APS-C sized sensor. They both have 24 megapixels but the A7m3 has considerably better dynamic range and high ISO performance.

I use the Samyang 12mm/2.8 Fisheye lens. This is a “fullframe fisheye” lens, “fullframe” refers to the fact that the image circles covers the entire sensor. Previously I used the Samyang 8mm/2.8 Fisheye lens that is a “fullframe fisheye” on the A5100 APS-C camera. The 12mm/2.8 has better flare resistance that is noticeable on night scenes.

I use the Nodal Ninja 3 Mk III panohead with Rotator Mini and Nadir Adapter. I upgraded from the Nodal Ninja 3 Mk I/II hybrid that had served me well shooting the Konica-Minolta 7D, Sony A700, A580, A77, NEX-7, and A5100 with a Peleng 8mm, Sigma 10mm, Samyang 8mm/3.5, and Samyang 8mm/2.8 over the years. The new panohead fits my upgraded rig a bit better and the Nadir Adapter is a time saver. I use a Benro C-169M8 Travel Tripod with a Manfrotto 496 ballhead.

Processing Details

The raw files were imported in Capture One 20 Express (for Sony). I selected the frames that would be assembled. There were many spare frames since I would shoot extra shots to capture moving objects (people, cars etc,), high contrast scenes (usually base exposure and -2EV), and to fill in shadows.

Capture One 20 Express for Sony

The selected frames were then adjusted in a batch. First thing is to apply the same white balance setting. Shots taken at night under a variety of mixed lighting can be challenging to get the white balance “right”. Usually, I try to balance the colour temperatures throughout the scene, taking care with the green-magenta shifts that can occur with fluorescent and LED lights. Other common settings include chromatic aberration correction, black level point, sharpness fall-off, and clarity.

Each frame is then adjusted for exposure, It is critical to preserve the highlights, this is done by a combination of highlight recovery and overall exposure. Some shadow recovery can be used to prevent the darker areas being crushed to black but there is no need to fully recover shadows at this stage.

I usually leave the saturation and contrast untouched. These can be adjusted after stitching. Occasionally, I may need to reduce the contrast of the nadir shot so that it blends in with the edges of the other shots.

The adjusted raw files are now exported as 16-bit TIFFs in Adobe RGB colour profile. These are then imported into Hugin for assembly and stitching. There are other good programs for creating panoramas including PTGUI but Hugin has the advantage of being free. Hugin is also quite powerful, allowing detailed control of the alignment and exposure optimisation process. For a more automated solution, PTGUI is probably a better choice.

Masking the source images to remove the tripod and panohead as well as deal with moving objects in the frame.

After the images have been imported into Hugin, the first step is to mask the images to remove the panoramic head and tripod that may intrude into the edges of the frame. The Zenith and Nadir are also cropped to circular regions. It is useful to define the focal length and projection type of the lens, 13.1mm and full-frame fisheye are used for the Samyang 12mm/2.8 Fisheye. I assign the same lens to the horizontal frames and separates ones to each of the Zenith and Nadir. The Nadir in particular will need to be optimised differently to the other frames in order to compensate for the likely shift in position.

Adding control points (CPs) between pairs of overlapping images. It is only necessary to place CPS along the middle of the region of overlap.

Next step is to add control points (CPs) between overlapping frames. There are automatic methods but I prefer to manually add points. I find that I spend more time fixing automatically generated CPs than if I had added them manually. I start off by connecting the horizontal frames. To get a good stitch, all that is needed is that the frames match along a seam line, generally placed along the middle of the overlap region. Hence, I only add CPs along a line that stretches from the top to the bottom of the overlap. For the Nadir, I add 2 to 3 CPs per overlap with the horizontal frames. Extreme distortion parameters will usually need to be used to get it to match up with the rest of the pano.

After the CPs have been added, then the position optimisation process than begin. I start with optimising just the position. Next I optimise position, angle of view, and barrel. Finally, I optimise all parameters except translation. Throughout, I check for any CPs that have large errors as this might indicate that they may be incorrectly placed. I either correct the placement or delete them if there are sufficiently many other CPs.

Images are optimised for position and lens geometry. Brightness differences remain but will be dealt with in the next stage.

Hopefully, after several rounds of optimisation and tweaking of the CPs, the errors will be small (maximum of a few pixels in a 14Kx7K pano) and visually the pano looks aligned with no obvious errors in the preview window. Additional masks may be added to remove moving objects or else control what elements from each frame end contribute to the final pano.

Brightness across frames has been optimised to reduce differences. The zenith does not quite match the other frames since the sky had become much darker over the course of shooting. It still blends in quite well.

The next stage is photometric optimisation. For many years now, panoramic software have been able to cope with source photos shot at difference exposure values and stitch them together in a seamless manner. This allows a more flexible and arguably optimum manner to capture the initial source photos [1]. I will use autoexposure to create a base layer together with bracketing of selected frames to capture blown highlights. In the exposure optimisation stage, Hugin can exposure match all the frames in a near seamless way. I can then export the full pano at various brightnesses which have shadow, mid, and highlight detail separately. These are then combined using Enfuse to produce a single pano that incorporates the detail in both shadows and highlights in a process called exposure fusion.

(Top-Bottom) Over, mid, under-exposed panorama, final exposure fused image.

The exported pano (exposure fused if necessary) from Hugin in equirectangular formal is then post-processed. I use Picture Windows Pro 7 as my main image editor [2], with Photoshop 6 for cases where I need to do spot removal or extensive cloning. First step is to adjust the contrast using curves. I’ll first bring up the shadows as these will be a bit dark as I try to protect the highlights in the previous steps. Then I’ll apply an S-curve to boost mid-range contrast and compress the highlights. The preserved highlights can look unnaturally dark so I’ll bring them up near the top of the histogram without blowing them out.

Curves Adjustment

Sharpening of the image is very important. I’ll perform a large radius unsharp mask, coarse sharpen, and a fine sharpen. The sharpening process utilises pixels in a region hence problems can occur at the +/-180 degree boundary of the equirectangular image. To avoid a visible seam arising from such non-global adjustments, I’ll create a pano 720 degrees (or 1080 degrees) wide before apply the filters. Then I’ll crop out a central 360 degree section to get back to a regular equirectangular projection.

Duplicating the image across the +/-180 degree boundary prevents any seams from being visible due to adjustments such as large radius sharpening (local contrast enhancement).

Final colour adjustment is applied, both selective and global saturation. Any touch up (spots, shadows, or minor stitching errors) are then performed in Photoshop. I produce both a final TIFF and a JPG that is in sRGB for export to the web.

Final image cropped back to 360×180 equirectangular. This is a different version from the panorama at the beginning of the post, I have brightened this one more.

Footnotes

[1] Instead of using the same exposure value for all source frames, you can expose each shot optimally. For example, a scene may have 20 stops of contrast between one direction and the opposite, e.g. sun and shadow. The traditional method would be to use manual exposure and bracket, e.g. -6, -3, 0, +3, +6EV and use the camera DR to capture the ends of the contrast range. The +6EV shot would cover the shadow and the +6EV shot would cover the highlight. But this method is wasteful since usually the contrast in a single shot is less than the full bracket range. Often only a single shot in that direction is required, or else a second bracketed shot will cover the remaining fraction of high contrast cases. Instead of 30 shots (4+1+1 shoot pattern times 5 bracketed shots), it is usually possible to only use 7 or 8 shots in total. The final result is as good as the fully bracketed version but with a considerable reduction in shooting time, this can be significant in low light conditions but can also be a major factor in situations where there are moving objects and/or changing lighting conditions.

[2] Picture Windows Pro 7 is now free. A newer version has been developed by version 7 is still a very useful image editing program. The paradigm is different to that of Photoshop so at first glance it may look to be fairly crude. But it is small, quick, and easy to use for many routine image adjustment tasks.

[3] I have no commercial relationship with any companies or their products mentioned in this post, other than being a satisfied customer of some of them.

Cliffs of Rhossili Bay

Rhossili_millerThis panorama posed a few challenges. Shooting directly into the Sun is difficult in any case but I bracketed several shots to try to preserve detail both in the sky as well as the sea. The lens coatings have controlled the flare with only a small loss of the sharpness. I also had to be careful not to fall into the water when taking shots all around. Shadows are more difficult to control. Shots from different positions are used to cover up occluded areas. These were inserted directly into the panorama project. I timed my a shot to capture the fisherman casting his line.

Lincoln Cathedral and Tripods

DSC08070
Taken handheld, NEX-7 with 35mm/1.8 ISO100 F3.5 1/20th. This was a grab shot. If I had not been on my way somewhere, I’d have taken the time to set up my tripod and use a smaller aperture and perhaps bracketed exposures. I was fortunate that the image stabilisation kept the image sharp, and that the NEX-7 sensor has excellent dynamic range so is able to capture the highlights in the stain glass as well as the shadow detail.

I had the pleasure of visiting Lincoln Cathedral over the weekend and was very pleasantly surprised by their very photographer friendly attitude towards tripods. When I asked the guide whether they were allowed the response was, “of course”. There were no restrictions and I spent quite some time taking panoramas of various parts of the building.

However, I was the only person to be using a tripod. There were many taking handheld shots with a myriad of cameras ranging from phones, compact cameras, a few mirrorless and quite a few DSLRs. The lighting could be best described as subdued so I cannot image their photos were able to do justice to the magnificent architecture. Unfortunately the weather outside was overcast so I did not bother to gather external shots, that will have to wait for a return visit when the weather is better.

There are so many beautiful places and buildings with photography restrictions, tripod bans being a particularly significant one. Whether it is due to a perceived commercial threat  from professional photographers, or overly paranoid health and safety grounds, such bans are counterproductive by discouraging the very enthusiasts who will promote the sights with quality imagery around the web. The experience from Lincoln is that there were absolutely no issues with tripods getting in the way. Commonsense is really all that is needed to prevent them being a problem. Much as I espouse tripod use for getting better photographs, the majority of photographers will not use them.

So I heartily recommend Lincoln Cathedral as a wonderful place to visit, even if you are not a photographer. They deserve your support for their enlightened policy towards photography. You should also try to catch Evensong to sample the wonderful acoustic.

Self-walking Dog

DSC06525-1One of my photographic inspirations is Elliot Erwitt, a street photographer who has a penchant for taking dog photos. I didn’t really understand the attraction until I started noticing our 4 legged companions on the street, often being dragged along, or dragging along their owners. The photo at the top of this post is one of those fortunate images coming at the end of a generally unsuccessful outing.

Sometimes nothing really clicks: the light is too flat, the faces too glum, you see the same poses or cliches and just can’t capture anything worth keeping. At this point it may be time to try something new, a different perspective, different subjects, or a change of modus operandi. My usual subject matter is that of people engaged in interesting activities or expressions, the look of joy shared between a couple, the conjunction of characters, or simply a story of the everyday. None of that was working one lunch break, I couldn’t seem to break the spell of dreary photos so I decided to cut my losses and head back to the office.

It was then I spotted coming towards me two dogs with their owner. One was being lead on a leash, the other had the leash in its mouth and was dutifully pacing besides the other two. I quickly made sure my settings were suitable for a moving subject in overcast light (wide aperture and high ISO) lowered my camera to knee level and shot several photos as they continued towards me. It was the last shot, framing just the lone dog that is shown.

I forced myself to keep on walking and only half a street away did I allow myself to review the shots. With trepidation I magnified the image and a feeling of relief flowed through me as I saw that it was adequately sharp and in focus. It made my day.

The Power of Raw

DSC05923Original
Original image, default curves in Lightroom. Shadows crushed to black but I have exposed to retain highlights.

If your camera can shoot “RAW” photos instead of JPG, use it. I won’t go into the arguments people have against shooting RAW, I think the best way to make the case is through an example. To the left is a shot at sunset taken under a bridge. It’s not a particularly great photo either technically or artistically, but I hope illustrates the degree of control you have when shooting RAW.

This is as it would have come out of the camera if shot in JPG (I used the default settings in Lightroom to simulate this). There is extreme contrast, ranging from the setting sun, the back-lit buildings and barge, and the ground in shadow. The colours are muted compared with what I had experienced watching the sun go down. Setting the white balance is always tricky at sunset or sunrise as the sun itself is strongly filtered to give warm light, whereas the rest of the sky gives a blue cast.

I exposed the shot so that the sunset would not be overblown. I used a low ISO, medium aperture and a wide angle lens to capture the scene. I made sure than there was little camera shake in the captured shot. If I’d exposed for the shadows, the sunset and sky would have been blown out. It would have been very difficult, if not impossible, to recover that amount of overexposure, especially from a digital capture. However, the dynamic range of my camera is sufficiently high that I should be able to dig out the detail in the shadows from this shot.

DSC05923After importing the RAW file into Lightroom, I cropped, straightened, and adjusted the image using the exposure, black and white points, highlight and shadow recovery sliders. I also played around with the whitebalance until I obtained a result that I was happy with. There’s no one “correct” whitebalance in this situation, I simply chose one which balances the blues in the sky and water with the reds and oranges of the setting sun. You can play around with warmer or cooler images to get the impression you desire. The end result of my adjustments is a “neutral” image, one that has detail at both ends of the brightness range and which does not look too unnatural. Even such a normal looking image would have been difficult to produce using film.

DSC05923Extreme
Final adjusted image with added punch. You may prefer a more tasteful result, perhaps more along the lines of the “neutral” version.

To give the image a bit more “punch”, you can adjust the contrast, clarity and vibrance. The highlight and shadows may need a bit of extra recovery, I prefer to retain some detail rather than crushing the blacks or totally blowing out the highlights. I don’t claim that the final result conforms to good taste but is certainly more eyecatching (or eyesearing) than the original photo.

This range of post-capture adjustment is due to shooting RAW. I was able to leverage the information captured by the sensor in a single frame and in Lightroom process it to my needs. Even if you do not perform such extreme modifications to the image, the ability to extract shadows and highlights, together with whitebalance is invaluable. It is all about giving you options for the final image.

Sunset over the Fairy Lochs

Here is another photo from the Highlands. This was take after I had done some spherical panoramas around and in the Loch. Here, you can see both a propeller and a radial piston engine belonging to the B-24 Liberator bomber which crashed here in 1945. There is a memorial to the crew next to the Loch. For this shot, I used the NEX-7 with the LA-EA1 to mount a 16-50mm/2.8 A-mount lens. I set the exposure to f/8 and ISO to 100. Using LiveView, it was easy to make sure I exposed for the sunset so as to not blow out the highlights. It also made manually focussing the lens very easy. As the sun was setting fast, I had to quickly work my way around the Loch in order get some alternate viewpoints and perspectives. I think this one shows the view of the Loch the best.

Editor’s Pick at 360Cities

I have been lucky enough to have several of my panoramas selected as an Editor’s Pick at 360cities.net. The latest was one I took last year and only got around to assembling recently. I had made a similar panorama at the time but it didn’t make it as an Editor’s Pick.

This pano was challenging because of the lighting. The fountains would change colour very frequently. Add  in the movement of the crowd, it meant that I had to double the amount of shots to take in order to make sure I would have a seamless result. Instead of 4 shots in the horizontal plane, I took 8. I also took 2 of the zenith as the colour was changing. As each exposure was 30 seconds plus the same again for dark frame subtraction, this meant standing around for some time. I managed to find a spot in the middle of the fountain where I wouldn’t be hit with any water.

I timed my shots to capture the variety of colours lighting up the fountain. These were blended together in Hugin using masks. The final result was then exported as an equirectangular pano for upload, but I also played around with the Little Planet project you can see above.

Sunset over Shieldaig

I was returning from a hike to the Fairy Lochs with the sun rapidly descending towards the horizon. Some distant cloud cover prevented a truly magnificent sunset but the colours in the sky which remained were still impressive. I have very little time to set up my tripod, make sure my SAL 16-50mm/2.8 lenses was mounted properly onto the NEX-7 via a LA-EA1 adapter, and to set out to find a suitable spot to capture the scene. Luckily there is a beach next to the Shieldaig hotel which was at low tide at the time. I quickly set up the tripod, composed the capture both the sky and beach, and focussed manually, very easy to do using zoomed liveview. I took a few bracketed shots to make sure that I did not blow the sky, using both the live and post-shot histogram. I finally retreated under an onslaught of midges.

After importing the file into Lightroom, I was keen to see just how much detail I had managed to retain in a single frame, from the setting sun to the dimly lit beach. Cranking up the highlight and shadow recovery sliders, I was pleased to see that I could bring out detail both in the sky and the ground without too much trouble. A bit of clarity and vibrance completed the treatment of the photo. Some licence has been taken with the interpretation of the colours, but this more faithfully represents the impression of being there rather than actual photometric values.

Fontaine Saint-Michel

I’ve been going over my back catalogue of unstitched panoramas. These are mostly one which I didn’t have time to assemble at the time, or were lesser priority than other ones. However, this one was challenging to stitch due to the combination of lots of moving objects and the need to take a bracketed exposure for the sky, and I have waited nearly three years before attempting it. My post-process has improved and the tools I use have also advanced which means that I can now more easily assemble difficult panoramas.

The panorama was taken on a visit to Paris in July 2009. It was a lovely summer’s day, sunny but not too hot. The sunset was not going to be too spectacular so I decided to wander around to soak up the ambiance. The Fontaine Saint-Michel is a noted meeting spot for young and old. It had a lively atmosphere so I hung around and set up my tripod. The people near me didn’t seem to have a problem with it so I quickly took a series of shots, especially trying to capture the moving people and allow me latitude during assembly.

I knew at the time that it would be tricky to blend together the shots without cutting people in half. I had many other panoramas to stitch from the trip and I concentrated on the low lying fruit. Waiting three years to attempt this has paid dividends. The masking tools in Hugin and the RAW development in Lightroom 4 have improved immensely. With lots of masking, I was able to assemble a near seamless panorama, and the highlight recovery tool was able to bring down the highlights which helped blend bracketed exposures. Enfuse was then used to exposure fuse three renderings of the scene to adaptively compress the dynamic range into something which looks naturalistic.

I was able to assemble all the elements within Hugin itself without the need to use Photoshop to blend layers, clone or mask elements after stitching. I did my usual post-processing in Picture Windows Pro 6, levels, curves, large-radius sharpening, detail sharpening, and a few colour tweaks.