Blur π¦βπ₯
The cheap box blur before everything else
- nparrays
- dst
Every OpenCV port has the blur nodes, and this is the plain one - cv2.blur, which averages each pixel with its neighbors inside a rectangular kernel. It's the fastest of the blur family and the least subtle: no weighting, no edge preservation, just a flat average. The node description is refreshingly honest about it: "Default anchor is center of the kernel."
When you'd actually use it
Box blur is a workhorse when the goal is denoising before detection, not artistic softening. Run a box blur before Canny or Hough and you'll kill high-frequency speckle that would otherwise generate a thousand spurious edges. It's also the right tool when you want a uniform, slightly "digital" softness - think smoothing a mask or an edge map, where a Gaussian's fancy falloff buys you nothing.
The inputs
nparrays: an NPARRAY from the pack's To Nparray node.ksize_x(default 3) andksize_y(default 1): kernel width and height, both must be odd. The quirk here is friendly:ksize_yset to 1 means "use the same as width" - so the default of 3 / 1 is a clean symmetric 3Γ3 blur, not a weird horizontal streak. Setksize_yto a real odd value only when you want a deliberately rectangular kernel.borderType: pixel extrapolation at the edges - DEFAULT, CONSTANT, REPLICATE, WRAP. REPLICATE (smear the edge pixel) is usually the least surprising; CONSTANT fills with zeros, which can darken borders.
Output
dst - the blurred NPARRAY, same shape as the input. Route it through To Image to preview, or straight into a detection node.
Install
ComfyUI Manager β search ComfyUI-ArchiGraph, or:
cd ComfyUI/custom_nodes
git clone https://github.com/vincentfs/ComfyUI-ArchiGraph
Restart and run the pack's install script once for the OpenCV dependency. Nothing else to download.
Gotchas
ksize_y = 1is shorthand for "same as width," so don't read it as a 1-pixel-tall kernel. If you do set both, they must be odd.- CPU-only, like the rest of the pack's OpenCV section - irrelevant for a single blur, worth knowing if you're blurring thousands of frames.
- It's a sibling of the pack's Gaussian Blur and Median Blur nodes. Reach for this one when you want it fast and uniform; Gaussian for natural softening; Median when you need to kill salt-and-pepper noise specifically.
If you need a blur that's boring on purpose - denoise then detect - this is the one. Don't expect character, that's not the job.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| nparrays | NPARRAY | β | |
| ksize_x | INT | 31β99 | Kernel width. Must be odd and greater than 1. |
| ksize_y | INT | 11β99 | Kernel height. Must be odd and greater than 1. Set to 1 to use same as width. |
| borderType | COMBO | DEFAULT | Pixel extrapolation method |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| dst | NPARRAY | β |