OpenCV sqrt_1
Sqrt_1 — the twin that's identical, and why that's fine
- src
- dst
- nparray
sqrt_1 is, functionally, a duplicate of sqrt_0. I verified it in the generated source: identical class, identical inputs, identical call to cv2.sqrt. The _1 suffix is an artifact of the pack auto-generating a node for each numbered overload in OpenCV's type stubs and not collapsing the duplicates. There is no behavioral difference between them. Use whichever is closer on the canvas and forget the other one exists.
What you're actually getting is the element-wise square root: every pixel value becomes its square root. Alone that's a curiosity; in combination it's genuinely useful. It's the second half of the local-variance pipeline - run sqrBoxFilter_0 (mean of squared pixels over a window) into sqrt_0 or sqrt_1 and you get a local root-mean-square map; subtract the mean square first and you get local standard deviation. That's the classic contrast/texture map you'd use to weight sharpening, denoising, or any effect that should bite harder in detailed regions. This pack hands you the raw ingredients and expects you to know the recipe - this is one of the tastier combos.
Inputs and output. One required input, src (NPARRAY), and an optional dst out-parameter you should leave disconnected (the README says to skip those). Output is a single nparray. Remember the type contract: this pack runs on numpy arrays in BGR, 0–255, uint8 - not ComfyUI IMAGE tensors. Convert in with Image2Nparray (batch_size 1 only; on batches use ImageFromBatch(length=1)), convert out with Nparrays2Image.
Setup. ComfyUI Manager → search "opencv-comfyui", or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
restart, and you're done. The dependency that might be missing is opencv-contrib-python (pip install opencv-python-contrib); if you hit the Cannot import name 'guidedFilter' from 'cv2.ximgproc' error, fix the conflicting OpenCV installs before anything else. One thing worth knowing about this pack overall: it's auto-generated, unpolished, and the author says so outright - "Expect dragons!" - so the square-root node is the least of your surprises. It works, it's just bare.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |