# Comparison Framework

## Selected Framework Type
Decision Support — evaluating solution options per component

## Architecture Components to Evaluate

1. Feature Extraction & Matching (VO frame-to-frame)
2. Satellite Image Matching (cross-view geo-registration)
3. Sensor Fusion (VO + satellite + IMU)
4. Satellite Tile Preprocessing & Indexing
5. Image Downsampling Strategy
6. Re-localization (disconnected segments)
7. API & Streaming Layer

## Component 1: Feature Extraction & Matching (VO)

| Dimension | XFeat | SuperPoint + LightGlue | ORB (OpenCV) |
|-----------|-------|----------------------|--------------|
| Speed (Jetson) | ~2-5ms per frame (VGA), 5x faster than SuperPoint | ~15-50ms per frame (VGA, TensorRT FP16) | ~5-10ms per frame (CUDA) |
| Accuracy | Comparable to SuperPoint on pose estimation | State-of-the-art for local features | Lower accuracy, not scale-invariant |
| Memory | <100MB model | ~200-400MB model+inference | Negligible |
| TensorRT support | Yes (C++ impl available for Jetson Orin NX) | Yes (C++ impl available) | N/A (native CUDA) |
| Cross-view capability | Limited (same-view designed) | Better with LightGlue attention | Poor for cross-view |
| Rotation invariance | Moderate | Good with LightGlue | Good (by design) |
| Jetson validation | Tested on Orin NX (JetPack 6.0) | Tested on multiple Jetson platforms | Native OpenCV CUDA |
| **Fit for VO** | ✅ Best — fast, accurate, Jetson-proven | ⚠️ Good but heavier | ⚠️ Fast but less accurate |
| **Fit for satellite matching** | ⚠️ Moderate | ✅ Better for cross-view with attention | ❌ Poor for cross-view |

## Component 2: Satellite Image Matching (Cross-View)

| Dimension | Local Feature Matching (SIFT/SuperPoint + LightGlue) | Global Descriptor Retrieval (DinoV2/CLIP) | Template Matching (NCC) |
|-----------|-----------------------------------------------------|------------------------------------------|------------------------|
| Approach | Extract keypoints in both UAV and satellite images, match descriptors | Encode both images into global vectors, compare by distance | Slide UAV image over satellite tile, compute correlation |
| Accuracy | Sub-pixel when matches found (best for fine alignment) | Tile-level (~50-200m depending on tile size) | Pixel-level but sensitive to appearance changes |
| Speed | ~100-500ms for match+geometric verification | ~50-100ms for descriptor comparison | ~500ms-2s for large search area |
| Robustness to viewpoint | Good with LightGlue attention | Excellent (trained for cross-view) | Poor (requires similar viewpoint) |
| Memory | ~300-500MB (model + keypoints) | ~200-500MB (model) | Low |
| Failure rate | High in low-texture, seasonal changes | Lower — semantic understanding | High in changed scenes |
| **Recommended role** | Fine alignment (after coarse retrieval) | Coarse retrieval (select candidate tile) | Not recommended |

## Component 3: Sensor Fusion

| Dimension | EKF (Extended Kalman Filter) | Error-State EKF (ESKF) | Hybrid ESKF/UKF | Factor Graph (GTSAM) |
|-----------|-------------------------------|------------------------|------------------|---------------------|
| Accuracy | Baseline | Better for rotation | 49% better than ESKF | Best overall |
| Compute cost | Lowest | Low | 48% less than full UKF | Highest |
| Implementation complexity | Low | Medium | Medium-High | High |
| Handles non-linearity | Linearization errors | Better for small errors | Best among KF variants | Full non-linear |
| Real-time on Jetson | ✅ | ✅ | ✅ | ⚠️ Depends on graph size |
| Multi-rate sensor support | Manual | Manual | Manual | Native |
| **Fit** | ⚠️ Baseline option | ✅ Good starting point | ✅ Best KF option | ⚠️ Overkill for this system |

## Component 4: Satellite Tile Management

| Dimension | GeoHash + In-Memory | Quadtree + Memory-Mapped Files | Pre-extracted Feature DB |
|-----------|--------------------|-----------------------------|------------------------|
| Lookup speed | O(1) hash | O(log n) tree traversal | O(1) hash + feature load |
| Memory usage | All tiles in RAM | On-demand loading | Features only (smaller) |
| Preprocessing | Fast | Moderate | Slow (extract all features offline) |
| Flexibility | Fixed grid | Adaptive resolution | Fixed per-tile |
| **Fit for 8GB** | ❌ Too much RAM for large areas | ✅ Memory-efficient | ✅ Best — smallest footprint |

## Component 5: Image Downsampling Strategy

| Dimension | Fixed Resize (e.g., 1600x1066) | Pyramid (multi-scale) | ROI-based (center crop + full) |
|-----------|-------------------------------|----------------------|-------------------------------|
| Speed | Fast, single scale | Slower, multiple passes | Medium |
| Accuracy | Good if GSD ratio maintained | Best for multi-scale features | Good for center, loses edges |
| Memory | ~5MB per frame | ~7-8MB per frame | ~6MB per frame |
| **Fit** | ✅ Best tradeoff | ⚠️ Unnecessary complexity | ⚠️ Loses coverage |
