# Module: tfg.image.matting

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/image/matting.py) |

This module implements image matting functionalities.

## Functions

[`build_matrices(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/image/matting/build_matrices): Generates the closed form matting Laplacian.

[`linear_coefficients(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/image/matting/linear_coefficients): Computes the matting linear coefficients.

[`loss(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/image/matting/loss): Computes the matting loss function based on the matting Laplacian.

[`reconstruct(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/image/matting/reconstruct): Reconstruct the matte from the image using the linear coefficients.