darsia.WhiteBalance#

class WhiteBalance[source]#

Bases: BaseBalance

Class for finding and applying a diagional linear balance.

Methods

apply_balance(img)

Apply the color balance to an image.

find_balance(swatches_src, swatches_dst)

Find the color balance of an image.

Attributes

balance_scaling

White balance (diagonal) matrix.

find_balance(swatches_src, swatches_dst)[source]#

Find the color balance of an image.

Parameters:
swatches_srcnp.ndarray

Source swatches.

swatches_dstnp.ndarray

Destination swatches.

balance_scaling#

White balance (diagonal) matrix.