Plasma fractal (Diamond-Square) shadow: organic darkening. shadow_intensity_range, roughness. Good for natural shading and lighting variation.
Creates organic-looking shadows using plasma fractal noise pattern. The shadow intensity varies smoothly across the image, creating natural-looking darkening effects that can simulate shadows, shading, or lighting variations.
shadow_intensity_rangeRange for shadow intensity. Values between 0 and 1:
roughnessControls how quickly the noise amplitude increases at each iteration. Must be greater than 0:
pProbability of applying the transform. Default: 0.5.
>>> import albumentations as A
>>> import numpy as np
# Default parameters for natural shadows
>>> transform = A.PlasmaShadow(p=1.0)
# Subtle, smooth shadows
>>> transform = A.PlasmaShadow(
... shadow_intensity_range=(0.1, 0.3),
... roughness=0.7,
... p=1.0
... )
# Dramatic, detailed shadows
>>> transform = A.PlasmaShadow(
... shadow_intensity_range=(0.5, 0.9),
... roughness=0.3,
... p=1.0
... )