AverageBlurPerturber#

class nrtk.impls.perturb_image.photometric.blur.AverageBlurPerturber(ksize: int = 1)#

Applies average blurring to the image stimulus.

Attributes:
ksize (int):

blur kernal size

Methods

from_config

Instantiate a new instance of this class given the configuration JSON-compliant dictionary encapsulating initialization arguments.

get_config

Returns the current configuration of the MedianBlurPerturber instance.

get_default_config

Generate and return a default configuration dictionary for this class.

get_impls

Discover plugins, skipping any entrypoints that fail to load.

get_type_string

Returns the fully qualified type string of the PerturbImage class or its subclass.

is_usable

Check whether this class is available for use.

perturb

Return image stimulus after applying average blurring.

__init__(ksize: int = 1) None#

AverageBlurPerturber applies average blurring to an image.

Args:
ksize:

Blurring kernel size.

perturb(*, image: ndarray[Any, Any], boxes: Iterable[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]] | None = None, **additional_params: Any) tuple[ndarray[Any, Any], Iterable[tuple[AxisAlignedBoundingBox, dict[Hashable, float]]] | None]#

Return image stimulus after applying average blurring.