SpeckleNoisePerturber
- class nrtk.impls.perturb_image.generic.skimage.random_noise.SpeckleNoisePerturber(rng: np.random.Generator | int | None = None, mean: float = 0.0, var: float = 0.05, box_alignment_mode: str = 'extent')
Adds multiplicative noise to image stimulus. Noise is Gaussian-based.
Methods
from_configInstantiate a new instance of this class given the configuration JSON-compliant dictionary encapsulating initialization arguments.
get_configReturns the current configuration of the _GSNoisePerturber instance.
get_default_configGenerate and return a default configuration dictionary for this class.
get_implsDiscover and return a set of classes that implement the calling class.
get_type_stringReturns the fully qualified type string of the PerturbImage class or its subclass.
is_usableChecks if the required skimage module is available.
Return image stimulus with multiplicative noise.
- perturb(image: np.ndarray, boxes: Iterable[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]] | None = None, additional_params: dict[str, Any] | None = None) tuple[np.ndarray, Iterable[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]] | None]
Return image stimulus with multiplicative noise.