colour_hdri.distortion.apply_radial_gradient#
- colour_hdri.distortion.apply_radial_gradient(image: ArrayLike, scale: ArrayLike = (1, 1), offset: ArrayLike = (0.5, 0.5), intensity: float = 1, bias: float = 1, noise: float = 0) NDArrayFloat [source]#
Apply a radial gradient on given image.
- Parameters:
image (ArrayLike) – Image to apply the radial gradient onto.
scale (ArrayLike) – Radial gradient scale as a ratio of the image height.
offset (ArrayLike) – Radial gradient offset from the image center and as a ratio of image dimensions.
intensity (float) – Radial gradient intensity where a value of 1 produces black at the top and bottom corners.
bias (float) – Power function applied on the gradient.
noise (float) – Noise factor.
- Returns:
Image with radial gradient applied.
- Return type:
Examples
>>> np.around(apply_radial_gradient(np.ones([5, 7])), 3) array([[ 0. , 0.023, 0.212, 0.286, 0.212, 0.023, 0. ], [ 0. , 0.244, 0.511, 0.643, 0.511, 0.244, 0. ], [ 0. , 0.333, 0.667, 1. , 0.667, 0.333, 0. ], [ 0. , 0.244, 0.511, 0.643, 0.511, 0.244, 0. ], [ 0. , 0.023, 0.212, 0.286, 0.212, 0.023, 0. ]])