noises

Features for introducing noise to images.

Classes

Noise

Base abstract noise class.

Offset, Add, Background

Adds a constant value to an image.

Gaussian

Adds IID Gaussian noise to an image.

Poisson

Adds Poisson-distributed noise to an image.

Module classes

Add

class deeptrack.noises.Add(offset, **kwargs)

Adds a constant value to an image :param offset: The value to add to the image :type offset: float

get(image, offset, **kwargs)

Method for altering an image Abstract method that define how the feature transforms the input. The current value of all properties will be passed as keyword arguments.

Parameters
  • image (Image or List[Image]) – The Image or list of images to transform

  • **kwargs – The current value of all properties in properties as well as any global arguments.

Returns

The transformed image or list of images

Return type

Image or List[Image]

Background

deeptrack.noises.Background

alias of deeptrack.noises.Add

Gaussian

class deeptrack.noises.Gaussian(*args, mu, sigma, **kwargs)

Adds IID Gaussian noise to an image

Parameters
  • mu (float) – The mean of the distribution.

  • sigma (float) – The root of the variance of the distribution.

get(image, mu, sigma, **kwargs)

Method for altering an image Abstract method that define how the feature transforms the input. The current value of all properties will be passed as keyword arguments.

Parameters
  • image (Image or List[Image]) – The Image or list of images to transform

  • **kwargs – The current value of all properties in properties as well as any global arguments.

Returns

The transformed image or list of images

Return type

Image or List[Image]

Noise

class deeptrack.noises.Noise(*args: dict, **kwargs)

Base abstract noise class.

Offset

deeptrack.noises.Offset

alias of deeptrack.noises.Add

Poisson

class deeptrack.noises.Poisson(*args: dict, **kwargs)

Adds Poisson-distributed noise to an image

Parameters

snr (float) – Signal to noise ratio of the final image. The signal is determined by the peak value of the image.

get(image, snr=None, **kwargs)

Method for altering an image Abstract method that define how the feature transforms the input. The current value of all properties will be passed as keyword arguments.

Parameters
  • image (Image or List[Image]) – The Image or list of images to transform

  • **kwargs – The current value of all properties in properties as well as any global arguments.

Returns

The transformed image or list of images

Return type

Image or List[Image]