Experiments with Deghosting Images using Hugin
|
![]() |
![]() |
![]() |
![]() |
Click images for full size, click pop-up to remove.
The Problem.
Shown below is the result of combining these images with Enfuse.

A 'ghostly' army of figures can be seen marching toward the house.

Using deghosting_mask.exe
Following up from earlier work support for deghosting combined images has been added into the Hugin source. Presently, this needs to be called from the commandline. In my case a windows 'bat' file.
deghosting_mask LDR_exposure_layers_0000.tif LDR_exposure_layers_0001.tif LDR_exposure_layers_0002.tif
Using the default parameters results in three blank masks..
In the following examples I have increased the threshold parameter
Threshold 250
deghosting_mask -i 5 -t 250 -c 1 LDR_exposure_layers_0000.tif LDR_exposure_layers_0001.tif LDR_exposure_layers_0002.tif
![]() |
![]() |
![]() |
![]() |
Click images for full size, click pop-up to remove.
Threshold 254
deghosting_mask -i 5 -t 254 -c 1 LDR_exposure_layers_0000.tif LDR_exposure_layers_0001.tif LDR_exposure_layers_0002.tif
![]() |
![]() |
![]() |
![]() |
The mask now clearly do show the people as black shadows, and in the output the people are almost removed.
Click images for full size, click pop-up to remove.
Threshold 256
deghosting_mask -i 5 -t 256 -c 1 LDR_exposure_layers_0000.tif LDR_exposure_layers_0001.tif LDR_exposure_layers_0002.tif
![]() |
![]() |
![]() |
![]() |
Click images for full size, click pop-up to remove.
The army of ghost has been removed.

But a lot of high frequency noise has been introduced.
