Logical Operation Filter
Works with masks as its input and performs basic logical operations on them.
Category |
|
Node |
|
Parameters |
OperationType: the type of logical operation to perform. Not will invert a mask (the node will only have a single input in that case); And will calculate the intersection of two masks; Or will calculate the union of two masks; and Xor will calculate the symmetric difference of two masks. |
Inputs |
Input (when OperationType is Not): the input mask to invert Input 1 (when OperationType is not Not): the first mask operand Input 2 (when OperationType is not Not): the second mask operand |
Outputs |
Output: the resulting mask |
Effect of the Filter
This filter applies two either one or two masks and
Unary Operations
When OperationType is set to Not, the filter has only a single input, and that input will be inverted. The following table describes how each individual pixel will be mapped by this filter.
Input |
Output |
---|---|
Background |
Foreground |
Foreground |
Background |
Binary Operations
For all other operation types the filter has two inputs. The following table describes how each individual pixel will be treated based on the input mask values of passed to this filter:
Input 1 |
Input 2 |
And |
Or |
Xor |
---|---|---|---|---|
Background |
Background |
Background |
Background |
Background |
Background |
Foreground |
Background |
Foreground |
Foreground |
Foreground |
Background |
Background |
Foreground |
Foreground |
Foreground |
Foreground |
Foreground |
Foreground |
Background |