# ipfml.filters.noise

Noise filters to apply on images

Functions

`cauchy_noise`(image, n[, identical, …]) | Cauchy noise filter to apply on image
`gaussian_noise`(image, n[, identical, …]) | Gaussian noise filter to apply on image
`laplace_noise`(image, n[, identical, …]) | Laplace noise filter to apply on image
`log_normal_noise`(image, n[, identical, …]) | Log-normal noise filter to apply on image
`mut_white_noise`(image, n[, identical, …]) | Multiplied White noise filter to apply on image
`salt_pepper_noise`(image, n[, identical, p, k]) | Pepper salt noise filter to apply on image
`white_noise`(image, n[, identical, …]) | White noise filter to apply on image

`ipfml.filters.noise.``cauchy_noise`(image, n, identical=False, distribution_interval=(0, 1), k=0.0002)

  Cauchy noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (0, 1))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.0002)

  Returns: | 2D Numpy array with Cauchy noise applied

  Example:

      >>> from ipfml.filters.noise import cauchy_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = cauchy_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``gaussian_noise`(image, n, identical=False, distribution_interval=(0, 1), k=0.1)

  Gaussian noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (0, 1))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.1)

  Returns: | 2D Numpy array with gaussian noise applied

  Example:

      >>> from ipfml.filters.noise import gaussian_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = gaussian_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``laplace_noise`(image, n, identical=False, distribution_interval=(0, 1), k=0.1)

  Laplace noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (0, 1))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.1)

  Returns: | 2D Numpay array with Laplace noise applied

  Example:

      >>> from ipfml.filters.noise import laplace_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = laplace_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``log_normal_noise`(image, n, identical=False, distribution_interval=(0, 1), k=0.05)

  Log-normal noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (0, 1))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.05)

  Returns: | 2D Numpy array with Log-normal noise applied

  Example:

      >>> from ipfml.filters.noise import log_normal_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = log_normal_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``mut_white_noise`(image, n, identical=False, distribution_interval=(0, 1), k=0.002)

  Multiplied White noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (0, 1))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.002)

  Returns: | 2D Numpy array with multiplied white noise applied

  Example:

      >>> from ipfml.filters.noise import mut_white_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = mut_white_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``salt_pepper_noise`(image, n, identical=False, p=0.1, k=0.5)

  Pepper salt noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - p – probability to increase pixel value otherwise decrease it
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.5)

  Returns: | 2D Numpy array with salt and pepper noise applied

  Example:

      >>> from ipfml.filters.noise import salt_pepper_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = salt_pepper_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)

`ipfml.filters.noise.``white_noise`(image, n, identical=False, distribution_interval=(-0.5, 0.5), k=0.2)

  White noise filter to apply on image

  Parameters:

  - image – image used as input (2D or 3D image representation)
  - n – used to set importance of noise [1, 999]
  - identical – keep or not identical noise distribution for each canal if RGB Image (default False)
  - distribution_interval – set the distribution interval of normal law distribution (default (-0.5, 0.5))
  - k – variable that specifies the amount of noise to be taken into account in the output image (default 0.2)

  Returns: | 2D Numpy array with white noise applied

  Example:

      >>> from ipfml.filters.noise import white_noise
      >>> import numpy as np
      >>> image = np.random.uniform(0, 255, 10000).reshape((100, 100))
      >>> noisy_image = white_noise(image, 10)
      >>> noisy_image.shape
      (100, 100)