adjust_brightness¶
- torchvision.transforms.functional.adjust_brightness(img: Tensor, brightness_factor: float) Tensor[原始碼]¶
調整影像亮度。
- 引數:
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.
brightness_factor (float) – 調整亮度的程度。可以是任何非負數。0 會得到一張黑色影像,1 會得到原始影像,而 2 會將亮度提高一倍。
- 返回:
亮度調整後的影像。
- 返回型別:
PIL 影像或張量