How to Fake an Underexposure

Rule 1: Don't overexpose in the first place. Gee thanks. Yeah, but remember this in the future.

Consult the vast number of webpages that describe the problems of over and underexposure, "exposing to the right", and the importance of checking the histogram for each channel. Once you're clipping (blowing out the highlights), you have permanently lost information. I really like Mark Abeln's practical discussion.

The following works mostly because the Moon is an off-white object. For other subjects, you'll have to adapt.

So it's a bit late for that - am I screwed? Thankfully no.

As long as you're not wildly overexposed, there is a fair bit that can be done. Photoshop and Lightroom have EV sliders. In GIMP (+others) you'll want to use levels and contrast stretches. This works great if there is no clipping, where one (or all) of the channels blows past the bright end. If only one channel does this, then when you stretch/slide, the image will suffer color shifting. Technically, it already has. For an orange object like the Moon near the horizon, if properly exposed the RGB peaks may have been 200,100,50, but twice that exposure gives 400 (255),200,100,, so the proportion of RGB has changed, which means a color shift.

Here's the answer using ImageMagick: (you will likely have to add escape \ in front of the parentheses), and as a bonus, this is a super fast transformation to run.

convert IMG_3499.JPG -evaluate multiply 0.6 -separate -set colorspace RGB ( -clone 1 -modulate 250 ) -delete 0 -insert 0 -combine -set colorspace sRGB IMG_3500_fake.jpg

Remember that the lower in the sky, the more exaggerated the red, because blues are scattered away most, then green, finally red. How much you want to try and compensate for this gradual change is up to you. Sounds to me like a script is calling out to be made, one with a loop that gradually changes the values.

The basics

My overexposure problem; what?! That Moon on the right looks fine, I can see the maria, my means of judging that I'm not blowing out highlights.

Here's a closeup, a bit like what one sees on a preview screen with the zoom on:

But I did not check the histogram because I was in a rush. Rule #2, being in a rush is a breeding ground for making mistakes.

EnfuseGUI stubbornly refused to give me a Moon that was not blown out. I realized I needed to fake a shorter exposure, but simply playing with brightness and saturation did not seem to work.

I went to reading on the internet. The helpful sites said to look at the histograms of the individual channels, and this is what I got:

Even the green and blue are slightly clipped, but completely missing from the red is that double hump on the right.

So before I could fix it, I needed to know what a normal situation was, which I found from a different moonset event, the image on the right being 3 EV less:

Here are the histograms from the darker image on the right:

Definitely not clipped: all histograms have "room" at the right. Most importantly, what this tells me is the proper ratio of red:green:blue. Here' the part where I'm thankful that the Moon is an off-white object: the R,G,B follow the same pattern, only different brightness. I can approximate the red histogram by simply cloning the green histogram, multiplying it by a constant, and feeding that into the red channel.

Using ImageMagick, to smulate a shorter exposure version of it, I take IMG_3499.JPG, multiply it by 0.6, clone the green channel, modulate the clone up in brightness to what the red should have been, throw away the red channel, insert the modified green clone, and combine them back. Here's the result:

pretty darn close! The only thing that disturbs me is an inconsistency in the numbers. IMG_3500 has an exposure 8 times shorter (2*2*2 = 3 EV ) than IMG_3499, or 0.125, yet the multiplicaton factor in ImageMagick was 0.6:

convert IMG_3499.JPG -evaluate multiply 0.6 -separate -set colorspace RGB ( -clone 1 -modulate 250 ) -delete 0 -insert 0 -combine -set colorspace sRGB IMG_3500_fake.jpg

If you're doing a single image, that's all there is to it.

For the time-lapse with 500 sets, all I need to do is :

  1. write a script to loop across the short exposures and spit out the faked underexposure ones

  2. carefully, in a separate directory, rename the images so they're sequential

  3. Dump them into EnfuseGUI, sit back and relax while that churns for 14 hours creating my HDR images

  4. Assemble them into a time-lapse

Sample results: https://vimeo.com/174163270

Enfuse takes a long time when the images are 20M each and there are 600 sets of 7-bracketed images