transform_adjust_saturation: Adjust the color saturation of an image

transform_adjust_saturationR Documentation

Adjust the color saturation of an image

Description

Adjust the color saturation of an image

Usage

transform_adjust_saturation(img, saturation_factor)

Arguments

img

A magick-image, array or torch_tensor.

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.

See Also

Other unitary_transforms: transform_adjust_brightness(), transform_adjust_contrast(), transform_adjust_gamma(), transform_adjust_hue(), transform_affine(), transform_center_crop(), transform_convert_image_dtype(), transform_crop(), transform_grayscale(), transform_hflip(), transform_linear_transformation(), transform_normalize(), transform_pad(), transform_perspective(), transform_resize(), transform_rgb_to_grayscale(), transform_rotate(), transform_to_tensor(), transform_vflip()


torchvision documentation built on Nov. 6, 2025, 9:07 a.m.