Why GLOMAP Is Filtering All Your Views
The console output:
Filtered 231 relative poses with inlier number < 2
Filtered 0 relative poses with inlier ratio < 0.25
means that GLOMAP is discarding almost all relative poses between your images because they do not meet the minimum inlier threshold. This is followed by a segmentation fault, indicating a crash likely due to the absence of valid data for subsequent processing.
What Does This Filtering Mean?
- Relative poses are the estimated geometric relationships (rotation and translation) between pairs of images, computed from feature correspondences.
- Inlier number < 2: GLOMAP requires at least 2 inlier correspondences (feature matches that agree with the estimated geometry) for a relative pose to be considered valid. If a pair has fewer than 2 inliers, it is filtered out[11][5].
- Inlier ratio < 0.25: This is a secondary filter, discarding pairs where fewer than 25% of matches are inliers. In your case, this filter is not removing any additional pairs, as all were already filtered by the first criterion.
Why Are All Relative Poses Filtered?
This typically indicates a problem with the input data or the feature matching process. Common causes include:
- Poor feature matching: Not enough reliable correspondences are found between images, possibly due to low texture, repetitive patterns, or insufficient overlap between images[3][5][11].
- Incorrect camera intrinsics: If camera parameters are wrong or missing, two-view geometry estimation can fail, leading to very few inliers[5].
- Too strict filtering thresholds: The default or user-specified thresholds for inlier count or ratio may be too high for your dataset.
- Degenerate geometry: If your images are nearly collinear (e.g., taken along a straight line) or planar, the geometry may be ambiguous, making robust pose estimation difficult[5][11].
- Data corruption or preprocessing errors: If images are corrupted or not properly preprocessed, feature extraction and matching can fail.
Why the Segmentation Fault?
After filtering, GLOMAP likely expects at least some valid relative poses to proceed with global pose estimation. If all are filtered out, subsequent steps may attempt to access data structures that are empty or uninitialized, leading to a segmentation fault (SIGSEGV)[6][10]. This is a bug in robustness, but the root cause is the lack of valid input data.
How to Fix This
1. Check Feature Matches
- Use COLMAP or another tool to visualize feature matches between your images.
- Ensure that there are sufficient, well-distributed matches between overlapping images.
2. Adjust Filtering Parameters
- Lower the minimum inlier threshold (e.g., set it to 1) and/or the inlier ratio threshold to see if more pairs are retained.
- Consult GLOMAP's documentation or command-line options for these parameters.
3. Verify Camera Intrinsics
- Make sure camera intrinsics are correct and provided if possible. Unknown or inaccurate intrinsics can degrade pose estimation[5].
4. Improve Image Overlap and Quality
- Ensure your dataset has enough overlap between images and that images are not too blurry or noisy.
5. Debug with a Smaller Dataset
- Try running GLOMAP on a small, known-good dataset (e.g., a sample from COLMAP or GLOMAP's test data) to verify your installation and pipeline.
6. Update or Patch GLOMAP
- Check for open issues or updates on the GLOMAP GitHub[2] regarding segmentation faults or filtering bugs[1][2].
Summary Table: Common Causes and Solutions
| Cause | Symptom in GLOMAP | Solution |
|---|
| Poor feature matches | All poses filtered | Improve feature extraction/matching |
| Incorrect camera intrinsics | All poses filtered | Provide correct intrinsics |
| Too strict inlier thresholds | All poses filtered | Lower thresholds |
| Degenerate or collinear geometry | All poses filtered | Use more diverse viewpoints |
| Data corruption/preprocessing error | All poses filtered | Check input images and preprocessing |
| No valid pairs left | Segmentation fault | Fix above issues, add robustness check |
References
- GLOMAP filters out relative poses with too few inliers to ensure robust global pose estimation[11][5].
- Filtering all pairs is a sign of insufficient or poor-quality matches, or overly strict thresholds[11][5].
- Segmentation faults after filtering are typically due to empty data structures being accessed[6][10].
- Adjusting thresholds and verifying input data are the primary steps to resolve this issue[5][11].
In summary: GLOMAP is filtering all your views because your image pairs do not have enough reliable feature matches to pass the inlier threshold. This leaves no valid data for reconstruction, causing a crash. Check your feature matching, camera intrinsics, and filtering parameters to resolve the issue.