Add snow overlay via bleach (brightness threshold) or texture (noise-based overlay). Good for winter or snowy-scene robustness in outdoor imagery.
Two methods: "bleach" brightens pixels above a threshold (faster, simpler); "texture" adds a depth-weighted snow layer with sparkle (more realistic, heavier).
snow_point_rangeRange for snow intensity threshold in (0, 1). Default: (0.1, 0.3).
brightness_coeffBrightness multiplier for snow; must be > 0. Default: 2.5.
method"bleach" = threshold + brighten; "texture" = noise-based overlay with depth and sparkle. Default: "bleach".
pProbability of applying the transform. Default: 0.5.
>>> import numpy as np
>>> import albumentations as A
>>> image = np.random.randint(0, 256, [100, 100, 3], dtype=np.uint8)
# Default usage (bleach method)
>>> transform = A.RandomSnow(p=1.0)
>>> snowy_image = transform(image=image)["image"]
# Using texture method with custom parameters
>>> transform = A.RandomSnow(
... snow_point_range=(0.2, 0.4),
... brightness_coeff=2.0,
... method="texture",
... p=1.0
... )
>>> snowy_image = transform(image=image)["image"]