ipfml.filters¶
ipfml.filters.noise¶
-
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.5, 0.5), k=0.2)¶ 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.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 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.
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)