Adjust the contrast of an image

transform_adjust_contrast(img, contrast_factor)

Arguments

img

A magick-image, array or torch_tensor.

contrast_factor

(float): How much to adjust the contrast. Can be any non negative number. 0 gives a solid gray image, 1 gives the original image while 2 increases the contrast by a factor of 2.