Nodes/comfyui_cv/cv2.putText
ComfyUI Node

cv2.putText

Raw wrapper of cv2.putText(source, text, org, fontFace, fontScale, color, thickness?, lineType?, bottomLeftOrigin?). 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.putText
  • source
  • org
  • result
text
fontFaceFONT_HERSHEY_SIMPLEX
fontScale0.0000
color(0, 0, 0, 0)
thickness1
lineTypeLINE_AA
bottomLeftOriginfalse
Categoryimage/CV/low-level/cv2 P

Inputs (9)

NameTypeDefaultDescription
sourceCOMFY_MATCHTYPE_V3 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.
textSTRINGText string to be drawn.
orgCV_TUPLE0,0Bottom-left corner of the text string in 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.
fontFaceCOMBOFONT_HERSHEY_SIMPLEXFont type, see #HersheyFonts.
fontScaleFLOAT0.0000-1e+38–1e+38Font scale factor that is multiplied by the font-specific base size.
colorSTRING(0, 0, 0, 0)Text color. cv2 Scalar as a literal, e.g. "(0, 255, 0)" (BGR) or "(0, 255, 0, 64)" (BGRA). A bare number broadcasts to every component, so "255" means (255, 255, 255, 255). Components past the target's channel count are ignored by OpenCV.
thicknessoptINT1-2147483648–2147483647Thickness of the lines used to draw a text. Preset to the OpenCV default (1).
lineTypeoptCOMBOLINE_AALine type. See #LineTypes
bottomLeftOriginoptBOOLEANfalseWhen true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner. Preset to the OpenCV default (False).

Outputs (1)

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