ComfyUI Node
cv2.adaptiveThreshold
Raw wrapper of cv2.adaptiveThreshold(src, maxValue, adaptiveMethod, thresholdType, blockSize, C). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.
cv2.adaptiveThreshold
- src
- result
◄maxValue0.0000►
◄adaptiveMethodADAPTIVE_THRESH_GAUSSIAN_C►
◄thresholdTypeTHRESH_BINARY►
◄blockSize0►
◄C0.0000►
Categoryimage/CV/low-level/cv2 A
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| src | COMFY_MATCHTYPE_V3 | Source 8-bit single-channel 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. | |
| maxValue | FLOAT | 0.0000-1e+38–1e+38 | Non-zero value assigned to the pixels for which the condition is satisfied |
| adaptiveMethod | COMBO | ADAPTIVE_THRESH_GAUSSIAN_C | Adaptive thresholding algorithm to use, see #AdaptiveThresholdTypes. The #BORDER_REPLICATE | #BORDER_ISOLATED is used to process boundaries. |
| thresholdType | COMBO | THRESH_BINARY | Thresholding type that must be either #THRESH_BINARY or #THRESH_BINARY_INV, see #ThresholdTypes. |
| blockSize | INT | 0-2147483648–2147483647 | Size of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on. |
| C | FLOAT | 0.0000-1e+38–1e+38 | Constant subtracted from the mean or weighted mean (see the details below). Normally, it is positive but may be zero or negative as well. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | COMFY_MATCHTYPE_V3 | Echoes the 'src' input's format: an IMAGE link comes back as IMAGE, MASK as MASK, NPARRAY stays NPARRAY. |