class
MultiplicativeNoise
extends
PhotometricTransform[MultiplierParam]MultiplicativeNoise(multiplier: tuple[float, float] = (0.9, 1.1), elementwise: bool = False, p: float = 0.5)Multiply pixel values by random noise (Albumentations MultiplicativeNoise).
With elementwise=False (default) a single scalar is sampled
per call and the whole image is scaled by it; with
elementwise=True an independent multiplier is sampled per
pixel. The output is always clipped back to [0, 1].
Parameters
multiplier(float, float)= (0.9, 1.1)Inclusive range of the per-pixel (or per-image) multiplier.
elementwisebool= FalseIf
True, sample one multiplier per pixel rather than one
per image.pfloat= 0.5Probability of applying the transform.
Used by 1
Constructors
1Instance methods
1Sample per-call random parameters for MultiplicativeNoise.
Parameters
imgTensorImage tensor; not inspected, carried through for dispatch.
Returns
MultiplierParamCarries the constructor's multiplier bounds verbatim
(lo, hi). The actual scalar / per-pixel multiplier
draw is deferred to the apply step so elementwise can
switch between the two regimes without re-running the
sampling head.