OpenCV boxFilter_1
The redundant twin of the general box filter
- src
- dst
- nparray
Here's the short version: OpenCV boxFilter_1 is the same node as boxFilter_0. The opencv-comfyui generator extracted every top-level cv2 function from OpenCV's type stubs, numbered the overloads, and shipped them all - so _0 and _1 are two signatures of the same cv2.boxFilter, and for anything you'll actually do they're interchangeable. You can stop comparing them and pick one.
So what is boxFilter? The general form of the box blur. Each pixel becomes a function of its ksize neighborhood - the sum, and with normalize checked, the average. That boolean is the whole difference:
- normalize = True → a plain average → a box blur, the fastest cheap smoothing OpenCV has.
- normalize = False → the raw window sum → values blow past 255 quickly; only useful if you're deliberately doing sum math and rescaling yourself.
In the deterministic post-processing layer (per the KB, "almost none of this is AI"), this is a millisecond primitive - the kind of thing you chain inside a bigger CV pipeline, not a node you build a workflow around. The blur node in this same pack is literally boxFilter with normalize on.
Inputs
- src -
NPARRAY(BGR,uint8; viaImage2Nparray). - ddepth - INT, output depth;
-1keeps the source depth, which is what you want. - ksize - STRING literal,
[5, 5], odd numbers. Literal syntax errors throw the pack's trademarkinvalid syntax (<unknown>, line 0). - normalize - BOOLEAN; the on/off switch between blur and sum.
- anchor - STRING literal
(-1, -1)for center anchoring. - borderType - INT,
4is the default and fine. - dst (optional) - out-parameter; leave unwired.
Output: one nparray → Nparrays2Image.
Install and the usual caveats
ComfyUI Manager → opencv-comfyui, or clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, restart. Needs opencv-contrib-python.
Same pack-wide rules as every sibling: batch size 1 only, NPARRAY in means BGR/uint8/0–255 and you handle conversions. If your result looks like a bright smear instead of a blur, you've got normalize off - flip it. Otherwise, treat this node like its twin: reach for it when you need the general filter, and don't overthink the _1.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| ddepth | INT | — | |
| ksize | STRING | — | |
| anchor | STRING | — | |
| normalize | BOOLEAN | — | |
| borderType | INT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |