[ Beneath the Waves ]

Reducing and Eliminating Hotspots

article by Ben Lincoln


Hotspots are one of the most frequent complications when using standard camera lenses to shoot multispectral exposures. While it's possible to help avoid them by shading the camera from direct sunlight and using wide apertures, they can still crop in when certain lenses (or lens designs) are used.

I am a firm believer in attempting to get everything right when taking photos, because I like to minimize the effort in post-processing and I feel that it makes for a more "authentic" image (inasmuch as that can apply to spectral bands that humans can't actually see with their own eyes). However, I also believe that it's foolish to throw out an otherwise interesting photo which 30-60 minutes of work can fix, especially for field photography which may have taken place hundreds or thousands of miles away, and in which the exact conditions it was taken in can never be recreated.

These techniques should be used after the images have been aligned, combined into a single file, and cropped. This is critical because it can be very challenging to get the correction level "just right" and being able to test the corrected version in one or two different false colour composites before committing to it is very useful.

Of course, there will be images where no amount of work "in post" can produce a result that you want to display, with your own preferences being the best guide in that respect.

Areas of Low Contrast/High Similarity

This is easy. Use the clone stamp tool in your image-editing software to fill in the space occupied by the hotspot. I generally have it set to a soft brush (0 hardness, with a radius between about 20 and 100 pixels depending on the size of the area to be corrected), 50% opacity, and 100% flow. As always, your mileage may vary.

Clone Stamp Hotspot Correction
[ Uncorrected ]
[ Corrected ]

A hotspot in the near infrared exposure of the prism rainbow (from A Detailed Introduction) corrected using the clone stamp tool.


Sadly, because hotspots appear in or near the center of the image, they will typically not be in an area of low contrast. So another method must be used.

Areas of High Contrast/Complex Detail in Greyscale Images

These steps work best for images which exist in greyscale format (for example, ultraviolet-A and near infrared exposures). It is incredibly challenging to get the amount of adjustment right in a colour image (for example, when trying to correct just the red channel of a human-visible-light exposure). For colour images, see the next section.

In order for this technique to work well, your image-editing software must support 16-bit-per-channel images. You must have shot the original in RAW format, and the bit depth must never have dropped below that of the RAW file. For example, my D70 writes 12-bit RAW files, which I import as 16-bit-per-channel. If your images are currently in 8-bit-per-channel format, or you used such a format as an intermediate step, the results of this method will be poor because there is no longer enough fidelity in the data to recover the details that were obscured by the hotspot.

This approach definitely takes some practice, and is by no means automatic. If you knew the exact size and falloff of the hotspot, you could perform this in one step (creating a circular darkening effect that exactly canceled it out). Because you don't know those two factors, don't even bother trying to do this using a circular selection centered on the hotspot, because the artificial look will stand right out even if you are very close to the correct values.

If the hotspot is very bright, it may not be possible to recover enough of the detail to completely "fix" the image. However, it should generally be possible to minimize its impact on the photo as a whole. If necessary (for extreme/problematic cases), this technique can be followed up with more traditional clone stamp work, and with multispectral sets sometimes one of the other exposures can be used as a reference.

  1. Create a copy of the layer which contains the hotspot.
  2. Perform a "select by colour range" operation. Set the fuzziness or threshold to a high value (100-200). Click on an area near (but not inside) the hotspot which is in shadow. I will typically pick a mid-tone shadow, not absolute pitch black. This should result in a selection that appears to cover most (or even all) of the image, but brighter pixels will either not be selected or will only be partially selected.
  3. Switch to the brush tool. Set the radius to about the size of the hotspot, plus or minus 50% (I generally use about 75% of the size of the hotspot). Set the hardness to 0. Set the colour to black. Set the tool mode to Darken. Set the opacity very low (I use 2%).
  4. Treating the brush as if it were a physical paintbrush, begin judiciously and semi-randomly clicking inside the area occupied by the hotspot (favouring the brighter areas closer to the center). Do not hold the mouse button down; the intended effect is similar to sponge-painting. Fire off very fast clicks as you move the mouse around semi-randomly. You are attempting to nullify a shape with high geometric precision (a circle/sphere), so you must be the image-editing equivalent of a ninja or a CIA-sponsored rebel, acting in exactly the opposite way to what your opponent (in this case, the hotspot) would. This means chaotic, overlapping, cloud-like patterns which would be very hard to represent using geometric shapes.[1]
  5. If the hotspot was intense enough, the bright areas excluded by the select-by-colour-range operation may appear too light as well. If this is the case, invert the selection and repeat the previous step (it will usually only take a few clicks to bring the bright areas down to a reasonable level).
  6. When you believe you have convincingly corrected the hotspot area, create a false colour composite that uses the corrected layer. For example, if the hotspot was in the near infrared exposure, create a NIR-R-G false colour image using it. If the corrected area blends in, then your work is done. If the corrected area stands out, then you over-corrected or under-corrected it and will need to make another attempt. I will typically create at least two different false colour variations at this time (NIR-R-G and NIR-B-UVA, for instance) to verify that the work is at least reasonably believable across a wide range of versions.
Selective Darkening Hotspot Correction
[ Uncorrected ]
[ Corrected ]

This near infrared hotspot (from Drive 2007 - Day 13) was corrected using the method described above.


Areas of High Contrast/Complex Detail in Colour Images

Although I haven't seen it discussed elsewhere, I've found that - in general - if the near infrared exposure from a multispectral set contains a hotspot, then the human-visible exposure does as well. The hotspot in the RGB image will be of a lower intensity, and it generally mostly affects the red channel, but is easily visible once you know where to look.

As noted in the previous section, correcting hotspots in a colour image is extremely challenging. Fortunately, there is a much easier method than can be used.

  1. Create two new layers which contain copies of the colour image, with the original as the background.
  2. Select the topmost layer. Set its compositing type to Color.
  3. Switch to the clone stamp tool. As noted in the first section, I will generally use a soft (0 hardness) brush, with an opacity of 50%. For spot/detail work on full-resolution photos, I typically use a radius of 20 pixels.
  4. Mentally divide the area occupied by the hotspot in terms of its contents. For example, if it is mostly a section of green field, but one corner contains a red brick, you will need to treat these two sections separately.
  5. Set the clone stamp source to be an area of the photo that contains the correct colour for the area you're working on. In the example above, to correct the green grass, set the clone stamp target to be an area of the grass which is outside of the hotspot.
  6. Apply the clone stamp to the appropriate area within the hotspot. I will generally use the "rapid-click" approach from the previous section, and also frequently select slightly different source areas to avoid creating any exact copies of the colour pattern.
  7. If there are any additional divisions of the hotspot (e.g. the red brick mentioned above), repeat the previous two steps for each of them.
  8. Merge the top layer with the middle layer to create a single, corrected layer (while leaving the original, uncorrected layer available below both of them if you need to go back to it later.

The technical reason for this approach (as opposed to just using the clone stamp in the traditional manner) is that (at least in my experience) when hotspots occur in human-visible images, the overall luminosity of the hotspot area is actually correct, but the colour is not. Usually it is too red. In the example image below, it is too yellow compared to the green of the surrounding grass, which is of course just a variation on "too red".

Colour Image Clone Stamp Hotspot Correction
[ Uncorrected ]
[ Corrected ]

An example of correcting for a hotspot in the middle of the human-visible version of this image (from Drive 2007 - Day 14) using a Color layer.

1. In the fifth season of Babylon 5, there is a metaphor about "the willow that bends in the wind" or something along those lines. You don't want to be the willow. You want to be the enormous chunk of anti-neutronium, expelled during the destruction of a titanic alien space battlecruiser in a war billions of years before the dawn of the human race, which by random chance impacts the planet where the wind is blowing, shredding the entire world in a blaze of hard radiation and dissipating its atmosphere, ensuring that the wind can never blow there again.
[ Page Icon ]