I took this picture of the moon on a hazy, slightly foggy evening in October when the moon was one day past full.
Taking a picture of the moon on a hazy evening proved to be quite challenging. To the naked eye, the moon looked much as it does on a clear night, albeit with a little less contrast. The halo surrounding the moon was bright but not overwhelming and had a tinge of colour. The pictures however were in stark contrast to what i had seen. A short exposure captured the contrast and detail on the moon’s disk but almost no halo. An exposure long enough to record the halo ended up with an overexposed moon.
I figured the problem was the dynamic range – the difference between the dark and bright areas was too large for the camera to capture. So i so decided to make a High Dynamic Range (HDR) composite from a range of exposures. But that didn’t really solve the problem either. The HDR image had enough range to capture both the halo and the bright moon without saturating or underexposing anything. But in order to get the halo bright enough to match what i saw, the moon details ended up looking washed out with almost no contrast.
I think the visual impression of being able to see both the halo and the moon details at the same time is just that – an impression. We might first take in the halo and then shift our focus to the moon’s disk to see the light and dark contrast on the surface. In our mind’s eye we integrate the two views which leaves us with the impression of seeing both the halo and the disk at the same time.
I ended up using masks to artificially darkening the moon’s surface in the HDR image in order to show both the halo and the moon details. The HDR image had all the resolution and range to show as much moon surface detail as i wanted, but when overdone, it looked like i just pasted a copy of some other moon shot on top of the halo. So i had to limit this technique in order to keep things looking natural. Which left the moon’s surface still looking a little washed out and the halo not quite as bright as it appeared to the naked eye.
Of the many different exposures, 10 images were selected for the HDR composite with a range of about 2-1/2 stops and a relatively smooth increment in exposure value (EV) between images.
Non-linear vs Linear
The normal processing of the raw sensor data applies a strong non-linear transformation to the otherwise linear sensor pixel values – sometimes referred to as the Digital Development Process (DDP). This reflects how our eyes perceive brightness and results in a “normal” looking image. The camera does this when creating a JPG and also what the Canon DPP tool does by default when displaying a RAW file or creating a JPG or TIFF file. For an image with a wide dynamic range to start with, this non-linear transformation tends to blow out the brighter areas of the scene or under-expose endarker areas. The darker areas are less affected due to the nature of the non-linear transformation.
The screen shot below is for an exposure in the middle range of the 10 selected for the HDR composite. It shows the default (non-linear) processing that DDP uses for a raw CR2 file. With the normal processing, all but the darkest area of the moon’s surface appears saturated.
The next screen shot is the same image as above, but with the “Linear” option selected in DPP. All of the darker areas of the moon’s disk are now in range and visible. There is still some saturation of the brighter areas but this is expected since this is the mid-range EV of the set. The HDR integration process will use pixel data from the shorter, less saturated images to fill in areas of the brighter images.
Note that although the halo isn’t visible in the linear image. It’s still the same data as the saturated DPP image and therefore still there. So the levels can be adjusted later to bring back this detail just as the non-linear (DDP) stretch brought out the halo. But now this can be done selectively.
I figure the linear version recovers about 2 stops of range over the non-linear version. So the 2-1/2 stops in normal processing becomes 4-1/2 stops in linear mode.
The 10 CR2 files were converted to linear mode 16bit TIFF files and loaded into Photoshop CS5 as layers in a single PSD file. The PS auto-align feature wouldn’t align the images, so each layer was aligned manually.
Aligning lunar images is actually quite easy to do with PS. The layer to align is placed above the reference frame. Then the upper layer opacity is set to 50% and inverted to make it obvious which layer is which. Using the selection tool (arrow) the layer can be nudged into place. When the layers are exactly aligned, the two layers more of less cancel each other out and turn neutral grey. Correcting for rotation errors is a little more tedious but doable. Manual alignment doesn’t do sub-pixel adjustments but it’s ok for this type of work.
The image below shows the 10 images used for the HDR composite aligned and sorted by exposure values (slightly stretched to better show the range and increments):
PS CS5 actually has 2 HDR tools – neither of which produced anything close to being useful. PixInsight also has an HDR Integration tool and it produced a reasonable result. But the tool could not be coerced into including a significant halo from the lonager exposures. And the HDR integration looked very artificial and was difficult to corrected post merge.
So the only option left was a manual merge using PS layers and masks. The layers were stacked in increasing EV.
A mask was applied to each layer using a range mask to exclude the saturated areas. Then each mask was adjust using levels to increase the contrast. Initially the opacity of each layer was set to give each layer equal weight. (The strange but true formula for determining the percentage for each layer is : opacity = 100 / layerNumber. So setting the 2nd layer opacity to 50% and the 3rd layer to 33% gives the layers equal weight for blending.)
It turned out that equal weights didn’t allow enough of the brighter pixels from the longer exposures to contribute to the blended image. So the opacity was set to 100% for all layers and the blending left mostly to the masks.
With the HDR blending done, levels and curves were used to brighten the image. Later, a mask was used to allow the halo to be brightened while leaving the moon’s disk untouched.