Inverting raw scans
I have revisited this topic now that I am scanning with a digital camera. See Color film scan processing.
Some background information and a rundown of other methods I looked at along the way can be found on this page.
I scan with a Nikon Coolscan V and Vuescan, and typically shoot some form of Kodak Portra with a bit of Ektar thrown in. The following method might not work for other scanners/software, but maybe some of the information could be useful.
Of course, if your scanner software offers the fine tuned control and good visual feedback, you can skip most of this. Just set the endpoints of your curves in the scanner software and let it use that information to generate an inverted scan. I don’t do this because Vuescan isn’t all that good for it - I’d rather just save out a raw scan and do it quickly in Photoshop.
Obtaining the raw scan
I use the method described in the Removing the mask with Vuescan section to obtain my raw scan files. You don’t have to go through all of the steps I outlined in that list if you don’t want to. It does help ensure that you’ve maximized your ability to capture as much of the range on the negative on each individual channel, but in most use cases, this is probably not that important. Establishing a good base exposure will probably get you 95% of the way there. Likewise, if you don’t have a scanner that can control the individual RGB exposures, you should be able to work with a normal linear scan. Some scanners have other methods for changing the exposure times.
Inverting in Photoshop
The key to this technique of inverting raw scan files is to assign your raw scan a profile that has its gamma set to 1.0. I made one for AdobeRGB and BruceRGB, but you could easily do it for sRGB or ProPhoto if you wanted to. Without this step, the inversion never looks right and you fight with trying to fix the gamma of the image with inadequate tools.
The thinking behind this is as follows: The linear scan has the wrong gamma for viewing. I’m not entirely sure adjusting the gamma in Photoshop drastically does the right thing. Regardless, we want to go roughly from a gamma of 1.0 (linear scan) to something around 2.2. The target gamma is not fixed; what contrast/grade does your final picture need? But it’s close. It’s easier to let the ICC math do this move for you automatically.
I’ve tried bringing the scan in and adding a levels adjustment, moving the midpoint to 2.2, and then adding an invert layer, but the results just don’t match up. The contrast of the highlights (and probably shadows) is different. The above ICC method matches very well with doing the following in ImageMagick:
convert scan.tif -gamma 2.2 out.tif
So for now, I’m sticking with this method. It’s easy and fast. It’s a shame doing the pre-inversion gamma adjustment in Photoshop isn’t the same as well, because then you could have all of your adjustments as adjustment layers over the original linear scan.
Of course, if you want to scan your negative as a positive, as long as your scanning software converts the linear scan data to a reasonable working gamma (2.2, etc.), then you should be able to invert and color correct in Photoshop with no problems, skipping steps 2 and 3 below.
The Photoshop technique is easily summarized. Steps 1-3 are done by hand, the rest are in an action.
-
Bring your raw scan into Photoshop.
-
Assign it to a profile with a gamma of 1.0 (ex. AdobeRGB 1.0).
-
Convert it to the normal gamma version of the profile (ex. the real AdobeRGB).
-
Invert the image. This command is in the ‘Image’ menu under ‘Image->Adjustments->Invert’. You can also make an invert adjustment layer which is what I do.
-
Set up a curves adjustment layer. This layer is where the bulk of the color correction will occur. A good starting point for corrections might be to run Auto Color, via a curves adjustment layer, with settings to ‘Find dark & light colors’. You might want to try ‘Enhance per channel contrast’ instead and/or toggling off ‘Snap neutral midtones’. While watching the histogram, you can also change the target shadow and highlight clipping from 0.01%. Adjust until it looks right. Alternately, manually move the endpoints of each RGB curve to where it looks correct. This is probably somewhere near the clipping points for highlights and shadows in each channel, which is what ‘Enhance per channel contrast’ does.
-
Make a curves adjustment layer for white balance tweaking. Leave this for later. I like to set the blending mode on this to ‘color’.
-
Make a curves adjustment layer for a large gamma shift. Grab the midpoint of the curve and adjust it up or down until most of the tones are in the approximate ballpark of the final image. I find it easy to break this adjustment into two: this step and the next. It makes it easier to fine tune the contrast in the next step.
-
Make a curves adjustment layer for contrast tweaking. An ‘S’ curve is a good start. I like to put this to ‘luminosity’ for the blending mode, though sometimes I leave it on ‘normal’ depending on what the color looks like.
-
Make a vibrance or hue/saturation adjustment layer for taming the saturation. Big contrast changes in the previous steps can jack up the saturation. I like to knock it down a bit with an adjustment layer.1 My default action adds this layer but hides it, leaving it for ready access if I want to use it.
-
Return to the white balance curves layer and adjust the midpoints if you feel like your image needs it. You can use the gray picker to click on objects that should be neutral to help white balance things.2
-
Add additional adjustment layers on top to tweak things to your taste. Color balance, curves, brightness/contrast, etc. For the most part, I usually don’t find the need for this.
There’s an action set that you can download that automates most of this. Bring your scan in to PS, assign it the right gamma 1.0 profile, convert it, and then run the actions. Also included are dust busting actions.
Why so many layers
The outlined process adds a lot of adjustment layers to your image. The obvious thing is that many of the layers are all curve adjustment layers. Clearly, you could combine most of these adjustments into a single layer. Why not do that? Well, personally I find it easier to break adjustments down conceptually by the effect they have on the image. Changing overall contrast of the image is different than changing the color balance.
More importantly, from a practical stand point, I think it’s a lot easier to work in the curves adjustment layers if you make a bunch of small corrections instead of one giant correction. I like to think of it as making coarse and fine adjustments. The first couple coarse adjustments let you make large changes in the images, and when you get to the more subtle and delicate adjustments, you can make more fine-grained changes. Curves and levels are limited to one of 256 values for each point, so it is beneficial to have full-scale histograms when making fine adjustments.
Making a gamma 1.0 profile
This step is pretty easy. I just do it in Photoshop. Go to ‘Color Settings’. For working RGB, select custom. This should bring up the dialog shown below.
Change the gamma to 1.0. Give the profile an appropriate name and save it.
Hit ok, then go select ‘Save RGB…’ from the working space pop up menu again. Return the working RGB space to the original value. All done. This is the profile you assign to your raw scan when you first bring it into Photoshop and which you then convert to the workings space. Colors will get strange if you go from a gamma 1.0 version of one space to a normal gamma version of a different space.
Wait, Auto Color?
I know it sounds odd. Here we are doing reasonably manual color correction and we resort to Auto Color? There’s a reason for that—it basically does exactly what we want. I won’t go into the details; there is a nice writeup here as to what the command does. I will summarize what is in the Photoshop documentation:
Enhance Monochromatic Contrast Clips all channels identically. This preserves the overall color relationship while making highlights appear lighter and shadows appear darker. The Auto Contrast command uses this algorithm.
Enhance Per Channel Contrast Maximizes the tonal range in each channel to produce a more dramatic correction. Because each channel is adjusted individually, Enhance Per Channel Contrast may remove or introduce color casts. The Auto Tone command uses this algorithm.
Find Dark & Light Colors Finds the average lightest and darkest pixels in an image and uses them to maximize contrast while minimizing clipping. The Auto Color command uses this algorithm.
Also:
Select Snap Neutral Midtones if you want Photoshop to find an average nearly-neutral color in an image and then adjust the gamma (midtone) values to make the color neutral. The Auto Color command uses this algorithm.
To access these options, in a levels or curves adjustment layer, Alt-click (Windows) or Option-click (Mac OS) the Auto button. I prefer doing this in a curves layer so I can see what the curves are doing.
You can do all this stuff manually. Do so if it makes you feel better. I prefer to use the auto color options as a starting point and then tweak them to my satisfaction. I’m finding that ‘Enhance per channel contrast’ is the best one for me, without ‘Snap neutral midtones’. I then adjust the end points of each curve until things look pretty neutral. Any fine tuning can be done using the midpoints on the white balance layer.
Dust & scratch removal
But, but, but, if we use raw scans, we can’t use ICE or any of the other automatic dust removal routines! Correct. However, I save my raw scans as RGBI files. The infrared channel is there waiting to be processed. I have a set of actions that process this and enable easy dust correction in Photoshop. All of this is detailed on the Dust & scratch removal page.
-
You can also modify the curves layers that change contrast to use ‘Luminosity’ blending instead of ‘Normal,’ but that can look funny sometimes. In experimenting, I found it sometimes useful to make large contrast changes in the ‘Luminosity’ mode, and then run an action which set the layer’s opacity to 50%, duplicated the layer, and changed the copy’s blending mode to ‘Normal’. This brought some saturation back. However, in the end, I found it easier to avoid this and just follow the steps outlined above. ↩︎
-
Another technique is to double click on the white picker to pull up the color picker dialogue. Command-click on something that should be white and don’t move your mouse. Tab until you get to the Lab boxes and set a and b to zero, keeping the L at the read value. Then hit enter twice to close the dialogue and not set the default color. At this point, click at the same point you had taken the reading. ↩︎