Overview
ORB-SLAM3 supports two geometric camera models to handle different lens types:Pinhole
Standard perspective projection for traditional cameras and narrow field-of-view lenses.
Fisheye (Kannala-Brandt)
Wide-angle and fisheye lenses with significant distortion, using the Kannala-Brandt model.
GeometricCamera class and provide projection, unprojection, and feature triangulation capabilities.
Pinhole Camera Model
Overview
The Pinhole model implements standard perspective projection with radial and tangential distortion correction. Definition:include/CameraModels/Pinhole.h:29-96
Parameters
The pinhole model uses 4 intrinsic parameters:Focal length in x-direction (pixels)
Focal length in y-direction (pixels)
Principal point x-coordinate (pixels)
Principal point y-coordinate (pixels)
Projection Model
The pinhole projection follows the standard camera model:Camera Matrix
The intrinsic matrix K is constructed as:Configuration Example
Use Cases
Use Pinhole model for:
- Standard cameras (webcams, DSLR, etc.)
- Narrow to moderate field-of-view (less than 90 degrees)
- Lenses with minimal distortion
- EuRoC MAV dataset (stereo pinhole)
Fisheye Camera Model (Kannala-Brandt)
Overview
The Kannala-Brandt8 model handles wide-angle and fisheye lenses with extreme distortion using a more sophisticated projection model. Definition:include/CameraModels/KannalaBrandt8.h:30-111
Parameters
The Kannala-Brandt model uses 8 parameters:Standard intrinsic parameters (same as pinhole)
Fisheye distortion coefficients modeling radial distortion
Numerical precision for iterative unprojection
Projection Model
The fisheye model uses a polynomial approximation:The unprojection (2D → 3D) requires iterative solving due to the non-linear distortion model, which is why a precision parameter is provided.
Configuration Example
Overlapping Field-of-View
For stereo fisheye, the system can use overlapping regions:Fisheye stereo doesn’t require rectification - ORB-SLAM3 works with the original distorted images.
Use Cases
Use Kannala-Brandt model for:
- Wide-angle lenses (>90° FOV)
- Fisheye lenses (>180° FOV)
- Action cameras (GoPro, etc.)
- TUM-VI dataset (fisheye stereo)
- Applications requiring maximum field of view
Camera Type Enumeration
Camera types are distinguished by themnType field:
Stereo Configurations
Rectification
- Pinhole Stereo
- Fisheye Stereo
Rectification required for standard stereo matching.
Camera Calibration
Calibration Process
Capture Calibration Images
Record 20-30 images of a checkerboard or calibration pattern from different angles and distances.
Run Calibration Tool
Use OpenCV calibration tools or MATLAB Camera Calibrator:
- For Pinhole: standard
calibrateCamera() - For Fisheye:
fisheye::calibrate()
Advanced Features
Two-View Reconstruction
Both camera models support robust two-view initialization:- Estimates relative camera pose from matched features
- Triangulates 3D points
- Used during system initialization
Epipolar Constraints
Feature Triangulation
Kannala-Brandt8 provides specialized triangulation:Model Comparison
| Feature | Pinhole | Kannala-Brandt8 |
|---|---|---|
| Parameters | 4 (fx, fy, cx, cy) | 8 (fx, fy, cx, cy, k0-k3) |
| FOV Range | Less than 90° optimal | 90°-220° |
| Rectification | Required (stereo) | Not needed |
| Unprojection | Closed-form | Iterative |
| Distortion Model | Radial-tangential | Polynomial radial |
| Computation | Faster | Slightly slower |
| Datasets | EuRoC, KITTI | TUM-VI |
Related Topics
Sensor Modes
Choose your sensor configuration (mono, stereo, RGB-D)
Configuration Files
Complete YAML configuration reference
Calibration Tutorial
Step-by-step camera calibration guide
Examples
Run examples with different camera models
Best Practices
Choosing the Right Model
Choosing the Right Model
- Use Pinhole for standard cameras and lenses with FOV < 90°
- Use Kannala-Brandt8 for wide-angle (>90°) or fisheye lenses
- Never use pinhole model for fisheye lenses - accuracy will be poor
Calibration Quality
Calibration Quality
- Ensure low reprojection error (< 0.5 pixels)
- Calibrate at the same resolution you’ll use for SLAM
- Cover the entire image area during calibration
- Use at least 20 calibration images
Runtime Considerations
Runtime Considerations
- Pinhole projection is faster than fisheye
- Fisheye unprojection requires iteration (precision parameter)
- Both models are optimized for real-time performance