Nodes/comfyui_cv/CV Polynomial Radial Map
ComfyUI Node

CV Polynomial Radial Map

Radial polynomial warp: the distance r of each pixel from the center is scaled by P(r) = c0 + c1*r + c2*r² + ... + cn*r^n (coefficients are an NPARRAY input). r' = r * P(r) gives the sampling radius for that pixel. A single coefficient [1.0] is the identity; the three-coefficient set [1+s, -2s, s] reproduces the radial-extrapolate formula r' = r * (1 + s*(1-r)²), where s>0 pushes outer content outward (magnifies the center) and s<0 pinches toward it. Coefficients are a data input, so the SAME array can feed multiple nodes and branches. Chains with other remap generators (Identity Map -> this -> Wave Map -> ... -> cv2_remap) for one-pass resampling.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Polynomial Radial Map
  • map_x
  • map_y
  • coeffs
  • map_x
  • map_y
center_x0.50
center_y0.50
Categoryimage/CV/remap

Inputs (5)

NameTypeDefaultDescription
map_xNPARRAYIncoming source-x coordinate map. Start the chain with 'CV Identity Map'; further remap nodes compose onto it.
map_yNPARRAYIncoming source-y coordinate map (same shape as map_x - both come from the same chain).
coeffsNPARRAY1D polynomial coefficients [c0, c1, c2, ..., cn]. P(r) = c0 + c1*r + c2*r² + ... + cn*r^n, and r' = r * P(r). For the radial-extrapolate formula use [1+s, -2s, s] (s = strength). Create the array with 'CV Scalar', e.g. '(1.3, -0.6, 0.3)' for s=0.3.
center_xoptFLOAT0.500–1Center of the radial effect as a fraction of the image width.
center_yoptFLOAT0.500–1Center of the radial effect as a fraction of the image height.

Outputs (2)

NameTypeDescription
map_xNPARRAY
map_yNPARRAY