Mask Logic Operation
Function Description
Performs pixel-wise logical operations on two groups of mask images of the same size.
Use Cases
General-purpose logical operation step for mask lists, with no fixed application scenario.
Inputs
Mask Images (Required): A group of mask images.
Reference Mask Images (Required): Another group of mask images (same size as the first group).
Outputs
Mask Images: Mask images after logical operation.
Parameters
Bool Logic Type
Selects the type of logical operation to perform, including the following options:
AND: Extracts the common parts of the two masks.
OR: Merges the two input masks.
XOR: Removes the common parts of the two masks.
NOT: Performs inversion operation on the first input mask image. Black parts (usually background) become white, and white parts (usually object contours or edges) become black.
Correspondence Type
This parameter specifies the correspondence relationship between masks in the two input mask lists. When NOT operation is selected, there is no correspondence type parameter.
FirstToAll: Only uses the first mask in the second group, corresponding to the first group of masks.
OneToOne: Default value. Uses all masks in the second group, corresponding one-to-one with the first group of masks.