← Back to all transforms
RGBShift
Description
Randomly shift values for each channel of the input RGB image. Args: r_shift_limit: range for changing values for the red channel. If r_shift_limit is a single int, the range will be (-r_shift_limit, r_shift_limit). Default: (-20, 20). g_shift_limit: range for changing values for the green channel. If g_shift_limit is a single int, the range will be (-g_shift_limit, g_shift_limit). Default: (-20, 20). b_shift_limit: range for changing values for the blue channel. If b_shift_limit is a single int, the range will be (-b_shift_limit, b_shift_limit). Default: (-20, 20). p: probability of applying the transform. Default: 0.5. Targets: image Image types: uint8, float32
Parameters
- p: float (default: 0.5)
- r_shift_limit: int | tuple[int, int] | float | tuple[float, float] (default: (-20, 20))
- g_shift_limit: int | tuple[int, int] | float | tuple[float, float] (default: (-20, 20))
- b_shift_limit: int | tuple[int, int] | float | tuple[float, float] (default: (-20, 20))
Targets
- Image
Try it out
Original Image (width = 484, height = 733):
Transformed Image:
Transform not yet applied