Nodes/comfyui_cv/cv2.getRectSubPix
ComfyUI Node

cv2.getRectSubPix

Raw wrapper of cv2.getRectSubPix(image, patchSize, center, patchType?). 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.getRectSubPix
  • image
  • patchSize
  • center
  • result
patchTypesame as input
Categoryimage/CV/low-level/cv2 G

Inputs (4)

NameTypeDefaultDescription
imageCOMFY_MATCHTYPE_V3Source image. The image output(s) echo this input's format. 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.
patchSizeCV_TUPLE0,0Size of the extracted patch. One value with 2 components (w, h) - it travels as a whole, so it cannot arrive half-connected. Wire it from 'CV Tuple' or type the components in place.
centerCV_TUPLE0,0Floating point coordinates of the center of the extracted rectangle within the source image. The center must be inside the 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.
patchTypeoptCOMBOsame as inputDepth of the extracted pixels. By default, they have the same depth as src .

Outputs (1)

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