ComfyUI Node
cv2.seamlessClone
Raw wrapper of cv2.seamlessClone(src, dst, mask, p, flags). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.seamlessClone
- src
- dst
- p
- mask
- result
◄flagsNORMAL_CLONE►
Categoryimage/CV/low-level/cv2 S
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY,IMAGE,MASK | The source image (8-bit 3-channel), from which a region will be blended into the destination. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| dst | COMFY_MATCHTYPE_V3 | The destination image (8-bit 3-channel), where the src image will be blended. The image output(s) echo this input's format. The low-level cv2 function writes its result into this array in place, but this wrapper passes cv2 a private copy, so your input array is never modified. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| p | CV_TUPLE | 0,0 | The point where the center of the src image is placed in the dst image. One value with 2 components (x, y) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place. |
| flags | COMBO | NORMAL_CLONE | Flags that control the type of cloning method, can take values of `cv::SeamlessCloneFlags`. |
| maskopt | NPARRAY,IMAGE,MASK | A binary mask (8-bit, 1, 3, or 4-channel) specifying the region in the source image to blend. Non-zero pixels indicate the region to be blended. If an empty Mat is provided, a mask with all non-zero pixels is created internally. Optional - leave unconnected for the OpenCV default (None). Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | COMFY_MATCHTYPE_V3 | Echoes the 'dst' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY. |