Undistort (lens correction)
Try it interactively →POST /api/image-undistortCorrect lens-distortion artefacts (barrel / pincushion) in an image. Accepts the standard 4-coefficient radial-distortion model.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | Input image bytes. |
| cameraMatrix* | string | — | JSON-encoded 9-number array `[fx,0,cx, 0,fy,cy, 0,0,1]`. |
| distCoeffs* | string | — | JSON-encoded array of distortion coefficients (4, 5, 8, 12, or 14 numbers). |
| format | enum (jpeg | png) | "jpeg" | Output encoding. |
| quality | number (1…100) | 90 | JPEG quality. |
Response
Modes: binary, json. Cache: yes (24h TTL).