Nodes/comfyui_cv/cv2.seamlessClone
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.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.seamlessClone
  • src
  • dst
  • p
  • mask
  • result
flagsNORMAL_CLONE
Categoryimage/CV/low-level/cv2 S

Inputs (5)

NameTypeDefaultDescription
srcNPARRAY,IMAGE,MASKThe 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.
dstCOMFY_MATCHTYPE_V3The 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.
pCV_TUPLE0,0The 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.
flagsCOMBONORMAL_CLONEFlags that control the type of cloning method, can take values of `cv::SeamlessCloneFlags`.
maskoptNPARRAY,IMAGE,MASKA 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)

NameTypeDescription
resultCOMFY_MATCHTYPE_V3Echoes the 'dst' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY.