Method for removing local color casts

I have a lot of old negatives I am scanning. Unfortunately, many of them have color casts either going in bands across them or in certain areas (I assume due to the negatives having been stored in less than ideal conditions).

I am trying to figure out the best way to use darktable to get rid of these color casts. Does anyone have good ideas/advice? Perhaps the color mapping module could be used, or the color correction one? I am prepared for the fact that I’ll have to use some form of masks to achieve what I want.

The attached file is an example. It has yellowish discoloration of the sky in places. I am sure the same is true elsewhere in the photo, but there is gets masked by the dominating hues.

Could I somehow use the color picker to compare the color of the unaffected sky and the areas where it has a cast, and then use this to remove the cast?

You can use the color balance module for that. There are two ways, one automatic and one more manual.

  1. automtic
  • Click on neutralize colors on the bottom of the module
  1. manual (if automatic doesn’t work)
  • Select the pipette of the hue in offset, power or slope wherever the color shift happens and fine tune it with the slider below.

Use the eye dropper of the hue and select the color you want to get rid of.

2 Likes

Thanks. I tried a couple of things:

  1. The automatic “neutralize colors”:
  2. Manual adjustments:
  3. Since I wasn’t happy with either, I also tried a manual adjustment that I limited to the sky and water using a combined parametric and drawn mask:

All of the edits suffer from the same issue: the colour cast I am trying to get rid of is unevenly distributed across the image. This means that even after the adjustments, you still see (although more faint) the discoloration. I am thinking that the use of an eyedropper to pick the hue to adjust does not work so well because when you pick the color it is a mix of the unwanted yellow and the wanted blue. That is why I was wondering if there is some method that allows you to apply a differential adjustment - “subtract” the unwanted hue from the wanted hue…

I have a feeling someone will know the right way to do this - either using a parametric mask to pick the exact hues to be adjusted, or by “painting” using a mask…I tried my best but couldn’t achieve the wanted result.

@beneix Try the color zones module and just try this I find it works sometime…select the saturation tab and then shift click on the picker with the plus sign …this generates a neg curve based on the average of the whole image…sometimes this works now if not start drawing a box for the picker initially its the whole image on areas with the largest cast…you can sometimes get this to work

1 Like

Thanks Todd, I’ll have a go. Here is another example where the bands are more marked.

Hi @beneix,

Both saturation and color shift seem to play a role here.

I have achieved relatively good results with color zones module. First I selected - as @asn and @priort mentioned above - the color cast with the help of the parametric mask. For the selection I used chroma channel, because the color cast was more saturated than the rest of the photo:

I then used color picker to select the color range, reduced saturation and adjusted hue:

It’s not perfect yet, but I think I could have gotten better results if I had raw file.

3 Likes

First image, both methods of @asn and @priort ) combined.

First from @priort:

and from @asn (I have here influenced only the sky by drawn mask):

2 Likes

Colour distribution of both images (NB resized, exaggerated and without colour management).

Remarks: The edges could be trimmed a bit. There seems to be a border (effect) in both images. Secondly, the discoloration is not uniform. As you can see, the bands are not straight repeating bars.

This can also be a tactic https://www.youtube.com/watch?v=1ZIGDx4Bg-k you can achieve something like this in DT using split toning…You have to first use the picker and select the whole image and get the average color. Going to this website Invert a color online you can get the inverse color…in hex as the split tone module only allows hex input. Now go to split tone paste the same color the inverse of the average in to both swatches and set compression to zero and balance to 50…you can play with opacity and saturation…sometimes this works nicely although you can probable get similar results with color balance and others…

Out of curiosity, how did you do this and what tools did you use?

The main G’MIC command that I used was afre_orien 1. Basically that is the colour component of Rec2020 D50 Y (luminance or luma, depending on whether you are dealing with linear data or not). Then I increased the contrast, etc., to make it web friendly.

1 Like