Nodes/comfyui_cv/cv2.reduce
ComfyUI Node

cv2.reduce

Raw wrapper of cv2.reduce(src, dim, rtype, dtype?). 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.reduce
  • src
  • nparray
dim0
rtypeREDUCE_SUM
dtypesame as input
Categoryimage/CV/low-level/cv2 R

Inputs (4)

NameTypeDefaultDescription
srcNPARRAY,IMAGE,MASKinput 2D matrix. 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.
dimINT0-2147483648–2147483647dimension index along which the matrix is reduced. 0 means that the matrix is reduced to a single row. 1 means that the matrix is reduced to a single column.
rtypeCOMBOREDUCE_SUMreduction operation that could be one of #ReduceTypes
dtypeoptCOMBOsame as inputwhen negative, the output vector will have the same type as the input matrix, otherwise, its type will be CV_MAKE_TYPE(CV_MAT_DEPTH(dtype), src.channels()).

Outputs (1)

NameTypeDescription
nparrayNPARRAY