ComfyUI Node
CV Omnidir Undistort
Re-projects an omnidirectional image (cv2.omnidir.undistortImage). Unlike the pinhole and fisheye undistorters there is no single 'undistorted' answer, because the source view is wider than a plane can hold: pick the PROJECTION. 'perspective' gives a normal photo of the middle and throws the rest away, 'cylindrical' and 'longitude-latitude' unroll the whole field into a panorama-style strip, and 'stereographic' keeps angles locally. The output camera matrix is derived from 'new_focal' for the perspective/stereographic modes; the two unrolled modes need the width/height-over-pi form instead, which 'auto' builds for you (a perspective-style K there gives a black or wildly cropped image, and cv2 does not complain).
CV Omnidir Undistort
- image
- camera_matrix
- dist_coeffs
- view_rotation
- image
- new_camera_matrix
◄xi0.80►
◄projectionRECTIFY_PERSPECTIVE►
◄new_focal200►
Categoryimage/CV/features
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMFY_MATCHTYPE_V3 | The omnidirectional image. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| camera_matrix | NPARRAY | 3x3 K from 'Omnidir Calibrate'. | |
| dist_coeffs | NPARRAY | FOUR omnidir coefficients (k1, k2, p1, p2). | |
| xi | FLOAT | 0.800–10 | CMei's mirror parameter from 'Omnidir Calibrate'. |
| projection | COMBO | RECTIFY_PERSPECTIVE | RECTIFY_PERSPECTIVE: a flat photo of the centre. CYLINDRICAL / LONGLATI: the whole field unrolled. STEREOGRAPHIC: conformal, keeps local shapes. |
| new_focal | FLOAT | 2000–10000 | Focal length of the output camera in pixels (perspective / stereographic only): smaller = wider view, more of the sphere squeezed in. 0 = auto (a quarter of the output width). Ignored by the two unrolled projections. |
| view_rotationopt | NPARRAY | Where to AIM the output view: a 3x3 rotation (or a 3x1 Rodrigues vector) applied before the re-projection. Identity looks along the optical axis, which for a mirror rig is the middle of the reflection - anything near the rim gets cropped out of a perspective view, and this is the only way to point at it. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | COMFY_MATCHTYPE_V3 | The re-projected image, same size as the input. |
| new_camera_matrix | NPARRAY | The 3x3 K the output is expressed in. |