← Back to all transforms

InvertImg

Description

Invert the input image by subtracting pixel values from max values of the image types,
    i.e., 255 for uint8 and 1.0 for float32.

    Args:
        p: probability of applying the transform. Default: 0.5.

    Targets:
        image

    Image types:
        uint8, float32

    Number of channels:
        Any

    

Parameters

  • p: float (default: 0.5)

Targets

  • Image

Try it out

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

Original

Transformed Image:

Transform not yet applied