RSVP for your your local TensorFlow Everywhere event today!

tfg.image.matting.reconstruct

Reconstruct the matte from the image using the linear coefficients.

Reconstruct the matte from the image using the linear coefficients (a, b) returned by the linear_coefficients function.

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".

A tensor of shape [B, H, W, 1] containing the mattes.

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.