Photo post / audio analogy - de-yellow night shot

I’m getting back into photography after a few years. In the interim I dabbled a bit with music composition and production. I’m rubbish with names, so please forgive verbosity used in place of correct technical vocabulary.

My immediate problem is I want to de-yellow an urban night shot from a few years ago. (My city is switching to LED array street lights - will a night filter (physical) even work for those?)

In audio, if something has an unwanted tone, I’d use an equalizer curve to get rid of it. But first, I need to know the frequency, so I’d start by making a narrow band amplifier in the equalizer and scan until I found that ugly noise. Then I’d reverse the amplifier to get rid of that narrow band.

Can I do the same thing with photography? Could I apply a curve layer (an additional curve layer) to the image with a narrow amplifying peak to find whoch yellow frequency is the irritating one and then reverse the direction to get rid of the yellow instead of amplifying it? Would I have to fiddle with red and green channels to find the combination that makes the sodium lamp yellow?

It does not.

In audio, if something has an unwanted tone, I’d use an equalizer curve to get rid of it. But first, I need to know the frequency, so I’d start by making a narrow band amplifier in the equalizer and scan until I found that ugly noise. Then I’d reverse the amplifier to get rid of that narrow band.

Can I do the same thing with photography? Could I apply a curve layer (an additional curve layer) to the image with a narrow amplifying peak to find whoch yellow frequency is the irritating one and then reverse the direction to get rid of the yellow instead of amplifying it? Would I have to fiddle with red and green channels to find the combination that makes the sodium lamp yellow?

You can’t do what you would do in audio. The problem is that cameras don’t really capture the frequency spectrum of light, just some lobes. So you can’t emulate the narrow frequency cuts sometimes done in audio.

A didymium / nightlight filter does indeed do that, but it’s tuned for the frequency of sodium so it won’t help much with the spectrum of white led.

With that said if it’s either white led of the same type or sodium vapor, you can usually get acceptable results by just adjusting white balance (which I guess could be though of as a 3 band EQ).

Mixed light is a real curse though and at least as far as I know common image processing tools don’t really offer the tools to deal with that. You can try different white balances and masks but it’s a pain.

4 Likes

Thank you for this explanation. I’d forgotten about RGB space.

Two common ways of separating colour are

– Orientation, which contains colour info only (image divided by some measure of brightness).

gmic sp tiger orientation

– Chroma and hue, which come from the polar representations of Lab, Jab, etc.

I think the audio equivalent of what you are trying to do is to pan a single element inside a stereo mix.

You can think of RGB colour channels like LCR audio channels. A yellow image is too much level in the Red and Green channels. It like too much level in the Left and Centre. You can turn down the LC channels but it affects the whole stereo Field

Hi Mark,

In my city we have quite dark and really strong orangy-yellow street lights. My camera with auto WB gives me results like this:


Which is actually quite close to the actual look (because everything is really dark and yellow).

However, it’s quite easy to make this photo look like this (I use ART for editing, exclusively):

Basically, I shifted WB to very cold temp (1800) and then desaturated blue color, because everything outside of this yellow light becomes really blueish at 1800.

Here is how it looks like without blue color desaturation:

Obviously, if you have some actual blue color on the subject, you will need to use some local editing, but in this particular image I was able to just desaturate blue globally on the whole picture. And of course it gets a bit more difficult if you have people on your picture because of skin tones, but still manageable.

6 Likes

Some time ago I asked for help how to adjust the ugly colors in a photo shot in very tricky artificial lights; I received lots of replies and many explanations that could probably help you:

2 Likes

What’s a mixed blessing is the move to Phosphor Coated Amber (PCA) street lights - Commercial/Streetlights — Saving Our Stars

PCA eliminates the “extremely narrow spectrum” issues of sodium, but retains the “almost no blue light” properties.

PCA basically takes the phosphor plus blue setup of “white” LEDs to an extreme of almost 100% phosphor emissions and no direct LED emissions. Usually considered a severely defective LED except in special applications like this.

Wow, outstanding result.

Now, between your explanation and the new color balance module in dt, I know what to do with my cheapo saturation tool in rawproc…

More channel info. Most of the detail can be found toward reds. The analogy fails because you wouldn’t want to suppress good data. It is a matter of redistributing or gleaning from it. RGB:

Not sure how all I’ll use it yet, but I put a channel selector on rawproc’s el-cheapo HSL saturation tool and I was able to do this:


Basically, set the whitebalance on a patch from the lightest cat fur I could find, then desaturated the blue channel almost to 0. Bit of curve to get some contrast, and 'ere y’go…

Now I’m going to add a threshold to see if I can handle extreme blues without the profile shenanigans…

uhmmm and how would you do that (desaturate blue) in Darktable?

A few ways I can think of,

  1. Color balance - increase saturation of yellow (opposite of blue)
  2. Color zones - in ‘saturation’ tab, isolate blues and decrease
  3. Channel Mixer/New calibration module - decrease B slider in B channel. This will also make blues darker, so blend ‘colour’ if you don’t desire that.

Here is an example (working on the first jpeg posted by Alexander) where I have used Color Balance to remove the orange cast, then channel mixer to reduce blue saturation.

8de735624914b8350a7a1ce4590d88d1b6a5c889_2_690x461
8de735624914b8350a7a1ce4590d88d1b6a5c889_2_690x461.jpeg.xmp (16.0 KB)

You could spend more time fine tuning, making it prettier - especially with raw, I just use as an example.

2 Likes

cheers @Tim ! I’ll have a go on my files to see if I can make it work.

And here is a version using channel mixer only:


8de735624914b8350a7a1ce4590d88d1b6a5c889_2_690x461.jpeg.xmp (37.6 KB)

Method:
Draw colour picker rectangle on the area you want to be neutral. We have neutral when R=G=B.
First determine how bright you want the area. As the cat has white fur, and white is bright, I chose the max RGB, which is R = 136 (first screenshot). So the goal is to boost the G and B values to = 136. For B, we adjust any slider (there is no right or wrong, only what you think looks best) in B channel of channel mixer, and for G, we adjust any slider in G channel. When all three colour picker values are equal, we are done. (You’ll notice mine are not perfectly equal, I left a tiny bit more red, but close. Also, my values do not = 136. That’s because I also adjusted R channel a bit, and because I re-drew the colour picker area).

3 Likes

@ggbutcher I have the same issue as your image. Splotches in coloured areas such as the cheek and ears of the cat or the bush.


BTW, I took my processing hacksaw (wrote something with G’MIC) and came up with this monstrosity (probably its 10th life :scream_cat:).

Yes, can only go so far with global edits. I have fun trying, however… :laughing:

ART
White balance on cat, channel mixer desaturate from @age, desaturation of yellow with color equalizer

If I had to process some yellow image like this, I would make a haldclut.

This time, just slightly desaturating and adding approximate complementary cast

2 Likes

@ggbutcher I ended up guided filtering the GB channels with R. Still, the image is off because of my funky automagical method. Probably need to be less :crazy_face: and be a traditional lad.

Oh, you’re okay. I’m just hobbled by hack tools written by a lunatic… :scream: