JavaScript support is required to run this website properly.
Please enable it in your browser's settings, or turn off the script blocker.

Documentation / HDR ghost effect removal

Whenever two or more photos are merged to a HDR photo or stacked together, there is not only a problem of misalignment, but also a problem of image ghosting. Alignment of photographs taken hand-held, without a tripod is straightforward and is achieved by finding the right transformations that compensate for shift, rotation, scale and perspective. EasyHDR does it automatically, but it also offers an unique manual alignment tool. However, any objects that move, or change their brightness or color while the subsequent shots are taken, cannot be aligned in any way. They cause a lot of trouble to the HDR merging engine and cause the ghosting effect artifacts to appear on the resulting image.

HDR sequence with moving people

The image ghosting effect can be caused by, for example: moving people, cars, clouds, tree leafs, waves on water, etc. It can be even caused by nearby static objects due to parallax, when the camera moves a bit between exposures. Depending on the size of the ghosts and on how the input images are blended into a HDR picture (with weighted selectivity), the image ghosting effect may be more or less visible. The ghosts spoil larger area of the photograph than the size of moving objects alone - actually all the places where the moving objects appear. Fixing this in post processing means that more surface of the photograph needs to be patched (copied from the other parts). Fortunately, the ghost removal algorithm comes to the rescue. In easyHDR there is a semi-automatic tool that, when enabled, automatically detects the ghosted areas, groups them and selects the best input photos to patch them. The user is able to manually correct the masks in order to achieve better or different results.

HDR ghosting before being fixed
Three photos merged to a HDR preview as shown in easyHDR's ghost removal tool.

In easyHDR, the ghost removal mask is drawn in several colors. Each color represents one input image that is used to patch the painted area. That means that you can either leave the moving object in the final image, or remove it completely, by doing an appropriate selection of the source image for patching. It's worth mentioning here that not all ghosts can be removed in both ways. Removing a ghost completely is possible only when the underlaying backgrond is visible in at least one of the input images. In case of HDR sequences it's even a bigger challenge. That's because the background also needs to be well exposed. It's hard to use an underexposed part of an image for patching because the noise level will be very high and the colors would be very hard to calibrate and match. Similarly it's hard to use an overexposed part - no way to get any detail from pixels clipped to white, or even worse there is no way to know what shall be the brightness level after calibration. Depending on actual case you may need to toggle the "Repair over and under exposed" option in the bottom left of the tool's window.

HDR ghost removal mask
User edited mask painted in a way to eliminate all moving people.

HDR ghost removal mask
User edited mask painted in a way to make the moving person appear 3 times on the HDR image. Please note that the patch done with the underexposed image is not well calibrated.

The images used for patching are calibrated to match the resulting HDR image. In order to blend the patches even better, some feathering is applied. It can be controlled globally with the "Smoothness" parameter.

HDR ghosts removed and tone mapped
The final result.

A bit more complicated example is shown below. It's a sequence of 6 identically exposed photos. There were a lot of people moving around making it impossible to take a clean shot. Please note that HDR merge (easyHDR's "TrueHDR" method) of several photos taken with the same exposure settings equals to image stacking.

Stack sequence

Stack without ghost removal
Stack of the 6 input photos, no ghost removal.

Ghost removal mask
The ghost removal mask, manually painted.

Stack with ghost removal applied
Stack with ghost removal applied. Unfortunately the boy couldn't be erased ;-).

Back to the main documentation page

Current easyHDR version
3.16.1   (March 15th 2023)