Difference between revisions of "High resolution film transparency digitalization using macro lens and stitching"

From PanoTools.org Wiki
Jump to navigation Jump to search
(9 intermediate revisions by one other user not shown)
Line 13: Line 13:
 
range. The best is still drum scanning but these are becoming even  
 
range. The best is still drum scanning but these are becoming even  
 
harder to come by and of course extremely expensive to buy new.
 
harder to come by and of course extremely expensive to buy new.
 +
There are still some drume scanning services around, so if you want
 +
the best possible you should probably go for that, but it will cost.
  
 
So what about using a macro lens, a digital 35mm camera and a light  
 
So what about using a macro lens, a digital 35mm camera and a light  
Line 26: Line 28:
 
usually crop the borders some).
 
usually crop the borders some).
  
I recommend a 16+ megapixel APS-C camera for 35mm transparencies and a  
+
I recommend a 12+ megapixel APS-C camera for 35mm transparencies and a  
 
20+ megapixel full-frame camera for medium format. At 1:1 macro  
 
20+ megapixel full-frame camera for medium format. At 1:1 macro  
 
distance (near limit for most macro lenses) the lens covers the same  
 
distance (near limit for most macro lenses) the lens covers the same  
Line 38: Line 40:
 
may be a better solution.
 
may be a better solution.
  
Why mess around with stitching at all? To get professional level
+
Why mess around with stitching at all? To get higher resolution so you  
resolution so you can make large high quality prints! This tutorial is
+
can make large high quality prints! However, how much resolution you
not about getting "ok" results (then just use a flatbed, or shoot the  
+
need will depend on the situation, so in some cases you can shoot the
whole frame at once without stitching), this is about getting very high  
+
whole frame at once. Fine-grained film has a native resolution of about
quality, and really extract the detail that is on fine-grained film.
+
4000 ppi, which corresponds to about 21 megapixels on 36x24mm, this is
 +
also a typical scanning resolution of high quality scans. Note that you
 +
start see grain long before you have outresolved the film's finest
 +
details.
  
 
==Equipment==
 
==Equipment==
Line 88: Line 93:
 
macro lenses usually do.
 
macro lenses usually do.
  
At full-frame f/8 the depth of field is about 0.6mm. This is small, and  
+
At full-frame f/8 the depth of field is about 0.6mm. This is small  
one of the major challenges doing this is to keep the film within the  
+
(much larger than in a flatbed scanner though), and one of the major
DOF.
+
challenges doing this is to keep the film within the DOF.
  
 
If you have mounted slides, film flatness is usually not a problem if  
 
If you have mounted slides, film flatness is usually not a problem if  
Line 96: Line 101:
 
and film which is necessary to avoid newton rings.
 
and film which is necessary to avoid newton rings.
  
If you have unmounted slides, then precisely cut out a frame in  
+
For 35mm film film curl is rarely a problem even if not mounted in a
cardboard, tape the slide to one side (not all sides, almost impossible
+
slide frame. Then I precisely cut out a frame in cardboard and tape
to make perfect, the slide film will curl, at least if 6x6 medium
+
the film to it, it it will then be flat. This cardboard frame will
format). This cardboard frame is to give some space to the light table,  
+
also give some space to the light table, and avoid light leaks on the
and avoid light leaks on the side of the film. All light must come from  
+
side of the film. All light must come from the back of the film or  
the back of the film or else you will get contrast problems.
+
else you will get contrast problems.
  
Curl is a problem with larger slides (medium format), but one can
+
For medium format film curl becomes a real problem. Taping to a frame
fortunately make use of the fact that only a smaller part of the film  
+
may work for 645, but already at 6x6 it becomes truly difficult to  
is shot at a time. You can thus make an overlay from a smooth flat hard
+
have it flat. One option is to cut out two frames in a plastic material
material with a 30x45 cutout or so which you lay on top that press down
+
(fibre free) which have about 40x30mm opening and sandwich the film
the film, and you move the light opening to fit where you currently
+
between those and move around. By only exposing a window of the film  
shoot. Put a lens shade or similar on top of the cutout to weigh it
+
at a time the film is held flat.
down and to avoid stray light from the sides. Instead of a cutout you
 
can have two plastic cards or similar put on top of the film leaving a  
 
gap for the camera.
 
  
If you are going to digitize many unmounted slides, make a quick and
+
Another option is wet mounting, I have not tried that myself but may be
effective reusable frame mount, since one otherwise may end up spending
+
worth investigating. Then you sandwich the film between glass fluid and
most time mounting the film.
+
a thin transparent film.
  
 
When film is mounted as flat as possible, focusing is the next  
 
