---
name: "deghosting_mask"
section: "1"
platform: "linux"
package: "hugin"
version: "2025.0.1-5"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/deghosting_mask"
---

# deghosting\_mask(1)

Creates mask for removing ghosting in images

## NAME

deghosting\_mask - Creates mask for removing ghosting in images

## SYNOPSIS

**deghosting\_mask** \[options\] *\<image1*\> *\<image2*\> *...*

## DESCRIPTION

Takes a series of aligned photos, usually three or more, and generates masks for removal of ghosts - Data that only appears in a minority of photos.

## OPTIONS

- **-o\|--output** \<path\>

  Prefix for output masks

- **-s\|--sigma** \<float\>

  Standard deviation of Gaussian weighting function (SIGMA \> 0); default: 30

- **-i\|--iterations** \<int\>

  Number of iterations, default is (ITER \> 0) default: 4

- **-t\|--threshold** \<float\>

  Threshold; default: 150

- **-c\|--contrast** \<float\>

  Change contrast before applying threshold; default: 1.3

- **-a\|--advanced** \<f\|g\|m\|t\|w\>

  Advanced settings. Possible options are:

  - **f** Use gray images for computation. It's about two times faster but it usually returns worse results. You also have to change threshold to smaller value (around 100)

    - **g** Use gamma 2.2 correction instead of logarithm if input images are HDR

    - **m** Do not scale image, NOTE: slows down process

    - **t** Use simple threshold, may result in holes in images

    - **w** Compute "complete" weights, not only probabilities

    - **-w\|--save** \<i\|w\>

  Advanced save settings

  - **i** Save initial weigths

    - **w** Save generated weigths

    - **-b** \<int\>

  Image cache BLOCKSIZE in kilobytes; default: 2048KB

- **-m** \<int\>

  Set image CACHESIZE in megabytes; default: 1024MB

- **-h\|--help**

  Display this help

- **-v\|--verbose** \<0\|1\>

  Verbose, repeat for more verbose output

## AUTHORS

Lukáš Jirkovský
