Overview
The Stitching module provides a complete pipeline for creating panoramas from multiple images. It handles:- Feature detection and matching
- Camera parameter estimation
- Image warping
- Exposure compensation
- Seam finding
- Image blending
Quick Start
Simple Panorama
Stitcher Modes
PANORAMA Mode
For regular camera photos:- Expects perspective transformations
- Uses homography-based estimation
- Projects to spherical surface
- Applies exposure compensation
SCANS Mode
For scanned images or documents:- Expects affine transformations
- No exposure compensation
- Better for flat scans
Stitching Pipeline
Step-by-Step Process
Advanced Configuration
Feature Detection
Feature Matching
Warping
Exposure Compensation
Seam Finding
Blending
Resolution Control
Error Handling
Complete Example: Custom Pipeline
Best Practices
Overlapping Images
30-50% overlap between adjacent images
Consistent Exposure
Use manual exposure or lock exposure
Fixed Focal Length
Avoid zooming between shots
Steady Camera
Use tripod for best results
Performance Optimization
Troubleshooting
Stitching Fails
- Check image overlap (needs 30%+)
- Ensure similar lighting
- Try different feature detectors
- Increase confidence threshold
Poor Quality
- Increase registration resolution
- Use graph cut seam finder
- Use multi-band blending
- Enable exposure compensation
See Also
- Features2D Module - Feature detection
- Calib3D Module - Camera calibration
- Stitching Tutorial
