Using unprojection maps¶
Unprojection maps convert a point in the original camera image into a viewing ray. Use them for tasks such as custom 3D reconstruction when your software does not implement Calib GEOM's camera model.
They do not undistort the image. To create an undistorted image, use lens distortion maps.
Exporting maps¶
Choose Calibration → Export Unprojection Maps after completing the calibration. Keep the complete set of files for each camera.
| Export type | Files per camera |
|---|---|
| Central cameras | camera_N_mapX.tiff, camera_N_mapY.tiff, camera_N_mapZ.tiff: the ray direction |
| A setup containing any non-central camera | camera_N_mapOx.tiff, camera_N_mapOy.tiff, camera_N_mapOz.tiff: the origin; camera_N_mapDx.tiff, camera_N_mapDy.tiff, camera_N_mapDz.tiff: the direction |
When any camera is non-central, all cameras in that export use the six-file format. Origins are in metres in the camera's coordinate frame.
Using the maps¶
The libCalibGeom documentation includes a C++ example that reads a ray at a chosen image position. libCalibGeom is a separate product and is not included with Calib GEOM. This map example uses OpenCV and does not require the libCalibGeom library at runtime.
Run the example as:
unprojection_maps exports/camera_0 xyz 200.23 103.356
Use xyz for a three-file direction export. For the six-file format, use:
unprojection_maps exports/camera_0 rays 200.23 103.356
The example prints the ray origin and direction. Coordinates are zero-based: the first value is horizontal and the second is vertical. Your OpenCV installation must support float32 TIFF with Zstandard compression.
Integration notes¶
- Rays are expressed in each camera's own frame. Transform them to a common frame before combining measurements from different cameras.
- Keep the ray origin for a non-central camera; its rays do not all start at one camera centre.
- At subpixel positions, interpolate the map components and normalize the resulting direction.
- Reject invalid samples and points outside the map instead of treating them as zero-length rays.
See Exporting calibration parameters for camera transform conventions.