-
Notifications
You must be signed in to change notification settings - Fork 178
Add EQUIRECTANGULAR camera model support for 360° images #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Configure FetchContent to use local COLMAP/PoseLib with equirectangular - Add EQUIRECTANGULAR handling in view_graph_calibration.cc - Support spherical camera intrinsics in camera.h - Enables global SfM pipeline for 360° panoramic images Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflict in cmake/FindDependencies.cmake to keep local COLMAP/PoseLib paths for EQUIRECTANGULAR support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for the EQUIRECTANGULAR camera model to enable global SfM reconstruction with 360° panoramic cameras. The implementation detects spherical camera models and provides compatibility shims for methods that assume perspective projection, while excluding them from focal length calibration.
Changes:
- Added
IsSpherical()method to detect equirectangular/spherical camera models and adaptedFocal(),PrincipalPoint(), andGetK()to return compatibility values for spherical cameras - Modified view graph calibration to skip spherical cameras during focal length estimation
- Updated CMake configuration to use local COLMAP and PoseLib builds with equirectangular support
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| glomap/scene/camera.h | Adds spherical camera detection and compatibility methods for cameras without traditional intrinsics |
| glomap/estimators/view_graph_calibration.cc | Excludes spherical cameras from focal length calibration optimization |
| cmake/FindDependencies.cmake | Configures build to use local dependency versions with equirectangular support |
Comments suppressed due to low confidence (1)
glomap/estimators/view_graph_calibration.cc:185
- Potential index mismatch bug. The FilterImagePairs method iterates through all valid image pairs and accesses residuals by counter, but AddImagePair skips spherical camera pairs without adding residuals to the problem. This means counter will advance for spherical pairs in FilterImagePairs, but no corresponding residuals exist, causing an out-of-bounds access or misaligned residual reading. Need to skip spherical camera pairs in FilterImagePairs similar to AddImagePair.
for (auto& [image_pair_id, image_pair] : view_graph.image_pairs) {
if (image_pair.config != colmap::TwoViewGeometry::CALIBRATED &&
image_pair.config != colmap::TwoViewGeometry::UNCALIBRATED)
continue;
if (image_pair.is_valid == false) continue;
const Eigen::Vector2d error(residuals[counter], residuals[counter + 1]);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use GIT_REPOSITORY in FetchContent instead of hardcoded local paths - Fix M_PI usage with explicit constant value - Add LOG(WARNING) for GetK() on spherical cameras - Use model_id check with fallback to ModelName() for IsSpherical() - Update DatabaseCache::Create to use new Options struct API - Handle std::optional types for TwoViewGeometry fields (F, H, cam2_from_cam1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
This is a great feature. Recently, 360 videos into 3DGS is more popular. Instead of creates cubemap/planar of equirectangular images, it can directly train the equirectangular images with Lichtfeld-Studio/others that has GUT feature. Only agisoft metashape that can handle equirectangular poses. Hopefully glomap can handle it too. |
Summary
Add support for equirectangular (360° panoramic) camera model to enable global SfM reconstruction with 360° cameras like Insta360, Ricoh Theta, etc.
Changes
Camera model support (
glomap/scene/types_sfm.h)EQUIRECTANGULARto CameraModelId enum (ID 10, matching COLMAP)Intrinsic handling (
glomap/scene/types_sfm.cc)Camera::GetK()(returns identity - no focal length)InitializeCamera()for EQUIRECTANGULAR modelCMake configuration (
cmake/FindDependencies.cmake)Dependencies
This PR depends on equirectangular support being merged in:
Test plan
🤖 Generated with Claude Code