Reconstruct the matte from the image using the linear coefficients.
tfg.image.matting.reconstruct(
image: type_alias.TensorLike,
coeff_mul: type_alias.TensorLike,
coeff_add: type_alias.TensorLike,
name: str = 'matting_reconstruct'
) -> tf.Tensor
Reconstruct the matte from the image using the linear coefficients (a, b)
returned by the linear_coefficients function.
Args |
image
|
A tensor of shape [B, H, W, C] .
|
coeff_mul
|
A tensor of shape [B, H, W, C] representing the multiplicative
part of the linear coefficients.
|
coeff_add
|
A tensor of shape [B, H, W, 1] representing the additive part
of the linear coefficients.
|
name
|
A name for this op. Defaults to "matting_reconstruct".
|
Returns |
A tensor of shape [B, H, W, 1] containing the mattes.
|
Raises |
ValueError
|
If image , coeff_mul , or coeff_add are not of rank 4. If
the last dimension of coeff_add is not 1. If the batch dimensions of
image , coeff_mul , and coeff_add do not match.
|