solarize#
- torchaug.transforms.functional.solarize(img, threshold, value_check=False)[source]#
Solarize an RGB/grayscale image by inverting all pixel values above a threshold.
- Parameters:
img (
Tensor) – Image to have its colors inverted. It is expected to be in […, 1 or 3, H, W] format, where … means it can have an arbitrary number of dimensions. If img is PIL Image, it is expected to be in mode “L” or “RGB”.threshold (
int|float|Tensor) – All pixels equal or above this value are inverted.value_check (
bool, optional) – Bool to perform tensor value check. Might cause slow down on some devices because of synchronization.Default:False- Return type:
Tensor- Returns:
Solarized image.