When film is mounted as flat as possible, focusing is the next  
Line 122: Line 124:
 
rail, lock it down and the check the corners with zoomed in live view  
 
rail, lock it down and the check the corners with zoomed in live view  
 
and adjust with the levelling head if necessary.
 
and adjust with the levelling head if necessary.
 +
 +
It may be tempting to re-adjust leveling or focusing when moving around
 +
the film, but if you have to do that your setup is not stable enough or
 +
you have film curl. Having a really stable tripod, floor (and no
 +
stomping around) and light table is vital.
  
 
You will notice that at f/2.8, which is what you'll probably focus in,  
 
You will notice that at f/2.8, which is what you'll probably focus in,  
Line 135: Line 142:
  
 
For APS-C and shooting 35mm when the film area covered is smaller and  
 
For APS-C and shooting 35mm when the film area covered is smaller and  
film curl usually less of a problem you may attempt f/5.6. Actually  
+
film curl or lack of perpendicularity is usually less of a problem you
you'd probably want to, since the small pixel cameras start to loose
+
may attempt f/5.6. Actually you'd probably want to, since the small  
significant resolution due to diffraction if used at f/8.
+
pixel cameras start to lose significant resolution due to diffraction
 +
if used at f/8.
  
 
Then there is the dust problem. A transparency shot this way will never  
 
Then there is the dust problem. A transparency shot this way will never  
Line 145: Line 153:
 
dust spots as anchors for control points :-).
 
dust spots as anchors for control points :-).
  
Use a dust blower, a soft brush and possibly burn candles close to the  
+
Use a dust blower, a soft brush and possibly burn candles or run a
light table to cause an upward air flow to keep away as much dust as  
+
vacuum cleaner close to the light table to cause an upward air flow  
possible.
+
to keep away as much dust as possible. Make sure humidity is not too
 +
low. You could go to extremes and put the setup in a tent with
 +
filtered air, but start easy and see how it works for you. The larger
 +
