Documentation Index
Fetch the complete documentation index at: https://mintlify.com/opencv/opencv/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Camera pose estimation determines the position and orientation of a camera relative to a scene or object:- Camera Calibration: Determine intrinsic camera parameters
- PnP (Perspective-n-Point): Estimate pose from 2D-3D correspondences
- Homography-based: Estimate pose from planar objects
- Augmented Reality: Overlay 3D graphics on video
- Visual Odometry: Track camera motion over time
Camera Calibration
Calibrate camera to obtain intrinsic parameters needed for accurate pose estimation.Pose Estimation with solvePnP
Estimate camera pose from known 3D-2D point correspondences.Augmented Reality Application
Overlay 3D graphics on tracked planar objects.- Python
Pose from Homography
Extract pose information from planar object homography.Visual Odometry
Track camera motion over time using feature tracking.PnP Algorithms Comparison
| Algorithm | Speed | Accuracy | Min Points | Use Case |
|---|---|---|---|---|
| ITERATIVE | Medium | Good | 4 | General purpose |
| P3P | Fast | Good | 3 | Minimal case |
| EPNP | Fast | Good | 4+ | Many points |
| DLS | Medium | Very Good | 4+ | High accuracy |
| UPNP | Fast | Good | 4+ | Fast processing |
| IPPE | Fast | Good | 4 (planar) | Planar objects |
| SQPNP | Medium | Excellent | 3+ | Best accuracy |
Best Practices
Use Enough Points
More points = better accuracy:
- Minimum: 4 points for general case
- Recommended: 10+ points
- Use RANSAC for outlier rejection
Coordinate Systems: OpenCV uses right-handed coordinate system:
- X-axis: right
- Y-axis: down
- Z-axis: forward (into scene)
cv.Rodrigues().Troubleshooting
Unstable Pose
Incorrect Pose
Next Steps
- Learn Camera Calibration in detail
- Explore 3D Reconstruction techniques
- Check Feature Matching for point correspondences
- See Video Stabilization for motion estimation
