darsia.weight#

weight(img, weight)[source]#

Scalar or element-wise weight of images.

Parameters:
imgdarsia.Image

Image.

weightfloat or Image

Weight, either constant, or heterogeneous provided through an image with local coordinates (need to be the same as for the input image).

Returns:
Image

Weighted image.

Raises:
NotImplementedError

If the weight has incompatible size and the images are 3d.

ValueError

If the weight is of unsopported type.