imagecat.operator.cryptomatte module¶
Functionality for working with Cryptomattes, see https://github.com/Psyop/Cryptomatte.
- imagecat.operator.cryptomatte.decoder(graph, name, inputs)[source]¶
Extract matte(s) from an image containing Cryptomatte data.
- Parameters
graph (Graph, required) – Graphcat graph that owns this task.
name (hashable object, required) – Name of the task executing this function.
inputs (Named Inputs, required) – Inputs for this operator.
- Named Inputs
clown (
bool
, optional) – IfTrue
, extract a clown matte containing a unique color for the ID that has the greatest coverage in a given pixel. Default:False
image (
imagecat.data.Image
, required) – Image containing Cryptomatte data to be decoded.layer (
str
, optional) – Output matte layer name. Default: “M”.mattes (
list
ofstr
, optional) – List of mattes to extract. The output will contain the union of all the given mattes. Default: [], which returns an empty matte.cryptomatte (
str
, optional) – Name of the Cryptomatte to extract. Use this parameter to control which Cryptomatte to use, for images that contain multiple Cryptomattes. Default:None
, which will match one Cryptomatte or raise an exception if there is more than one.
- Returns
matte – The extracted matte.
- Return type