darsia.affine_balance#

affine_balance(img, swatches_src, swatches_dst)[source]#

Apply the color balance to an image.

Parameters:
imgnp.ndarray

Image to apply the color balance to.

swatches_srcnp.ndarray

Source swatches.

swatches_dstnp.ndarray

Destination swatches.

Returns:
Balanced_img (np.ndarray): Balanced image.