darsia.AdaptiveBalance#
- class AdaptiveBalance[source]#
Bases:
AffineBalanceAffine colour balance whose scaling and translation adapt to the data.
Methods
apply_balance(img)Apply the color balance to an image.
find_balance(swatches_src, swatches_dst[, mode])Find the color balance of an image.
reset()Reset to identity.
Attributes
Balance scaling matrix.
Balance translation vector.
- find_balance(swatches_src, swatches_dst, mode='affine')[source]#
Find the color balance of an image.
- Parameters:
- swatches_src
np.ndarray Source swatches.
- swatches_dst
np.ndarray Destination swatches.
- swatches_src
- balance_scaling#
Balance scaling matrix.
- balance_translation#
Balance translation vector.