← Back to all transforms

RandomSunFlare

Description

Simulates Sun Flare for the image

    Args:
        flare_roi (tuple[float, float, float, float]): Tuple specifying the region of the image where flare will
            appear (x_min, y_min, x_max, y_max). All values should be in range [0, 1].
        src_radius (int): Radius of the source for the flare.
        src_color (tuple[int, int, int]): Color of the flare as an (R, G, B) tuple.
        angle_range (tuple[float, float]): tuple specifying the range of angles for the flare.
            Both ends of the range are in the [0, 1] interval.
        num_flare_circles_range (tuple[int, int]): tuple specifying the range for the number of flare circles.
        p (float): Probability of applying the transform.

    Targets:
        image

    Image types:
        uint8

    Reference:
        https://github.com/UjjwalSaxena/Automold--Road-Augmentation-Library
    

Parameters

  • p: float (default: 0.5)
  • flare_roi: tuple[float, float, float, float] (default: (0, 0, 1, 0.5))
  • src_radius: int (default: 400)
  • src_color: tuple[int, ...] (default: (255, 255, 255))
  • angle_range: tuple[float, float] (default: (0, 1))
  • num_flare_circles_range: tuple[int, int] (default: (6, 10))

Targets

  • Image

Try it out

Original Image (width = 484, height = 733):

Original

Transformed Image:

Transform not yet applied