← Back to all transforms
RandomShadow
Description
Simulates shadows for the image by reducing the brightness of the image in shadow regions. Args: shadow_roi (tuple): region of the image where shadows will appear (x_min, y_min, x_max, y_max). All values should be in range [0, 1]. num_shadows_limit (tuple): Lower and upper limits for the possible number of shadows. Default: (1, 2). shadow_dimension (int): number of edges in the shadow polygons. Default: 5. shadow_intensity_range (tuple): Range for the shadow intensity. Should be two float values between 0 and 1. Default: (0.5, 0.5). p (float): probability of applying the transform. Default: 0.5. Targets: image Image types: uint8, float32 Reference: https://github.com/UjjwalSaxena/Automold--Road-Augmentation-Library
Parameters
- p: float (default: 0.5)
- shadow_roi: tuple[float, float, float, float] (default: (0, 0.5, 1, 1))
- num_shadows_limit: tuple[int, int] (default: (1, 2))
- shadow_dimension: int (default: 5)
- shadow_intensity_range: tuple[float, float] (default: (0.5, 0.5))
Targets
- Image
Try it out
Original Image (width = 484, height = 733):
Transformed Image:
Transform not yet applied