- torchvision.transforms.functional.adjust_saturation(img: Tensor, saturation_factor: float) Tensor ¶
Adjust color saturation of an image.
img (PIL Image or Tensor) – Image to be adjusted. If img is torch Tensor, it is expected to be in […, 1 or 3, H, W] format, where … means it can have an arbitrary number of leading dimensions.
saturation_factor (float) – How much to adjust the saturation. 0 will give a black and white image, 1 will give the original image while 2 will enhance the saturation by a factor of 2.
Saturation adjusted image.
- Return type:
PIL Image or Tensor