tfg.image.matting.reconstruct
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[null,null,["Last updated 2022-10-28 UTC."],[],[]]