the film, the more dust problem you will have due to the larger area.
  
 
Watch out for vibrations. Mirror up (typically shooting in live view  
 
Watch out for vibrations. Mirror up (typically shooting in live view  
Line 157: Line 168:
 
Shoot RAW in manual mode and adjust exposure as close to clipping as  
 
Shoot RAW in manual mode and adjust exposure as close to clipping as  
 
possible, but do not clip! Rather use some safety margin than clip.
 
possible, but do not clip! Rather use some safety margin than clip.
 
  
 
==Pre-processing==
 
==Pre-processing==
Line 169: Line 179:
  
 
* chromatic abberation
 
* chromatic abberation
* barrel/pincushion distortion
+
* (barrel/pincushion distortion)
 
* (vignetting)
 
* (vignetting)
 
* color reproduction (apply icc profile, see color management)
 
* color reproduction (apply icc profile, see color management)
Line 188: Line 198:
 
time.
 
time.
  
Barrel/pincushion correction is for normal panorama projects better to  
+
Barrel/pincushion correction is normally better to let Hugin do. My
let Hugin do. However, my experience for this special macro application
+
experience is however that in this type of stitching Hugin can overdo its
is that the Hugin optimizer does not behave that well as it does for
+
barrel correction, so one may need to compensate on the final output.
normal panoramas, here often overdoing lens corrections. Therefore I
+
Correcting barrel distortion in pre-processing often leads to worse
recommend correcting this in pre-processing as precise as possible.
+
stitching results though (when Hugin does not have the barrel parameter
Shoot something straight near the edges of the lens and adjust
+
to play with), so I choose to leave barrel distortion uncorrected.
correction parameters the line becomes straight.
 
  
 
The lens I have used here has extremely low vignetting, so vignetting  
 
The lens I have used here has extremely low vignetting, so vignetting  
 
correction for that was unnecessary. Hugin can also correct for  
 
correction for that was unnecessary. Hugin can also correct for  
 
vignetting (not a part of layout optimization, so it won't disturb), so  
 
vignetting (not a part of layout optimization, so it won't disturb), so  
it is a matter of taste were you correct it. Corrected in pre-
+
it is a matter of taste where you correct it. Corrected in pre-
 
processing you save some time in stitching, then you can skip the  
 
processing you save some time in stitching, then you can skip the  
 
exposure-tab alltogether.
 
exposure-tab alltogether.
Line 207: Line 216:
 
the stitched tiff again in your favourite RAW converter or photo edit  
 
the stitched tiff again in your favourite RAW converter or photo edit  
 
software.
 
software.
 
  
 
==Color management==
 
==Color management==
  
 
Light tables usually have cold cathode lamps which has good but not  
 
Light tables usually have cold cathode lamps which has good but not  
perfect color rendering index (CRI), I consider it good enough for
+
perfect color rendering index (CRI), I consider it good enough though
professional use though (drum scanners do have halogen lamps that have  
+
(drum scanners do have halogen lamps that have CRI 100 which is  
CRI 100 which is required for 100% perfect results). The light from the  
+
required for 100% perfect results). The light from the light table is  
light table is similar to daylight spectrum (will look blueish in an  
+
similar to daylight spectrum (will look blueish in an indoor setting),
indoor setting), but still without calibration the colors in your shots  
+
but still without calibration the colors in your shots will not be  
will not be correct. Either you play around with white balance etc  
+
correct. Either you play around with white balance etc until you get  
until you get a pleasing look, but to get a good consistent result you  
+
a pleasing look, but to get a good consistent result you really need  
really need to calibrate your system.
+
to calibrate your system.
  
 
For this you need to get an IT-8 transparency and get the associated  
 
For this you need to get an IT-8 transparency and get the associated  
Line 240: Line 248:
 
model or light table lamps (lamps can vary a bit) you need to make a  
 
model or light table lamps (lamps can vary a bit) you need to make a  
 
new profile.
 
new profile.
 
  
 
==Hugin stitching tips==
 
==Hugin stitching tips==
  
Theoretically, stitching part would be straightforward. And if you have
+
Theoretically, the stitching part should be straightforward. Unfortunately various micro errors can make it a bit difficult.
a very high precision setup it can be. In practice though, you probably
 
don't have. I don't. It is more important to strive to get every frame
 
as sharp as possible over the whole frame, which may require slight
 
adjustments after film has been moved. Some parameters Hugin stitcher
 
may need to deal with:
 
  
 
* different roll on the images after moving the film on the light table
 
* different roll on the images after moving the film on the light table
 
* very slight yaw/pitch errors due to non-perfect perpendicularity
 
* very slight yaw/pitch errors due to non-perfect perpendicularity
 
* film curl variations after moving
 
* film curl variations after moving
* very slight changes in Z due to focus readjustment
+
* lens distortions which does not 100% match lens distortion model in Hugin
 +
 
 +
Just like your shots never will be 100% dust free, there will not be a 100% perfect stitch. It will be good, but not 100% perfect.
 +
Seams should be invisible inside the picture, but at the film frame border you will probably see say 1-4 pixel mismatch. The grain
 +
structure in a blue sky might be disturbed where the seam passes so in some cases you might see traces of the seam, but no worse
 +
than traces from healing brush after dust removal. You will also likely get some slight distortion of the rectangular frame, it will
 +
probably get a little slightly bent.
 +
 
 +
However, after cropping away the film border the result should be very good. The amount of picture area you lose due to
 +
(very slightly) bent film borders is probably smaller than you typically lose in a film scanner due to limited scan width. A scanner
 +
will always be better at linearity though, so if it is a higher priority than resolution and dynamic range for you, then a scanner
 +
is the way to go.
  
You should first try to only correct for X, Y, and roll, and hopefully you get a good result, but probably not always.
+
Another issue is that there is no Hugin workflow that guarantees the best possible result, variations in control points, optimization
 +
order etc can give slightly different results. If you get a difficult case it may be worthwhile to play around with the parameters.
  
Here is the stitching workflow I use:
+
Here's a good starting point though that should give you good results in most cases:
  
 
* Create new project
 
* Create new project
* Open the 16 bit tiff images (usually four)
+
* Load images
* Don't use the field of view from EXIF, instead pre-set to 1 degree.
+
** If EXIF data lacks, enter a small FOV, say 2 degrees. FOV is only used if yaw/pitch optimization which is normally not used.
* Make control points to connect all images
+
* Goto Images tab and auto create control points with Hugin CPFind
** I'm a bit old-school and always do them manually, about four per image is enough, just try to spread them out widely
+
* Goto control points tab and add only one horizontal or vertical guide in one picture
** Well-placed manual control points often perform better than auto-generated
+
** Typically along the film frame border on the middle row (if only four pictures on the top or bottom row)
* Make horizontal (and possibly also vertical) guides on all images
+
** The horizontal/vertical guide is to instruct Hugin how the image should be rotated
** You should have included film edge on all your frames and that is what you use as guide, the top-down film edges are generally more reliable as guides than the sides
+
** It will be tempting to add guides all away around the frame to get a perfectly retangular frame, but it is generally not worth it - stitching result will be worse, it is better to accept minor distortion in the frame and get invisible seams
* Now the exciting part - the optimizer tab, we are going to do it all custom, Hugin often delivers best results if we optimize the parts that requiure largest corrections first and then add on parameters that need less correction for further optimization
+
* Add one vertical or horizontal guide on only one image to indicate orientation
** First correct X and Y for all but one
+
* Goto the optimizer tab, here we work custom so select "the Custom parameters below"
** Then add roll to all and optimize again
+
** The general idea is to optimize the large movements first to give Hugin a good starting point and then add on more minor parameters and re-optimize
*** Theoretically this would yield perfect result already here, and if you have sub 2 pixel max error you probably should be satisfied.
+
** First opitmize X and Y on all but one
** If not satisfied, then add Z for all but one and yaw and pitch for all, and optimize again
+
** Open GL preview and check the layout - perhaps we need to add some more control points? Blue skies may need help.
** Then open up GL preview, goto move/drag and select drag mode "mosaic", and then drag the image into the center of the view, close and optimize again
+
*** It's easier to see the layout when a rough optimization has been made first, that's why we saved this until now.
*** Typically the optimizer has put the image far from center, and moving it back into the middle again and reoptimizing can give better result.
+
*** Pictures with very small overlap (i e corner overlap between top-left and bottom-right picture) may be better to not have and CPs between them, so it gives Hugin more freedom to adjust where fit matters
** You can try to add lens view as a final parameter but that usually does not improve things.
+
*** Generally Hugin CP find has done a good job so no more points are necessary
 +
** Then add roll to all, and re-optimize
 +
** Then add Z to all but one and barrel, and re-optimize
 +
*** Z should theoretically not be needed, but may help to get a better stitch and will not generally mess upp things
 +
** If there are any outliers (large max error), it is common than CPfind has added a one or a few bad control points, goto Images tab and press "Clean control points" (will remove outliers) and then back to optimizer tab and re-optimize
 +
** Now you will often have "very good fit" with subpixel accuracy
 +
** If you don't seem to manage to get a good enough fit, playing with yaw/pitch optimization may in some cases help
 +
*** Providing a very small FOV such as 2 degrees as a starting point (change in camera and lens tab) may help to avoid getting huge distorting corrections
 +
** If the film frame get too much bent, you can try placing the horizontal/vertical guide on another picture
 
* Open up GL preview
 
* Open up GL preview
 
** Choose rectilinear projection
 
** Choose rectilinear projection
 
** Mosaic-drag so the center is in the center of the image
 
** Mosaic-drag so the center is in the center of the image
 
** Fit/autocrop the view
 
** Fit/autocrop the view
* Skip the exposure tab if input was corrected for vignetting (or the lens had very low vignetting)
+
* If lens does not vignette much, exposure tab can be skipped
* Stitch to 16 bit tiff output, for further processing in your favourite raw converter or photo editor
+
* Goto the stiching tab
 
+
** Press "calculate optimal size"
About field of view: at macro distance a macro lens's field of view is
+
** Exposure corrected low dynamic range output should be selected
usually considerably smaller than its focal length indicates.
+
** Stitch!
Hugin uses field of view as a guide for yaw/pitch corrections and while
 
these often are reqiured to compensate for imperfections in the setup,
 
the Hugin optimizer in this special case often makes too large
 
corrections if the field of view is not set to a small value. Even if
 
the lens has 10 degrees of FOV, try set it as low as to 1 degree. Note
 
that this is not normal Hugin operation, but this macro lens
 
application seems to fall outside normal optimization space.
 
 
 
About vertical/horizontal guides: it is often hard to set up perfect
 
horizontal/vertical guides, they usually conflict a little, so with
 
these involved you often don't get down to subpixel fit. If you get a
 
lot of trouble you can try having only horizontal (or vertical) guides,
 
using the most reliable film edges. Skipping the guides alltogether
 
usually lead to slightly distorted results (non-rectangular frame).
 
 
 
Sometimes I get good result with only X/Y/roll correction, and sometimes
 
I do the whole optimization workflow. A typical fitting result I get on
 
my stiching is 0.5 pixel mean error and 1.1 pixel max, on a bit more
 
troublesome cases I can get 1.4 pixel mean and 5.1 max. Even in such
 
cases enblend will handle the situation excellently for all normal
 
type of images. Sometimes one gets a very good fit earlier then
 
expected in the optimization workflow, and then one should not
 
optimize more, just drag the result into the center fit, crop and stitch.
 
 
 
Be sure to check that the image becomes rectangular. If yaw and pitch is
 
involved it sometimes happens that the shape becomes distorted even if the
 
fit is good. Try add both vertical and horizontal guides if this happens,
 
or avoid using yaw/pitch optimization.
 
  
If optimization seems hopeless, it may be the case that the film was too
+
To go from "very good fit" to 100% perfect, Hugin would need rubber sheeting to correct the small residual errors. Perhaps we'll see that in the future. Rubber sheeting adjustments could also make the frame perfectly rectangular. For now I would say that it is "good enough".
curled or you had some other problem during shooting leading to distorted
 
input.
 
  
The exact setup and shooting technique may vary a bit from mine, which  
+
If you seem to have an impossible case, try to reshoot and be very careful with film flatness and perpendicularity. You can also try to have a bit more overlap and shoot more pictures, say 8 fullframe pictures of a 6x6 medium format slide instead of 6 (which is the minimal possible). Large overlaps usually give better stitches, but on the other hand consumes more shooting time.
means that there may be an optimization order that works better for
 
your system. Feel free to experiment. The key concept here is applying
 
a very narrow FOV and correct for yaw and pitch although one
 
theoretically should not need to.
 
  
 
==Post-processing==
 
==Post-processing==
Line 332: Line 320:
  
 
The big thing is however dust and scratch retouching, which is kind  
 
The big thing is however dust and scratch retouching, which is kind  
of mandatory, they digitized images are never 100% dust free. As a
+
of mandatory, digitized images are never 100% dust free.
Linux user it is unfortunately hard to find a photo editor that has a
+
Most image editors provide a healing brush to remove these artifacts.
good healing brush and supports 16 bit tiff. If you are going to use
+
As a Linux user, GIMP is the most popular choice; 16-bit tiff files are
Gimp it is only 8 bit so you have to live with that. In the Mac/Windows
+
supported since version 2.9.2.
world there are many alternatives, but most of them are rather
 
expensive if you just need the healing brush. PhotoLine is one of the
 
more affordable ones. If one wants to, one can make the dust healing on
 
a separate layer to avoid modifying the original.
 
  
 +
In the Mac/Windows world there are many alternatives, but most of them
 +
are rather expensive if you just need the healing brush. PhotoLine is
 +
one of the more affordable ones. If one wants to, one can make the dust
 +
healing on a separate layer to avoid modifying the original.
  
 
==HDR==
 
==HDR==

Revision as of 10:24, 24 September 2018

Introduction

Say you have a bunch of medium format film negatives or transparencies you want to digitize. What are your options?

Flatbed scanners are poor - always out of focus, the best consumer scanners only yield around 2300 ppi real resolution (even if scanning at 6400 or more!) and dynamic range is often poor (=crushed noisy shadows). Dedicated tabletop film scanners are much better but for medium format they are hard to come by these days and are quite expensive. They usually scan at 3000 - 3200 ppi and unlike flatbed scanners they deliver the resolution, and usually have better dynamic range. The best is still drum scanning but these are becoming even harder to come by and of course extremely expensive to buy new. There are still some drume scanning services around, so if you want the best possible you should probably go for that, but it will cost.

So what about using a macro lens, a digital 35mm camera and a light table? Equipment you may already own. Yes - it is possible and if done correctly you get very good results, much better than flatbeds and on par or even exceeding dedicated tabletop film scanners.

This method is also applicable to 35mm film transparencies, but since 35mm tabletop film scanners are relatively cheap and often good quality that can be a more practical alternative. Still I do use macro lens digitalization for 35mm, to get that little extra in resolution and dynamic range (HDR) and cover 100% of the film frame (film scanners usually crop the borders some).

I recommend a 12+ megapixel APS-C camera for 35mm transparencies and a 20+ megapixel full-frame camera for medium format. At 1:1 macro distance (near limit for most macro lenses) the lens covers the same area as the sensor, that is 24x36mm for a full frame sensor and about 15x24mm for APS-C, meaning that you will cover the film area with four frames, which then is stitched in Hugin.

If you use a full-frame sensor on 35mm film there is no need to stitch (film size = sensor size), but one typically wants higher sample resolution on 35mm film and then stitching with an APS-C camera may be a better solution.

Why mess around with stitching at all? To get higher resolution so you can make large high quality prints! However, how much resolution you need will depend on the situation, so in some cases you can shoot the whole frame at once. Fine-grained film has a native resolution of about 4000 ppi, which corresponds to about 21 megapixels on 36x24mm, this is also a typical scanning resolution of high quality scans. Note that you start see grain long before you have outresolved the film's finest details.

Equipment

You will need

  • A fairly high resolution digital camera
  • A good quality macro lens suited for repro photography
    • low distortion, sharp corners, flat focal plane
  • A light table
  • Copy stand or corresponding arrangement

I have myself used a Canon 5D mark 2 (21 megapixel) as full-frame and a Canon 7D (18 megapixel) as APS-C. I have used the Sigma AF 150mm f/2.8 EX DG HSM APO Macro OS lens.

The 5Dmk2 with this lens produces about 3600 ppi of resolution (out of 3900 in pixel density) at f/8 over the full area, while the 7D produces about 5100 ppi out of 5900 at f/5.6. This have been tested with a resolution test slide of the same type used for testing film scanner resolution. In other words, the 5D resolution exceeds a typical medium format film scanner (3200 ppi) and 7D a 35mm film scanner (4000 ppi).

Concerning copy stand, I have actually used a regular tripod and a 90 degree bracket built from arca swiss-based pano head, and attached a focus rail to that so the camera is perpendicular towards the ground, and just place the light table under. I also got use from my leveling head from the pano head setup. Focus rail allows me to finetune center focus distance, and the leveling head to fine-tune perpendicularity to get sharpness in the corners.

Concerning light tables there are cheaper thin portable ones, and more expensive larger ones. The color rendition is probably good enough or maybe even the same on the cheaper ones, but the more expensive have probably better light uniformity. I use a thin portable type and think it produces good enough results, i e the small light variance it has is not detectable when passed through real images.

Shooting tips

For full-frame f/8 is the aperture to use. f/5.6 may yield a slighter sharper image due to less diffraction, but the depth of field becomes impossible. For the smaller area the APS-C frame covers f/5.6 is feasible. You need a lens that perform well at these apertures, which macro lenses usually do.

At full-frame f/8 the depth of field is about 0.6mm. This is small (much larger than in a flatbed scanner though), and one of the major challenges doing this is to keep the film within the DOF.

If you have mounted slides, film flatness is usually not a problem if they are well-mounted. You also get some air between light table glass and film which is necessary to avoid newton rings.

For 35mm film film curl is rarely a problem even if not mounted in a slide frame. Then I precisely cut out a frame in cardboard and tape the film to it, it it will then be flat. This cardboard frame will also give some space to the light table, and avoid light leaks on the side of the film. All light must come from the back of the film or else you will get contrast problems.

For medium format film curl becomes a real problem. Taping to a frame may work for 645, but already at 6x6 it becomes truly difficult to have it flat. One option is to cut out two frames in a plastic material (fibre free) which have about 40x30mm opening and sandwich the film between those and move around. By only exposing a window of the film at a time the film is held flat.

Another option is wet mounting, I have not tried that myself but may be worth investigating. Then you sandwich the film between glass fluid and a thin transparent film.

When film is mounted as flat as possible, focusing is the next challenge. You absolutely need live view with zoom for this. In my suggested setup one focuses on the center of the frame using the focus rail, lock it down and the check the corners with zoomed in live view and adjust with the levelling head if necessary.

It may be tempting to re-adjust leveling or focusing when moving around the film, but if you have to do that your setup is not stable enough or you have film curl. Having a really stable tripod, floor (and no stomping around) and light table is vital.

You will notice that at f/2.8, which is what you'll probably focus in, the DOF is about 0.1mm and at then it is impossible to have all parts of the frame in sharpest focus. If your lens have lots of field curvature then it may be hopeless, but even with a good lens the marigins are too small at f/2.8. However by careful adjusting you can get all parts into close-to-sharpest-focus which is good enough when you take the shot at f/8 (when DOF increases to 0.6mm). Focusing correctly is a key part of getting good result. A bad focusing job and your digitalization will be worse than a cheap flatbed scanner would do.

For APS-C and shooting 35mm when the film area covered is smaller and film curl or lack of perpendicularity is usually less of a problem you may attempt f/5.6. Actually you'd probably want to, since the small pixel cameras start to lose significant resolution due to diffraction if used at f/8.

Then there is the dust problem. A transparency shot this way will never be 100% dust free. You will have to accept some dust and include dust retouching into the equation. It is not all bad though, when you later stitch blue featureless skies you'll often find yourself using dust spots as anchors for control points :-).

Use a dust blower, a soft brush and possibly burn candles or run a vacuum cleaner close to the light table to cause an upward air flow to keep away as much dust as possible. Make sure humidity is not too low. You could go to extremes and put the setup in a tent with filtered air, but start easy and see how it works for you. The larger the film, the more dust problem you will have due to the larger area.

Watch out for vibrations. Mirror up (typically shooting in live view mode) and cable release is mandatory. An interesting experiment is to zoom in live view maximally and tap the camera or stomp the floor, and you'll see how easy it is to introduce vibrations, which will take away that resolution edge.

Shoot RAW in manual mode and adjust exposure as close to clipping as possible, but do not clip! Rather use some safety margin than clip.

Pre-processing

Convert the RAW files to a neutral 16 bit prophoto tiff in a high quality RAW converter. To get that final edge on resolution you need a first class demosaicing algorithm. RawTherapee does this well, but there are also other alternatives.

Correct the following properties:

  • chromatic abberation
  • (barrel/pincushion distortion)
  • (vignetting)
  • color reproduction (apply icc profile, see color management)
  • hot/dead pixels

RawTherapee has an auto-mode for chromatic abberation correction, but since film slides themselves may contain abberations from the lenses used when it was shot, it is better to make to use statically tuned CA correction to avoid interference. Make test shots of a resolution slide for example, put in all four corners and find it tuning parameters. Good quality digitalization requires very good CA correction of the lens, so we have high image quality over the whole lens area. Even lenses with low CA usually improves with correction.

Should the lens have much quality issues in the corners one can use large overlaps and crop masks in Hugin to avoid including those in the stitch, but with large overlaps one needs more shots which takes more time.

Barrel/pincushion correction is normally better to let Hugin do. My experience is however that in this type of stitching Hugin can overdo its barrel correction, so one may need to compensate on the final output. Correcting barrel distortion in pre-processing often leads to worse stitching results though (when Hugin does not have the barrel parameter to play with), so I choose to leave barrel distortion uncorrected.

The lens I have used here has extremely low vignetting, so vignetting correction for that was unnecessary. Hugin can also correct for vignetting (not a part of layout optimization, so it won't disturb), so it is a matter of taste where you correct it. Corrected in pre- processing you save some time in stitching, then you can skip the exposure-tab alltogether.

Don't do any further tunings like sharpening and contrast etc, I think it is better to leave that until after stitching when you can open up the stitched tiff again in your favourite RAW converter or photo edit software.

Color management

Light tables usually have cold cathode lamps which has good but not perfect color rendering index (CRI), I consider it good enough though (drum scanners do have halogen lamps that have CRI 100 which is required for 100% perfect results). The light from the light table is similar to daylight spectrum (will look blueish in an indoor setting), but still without calibration the colors in your shots will not be correct. Either you play around with white balance etc until you get a pleasing look, but to get a good consistent result you really need to calibrate your system.

For this you need to get an IT-8 transparency and get the associated text file which contains information of the color properties of that transparency.

You can use Argyll to make an icc profile:

  • Get it-8 target reference text file, often available on the manufacturer's web site.
  • Shoot the it-8 target on the light table, good exposure without clipping
  • Develop from raw, if rawtherapee use "save reference image for profiling" (16 bit tiff gamma 1.0 no input or output profile)
  • Run argyll
    • scanin -v2 -G1 -a -dipn file.tif it8.cht it8ref.txt
    • colprof -v2 -D"Canon 5Dmk2 Gepe lightbox" -qu -am -u file

This generates a matrix type icc profile, LUT is more risky and rarely better for cameras. This profile is then used as input profile when converting RAWs of transparencies shot on the light table and the camera used when the it-8 target was shot. Should you change camera model or light table lamps (lamps can vary a bit) you need to make a new profile.

Hugin stitching tips

Theoretically, the stitching part should be straightforward. Unfortunately various micro errors can make it a bit difficult.

  • different roll on the images after moving the film on the light table
  • very slight yaw/pitch errors due to non-perfect perpendicularity
  • film curl variations after moving
  • lens distortions which does not 100% match lens distortion model in Hugin

Just like your shots never will be 100% dust free, there will not be a 100% perfect stitch. It will be good, but not 100% perfect. Seams should be invisible inside the picture, but at the film frame border you will probably see say 1-4 pixel mismatch. The grain structure in a blue sky might be disturbed where the seam passes so in some cases you might see traces of the seam, but no worse than traces from healing brush after dust removal. You will also likely get some slight distortion of the rectangular frame, it will probably get a little slightly bent.

However, after cropping away the film border the result should be very good. The amount of picture area you lose due to (very slightly) bent film borders is probably smaller than you typically lose in a film scanner due to limited scan width. A scanner will always be better at linearity though, so if it is a higher priority than resolution and dynamic range for you, then a scanner is the way to go.

Another issue is that there is no Hugin workflow that guarantees the best possible result, variations in control points, optimization order etc can give slightly different results. If you get a difficult case it may be worthwhile to play around with the parameters.

Here's a good starting point though that should give you good results in most cases:

  • Create new project
  • Load images
    • If EXIF data lacks, enter a small FOV, say 2 degrees. FOV is only used if yaw/pitch optimization which is normally not used.
  • Goto Images tab and auto create control points with Hugin CPFind
  • Goto control points tab and add only one horizontal or vertical guide in one picture
    • Typically along the film frame border on the middle row (if only four pictures on the top or bottom row)
    • The horizontal/vertical guide is to instruct Hugin how the image should be rotated
    • It will be tempting to add guides all away around the frame to get a perfectly retangular frame, but it is generally not worth it - stitching result will be worse, it is better to accept minor distortion in the frame and get invisible seams
  • Add one vertical or horizontal guide on only one image to indicate orientation
  • Goto the optimizer tab, here we work custom so select "the Custom parameters below"
    • The general idea is to optimize the large movements first to give Hugin a good starting point and then add on more minor parameters and re-optimize
    • First opitmize X and Y on all but one
    • Open GL preview and check the layout - perhaps we need to add some more control points? Blue skies may need help.
      • It's easier to see the layout when a rough optimization has been made first, that's why we saved this until now.
      • Pictures with very small overlap (i e corner overlap between top-left and bottom-right picture) may be better to not have and CPs between them, so it gives Hugin more freedom to adjust where fit matters
      • Generally Hugin CP find has done a good job so no more points are necessary
    • Then add roll to all, and re-optimize
    • Then add Z to all but one and barrel, and re-optimize
      • Z should theoretically not be needed, but may help to get a better stitch and will not generally mess upp things
    • If there are any outliers (large max error), it is common than CPfind has added a one or a few bad control points, goto Images tab and press "Clean control points" (will remove outliers) and then back to optimizer tab and re-optimize
    • Now you will often have "very good fit" with subpixel accuracy
    • If you don't seem to manage to get a good enough fit, playing with yaw/pitch optimization may in some cases help
      • Providing a very small FOV such as 2 degrees as a starting point (change in camera and lens tab) may help to avoid getting huge distorting corrections
    • If the film frame get too much bent, you can try placing the horizontal/vertical guide on another picture
  • Open up GL preview
    • Choose rectilinear projection
    • Mosaic-drag so the center is in the center of the image
    • Fit/autocrop the view
  • If lens does not vignette much, exposure tab can be skipped
  • Goto the stiching tab
    • Press "calculate optimal size"
    • Exposure corrected low dynamic range output should be selected
    • Stitch!

To go from "very good fit" to 100% perfect, Hugin would need rubber sheeting to correct the small residual errors. Perhaps we'll see that in the future. Rubber sheeting adjustments could also make the frame perfectly rectangular. For now I would say that it is "good enough".

If you seem to have an impossible case, try to reshoot and be very careful with film flatness and perpendicularity. You can also try to have a bit more overlap and shoot more pictures, say 8 fullframe pictures of a 6x6 medium format slide instead of 6 (which is the minimal possible). Large overlaps usually give better stitches, but on the other hand consumes more shooting time.

Post-processing

The look of film transparencies is usually just the way you want them freshly digitized, just adjust exposure to fit the highlights just below clipping. That's normally all it takes when color calibration has been used. Negatives need to be reversed to positives of course.

The big thing is however dust and scratch retouching, which is kind of mandatory, digitized images are never 100% dust free. Most image editors provide a healing brush to remove these artifacts. As a Linux user, GIMP is the most popular choice; 16-bit tiff files are supported since version 2.9.2.

In the Mac/Windows world there are many alternatives, but most of them are rather expensive if you just need the healing brush. PhotoLine is one of the more affordable ones. If one wants to, one can make the dust healing on a separate layer to avoid modifying the original.

HDR

Some film transparencies are very contrasty and have very dense shadows. If you want sufficent dynamic range on these to get noise-free shadows in your prints you will need to do HDR. Use the camera's built in bracketing function, shoot in live view and use a mount to be sure that the camera is not disturbed during and between the bracketed shots. Two shots 4-6 stops spaced is usually good.

At the time of writing (Hugin version 2011.4) I have not got Hugin's builtin HDR function to work well (hugin_hdrmerge has some issues) so I have used external HDR software in these cases.