OpenCV warpPolar_1
The second polar warp overload — same vortex, same flags, pick one
- src
- dst
- nparray
warpPolar_1 is the _1 overload of cv2.warpPolar, and in this pack it's a functional twin of warpPolar_0. Same inputs, same behavior, same little-planet output. The generator numbered the OpenCV overloads and both collapsed into the same wrapper, so there's no reason to agonize over which you grab - ComfyUI will happily let you use either.
The function is the fun one in the geometric-warp family. warpPolar remaps an image between polar and Cartesian coordinates around a center point, bounded by a maxRadius, into an output of dsize. That's the machinery behind "little planet" images (a flat scene swirling into a circular sphere view), unrolling an annular texture into a strip, and unwrapping a circular fisheye projection. You control the flavor with flags: WARP_POLAR_LINEAR (256) for even radial spacing, WARP_POLAR_LOG (512) to spread out the center logarithmically like a fisheye unwrap, and WARP_INVERSE_MAP (16) to go backwards from polar to Cartesian.
Inputs and outputs
src-NPARRAYimage viaImage2Nparray.dsize- output size literal, e.g.(720, 360).center- literal point,(256, 256)or(w // 2, h // 2)- the//works because the pack parses it as Python.maxRadius-FLOAT; the radius that maps to the output's edge.flags- interpolation plus mode.257= linear + linear-polar;513= linear + log-polar.
Skip optional dst. Output: one nparray.
Installing
Same as every node here:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
or ComfyUI Manager, search "opencv-comfyui", install, restart. Dependencies: opencv-contrib-python, numpy, torch.
Quick gotchas
The flags are unforgiving and unlabeled - test 256 vs 512 on a copy before you commit to a look. center and dsize are literal strings, so invalid syntax (<unknown>, line 0) means you wrote them as bare numbers instead of tuples. And the forward output is a polar strip, not a picture - don't panic when it looks like abstract mush; that's what a polar map is supposed to look like until you use it or invert it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| src | NPARRAY | — | |
| dsize | STRING | — | |
| center | STRING | — | |
| maxRadius | FLOAT | — | |
| flags | INT | — | |
| dstopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |