darsia.AdaptiveBalance#

class AdaptiveBalance[source]#

Bases: AffineBalance

Affine 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

Balance scaling matrix.

balance_translation

Balance translation vector.

find_balance(swatches_src, swatches_dst, mode='affine')[source]#

Find the color balance of an image.

Parameters:
swatches_srcnp.ndarray

Source swatches.

swatches_dstnp.ndarray

Destination swatches.

reset()[source]#

Reset to identity.

balance_scaling#

Balance scaling matrix.

balance_translation#

Balance translation vector.