* Project undistorted pinhole-normalised coordinates (X/Z, Y/Z) to pixel * coordinates by delegating distortion application to the canonical * `distortNormalized` from `cameraUndistortion.ts`.
( camera: Camera, nx: number, ny: number )
| 70 | * `distortNormalized` from `cameraUndistortion.ts`. |
| 71 | */ |
| 72 | function projectPoint( |
| 73 | camera: Camera, |
| 74 | nx: number, |
| 75 | ny: number |
| 76 | ): { x: number; y: number } | null { |
| 77 | const i = getCameraIntrinsics(camera); |
| 78 | const d = distortNormalized({ x: nx, y: ny }, i, camera.modelId); |
| 79 | return { x: d.x * i.fx + i.cx, y: d.y * i.fy + i.cy }; |
| 80 | } |
no test coverage detected