Dr Mike J Smith

Plymouth University

Personal Webpage

Email me
T:+44 (0)207 099 2817

Mike Smith

RSS FeedRSS Feed






Study of Objects: External Camera Image Processing

Sat, 31 Jan 2015

This post is slightly out-of-sequence with the earlier ones (I had meant to cover our first trial in West London scanning Paolozzi's Krazy Kat archive) but it does follow neatly from the last post on the technical setup for our external camera..... so in the following I want to cover the workflow we used to take the RAW imagery off the Nikon D810 (hired from Calumet) all the way through to the production of cubemaps for import in to Cyclone. Remember, there are 48 images per scanner location and seven locations making a total of 336 images each weighing in at 40Mb. Deep breath... here goes:

1. Import: all import of the RAW imagery was performed using Adobe Lightroom (LR). This maintains all the original camera data and allows us to manipulate the image prior to export.

2. Image Optimisation: once in LR, the main optimisations are to correct the white balance, boost contrast, sharpen edges (through both sharpening and clarity) and remove any chromatic aberations. Give that the studio remained under the same internal lighting and the camera had fixed settings we could copy the corrections to all photos (Ctrl-Shift-C in LR!). The copy settings are shown in the image below. What this did highlight was that the strip light placed under the cabin bed had a different colour temperature to the spot lights on the ceiling which adds a colour cast to the photographs.

3. Focus Stacking: with the image optimised we then used the open source Enfuse (good summary)) to merge the exposures, part of the Hugin development community (which we were more familiar with, althouh PTGui also uses it). The manual on the Enfuse website provides much more detail and shows the range of options open to blend images together. When looking at the two overlapping images we shot for each location we realised that the overlap was actually very small and default settings for Enfuse produced very bad results. We therefore had to experiment with a range of settings to find a viable alternative. Enfuse uses three primary blending options: exposure, saturation or contrast. For focus stacking its contrast that needs to be weighted fully and the blending then uses a window size (in pixels) to perform this. The manual suggests 3-5 but we realised that the difference in focus between our two images produces a "halo" of unfocused area around objects. Experimentation showed that a 31 pixel window worked well. The other key setting was to opt for "hard-mask" which avoids averaging pixels providing a sharper image (but at the expense of noise). We also found changing the method to convert the colour image to greyscale (the "grey-projector") also improved the results (in this case selecting luminance). To process the 336 images, we did this automatically directly within LR using LR/Enfuse, an LR plugin that can batch automate the whole process. It also allows you to align the images prior to blending - this can take account of any minor shifts of the camera on the tripod between exposures. To process 48 photos for a single scanner location took about 1 hour. For those using a command line the options are:

enfuse.exe -o --no-ciecam --exposure-weight=0 --saturation-weight=0 --contrast-weight=1 --contrast-window-size=31 --depth=16 --gray-projector=luminance --compression=95 --hard-mask

4. Panorama Stitching: with the optimisation and focus stacking of the individual photos complete we now needed to stitch them together in to a single panorama. We experimented with Hugin, open source image stitching/blending software. In the past you had to manually process control points across all your images, a laborious and not necessarily accurate (!) process. The Hugin team have subsequently implemented the SIFT algorithm to automatically detect these - it generally works well but, for whatever reason our panoramas were often disjointed. We therefore switched to PTGui (which originally was a GUI for the open source PanoTools but has since written many of its own algorithms). The default options for import, control point acquisition and pano generation worked well with no specific requirements.

5. Cubemap Generation: PTGui also allows you to create cubemaps (noted in Leica's materials) from the "Tools->Convert to QTVR/cubic" menu. As per the Leica instructions, we selected cube faces (6 files) as the output, increased the JPG quality and changed the cube face sizes to 4096.

Below is a low-res example of a pano from Paolozzi's bed - once I find a hosting service I'll post a full res pano.

in close association with hijack and Dacapo

[/remote_sensing] permanent link


Add Comment
(all comments will be moderated)

Comments are closed for this story.