adjust_saturation¶
- torchvision.transforms.functional.adjust_saturation(img: Tensor, saturation_factor: float) Tensor[source]¶
調整影像的顏色飽和度。
- 引數:
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) – 調整飽和度的程度。0 將得到黑白影像,1 將得到原始影像,而 2 將使飽和度增強 2 倍。
- 返回:
飽和度調整後的影像。
- 返回型別:
PIL 影像或張量