Haze#

class deepinv.physics.Haze(beta=0.1, offset=0, **kwargs)[source]#

Bases: Physics

Standard haze model

The operator is defined as https://ieeexplore.ieee.org/abstract/document/5567108/

\[y = t \odot I + a (1-t)\]

where \(t = \exp(-\beta d - o)\) is the medium transmission, \(I\) is the intensity (possibly RGB) image, \(\odot\) denotes element-wise multiplication, \(a>0\) is the atmospheric light, \(d\) is the scene depth, and \(\beta>0\) and \(o\) are constants.

This is a non-linear inverse problems, whose unknown parameters are \(I\), \(d\), \(a\).

Parameters:
  • beta (float) – constant \(\beta>0\)

  • offset (float) – constant \(o\)

A(x, **kwargs)[source]#
Parameters:

x (list, tuple) – The input x should be a tuple/list such that x[0] = image torch.tensor \(I\), x[1] = depth torch.tensor \(d\), x[2] = scalar or torch.tensor of one element \(a\).

Returns:

(torch.tensor) hazy image.

A_dagger(y, **kwargs)[source]#

Returns the trivial inverse where x[0] = y (trivial estimate of the image \(I\)), x[1] = tensor of depth \(d\) equal to one, x[2] = 1 for \(a\).

Parameters:

y (torch.Tensor) – Hazy image.

Returns:

(deepinv.utils.ListTensor) trivial inverse.