Files
mars-panorama-pipeline/README.md
Franck Garnier 264ae1aab8 feat: switch from enblend to verdandi for blending
verdandi eliminates overexposure at seam transitions, especially on
Mastcam-Z panoramas. Also faster than enblend.

Benchmark results:
- MCZ sol 1817: 0 bright cols (vs 142 with enblend)
- MCZ sol 1775: 1 bright col (vs 1105 with enblend)
- Faster: 1s vs 2.3s (sol 1817), 66s vs 174s (sol 1775)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:00:25 -04:00

65 lines
2.1 KiB
Markdown

# Mars Panorama Pipeline
Automated panorama stitching for NASA Mars rovers (Perseverance, Curiosity) using Hugin CLI tools in Docker.
## Quick Start
```bash
# Build the image
docker build -t mars-panorama-pipeline .
# Run a NavCam panorama (sol 1813)
docker run --rm \
-v /mnt/astro/mars_rovers:/data \
-v /mnt/astro/mars_rovers/images/panorama/perseverance:/output \
mars-panorama-pipeline \
--sol 1813 --camera NAVCAM_LEFT
# Run a Mastcam-Z panorama (sol 1817)
docker run --rm \
-v /mnt/astro/mars_rovers:/data \
-v /mnt/astro/mars_rovers/images/panorama/perseverance:/output \
mars-panorama-pipeline \
--sol 1817 --camera MCZ_LEFT
# List available sequences for a sol
docker run --rm \
-v /mnt/astro/mars_rovers:/data \
mars-panorama-pipeline \
--sol 1813 --camera NAVCAM_LEFT --list-only
```
## With Docker Compose
```bash
docker compose run panorama --sol 1813 --camera NAVCAM_LEFT
```
## Pipeline Steps
1. **Find sequence** — Query MySQL for panorama-capable image sequences
2. **Combine tiles** — NavCam tiles 01+04 with 16px overlap blending
3. **CLAHE preprocessing** — Vignette correction + contrast normalization (for cpfind only)
4. **cpfind** — Feature matching on CLAHE images (aggressive params)
5. **cpclean** — Remove outlier control points
6. **Swap to originals** — Replace CLAHE images with originals in PTO
7. **autooptimiser** — Geometry-only optimization (NO photometric -m flag)
8. **nona + verdandi** — Remap and blend final panorama (verdandi eliminates overexposure at seams)
9. **Export PNG** — Convert TIFF output to PNG
## Supported Cameras
| Camera | Rover | FOV | Tile combining |
|--------|-------|-----|---------------|
| NAVCAM_LEFT/RIGHT | Perseverance | 82.17° (combined) | Yes (01+04, 16px overlap) |
| MCZ_LEFT/RIGHT | Perseverance | 25.6° (wide zoom) | No |
## Configuration
Environment variables (or .env file):
- `MYSQL_HOST` — MySQL server (default: 192.168.1.42)
- `MYSQL_PORT` — MySQL port (default: 3306)
- `MYSQL_USER` — MySQL user (default: soldan)
- `MYSQL_PASSWORD` — MySQL password
- `MYSQL_DATABASE` — Database name (default: mars_rovers)