From 264ae1aab89059116d06722cdd9041ac263425b2 Mon Sep 17 00:00:00 2001 From: Franck Garnier Date: Sun, 12 Apr 2026 15:00:25 -0400 Subject: [PATCH] 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) --- README.md | 2 +- pipeline/panorama_pipeline.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index de4292d..e383dd1 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ docker compose run panorama --sol 1813 --camera NAVCAM_LEFT 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 + enblend** — Remap and blend final panorama +8. **nona + verdandi** — Remap and blend final panorama (verdandi eliminates overexposure at seams) 9. **Export PNG** — Convert TIFF output to PNG ## Supported Cameras diff --git a/pipeline/panorama_pipeline.py b/pipeline/panorama_pipeline.py index 659c0aa..1de3c46 100644 --- a/pipeline/panorama_pipeline.py +++ b/pipeline/panorama_pipeline.py @@ -279,7 +279,7 @@ def build_pto(pto_path, img_paths, azs, els, img_w, img_h, fov, ref_idx=None): def run_pipeline(work_dir, clahe_images, original_images, azs, els, img_w, img_h, fov, output_name): - """Full pipeline: cpfind(CLAHE) -> swap(originals) -> optimize(geo) -> nona -> enblend.""" + """Full pipeline: cpfind(CLAHE) -> swap(originals) -> optimize(geo) -> nona -> verdandi.""" timings = {} @@ -351,13 +351,13 @@ def run_pipeline(work_dir, clahe_images, original_images, azs, els, print(" ERROR: nona produced no output") return None, timings - # enblend - print(" enblend...", flush=True) + # verdandi (better transitions than enblend, no overexposure at seams) + print(" verdandi...", flush=True) out_tif = os.path.join(work_dir, f"{output_name}.tif") tif_list = " ".join([f'"{t}"' for t in tifs]) t0 = time.time() - run_hugin("enblend", f'--pre-assemble -o "{out_tif}" {tif_list}', cwd=work_dir) - timings["enblend"] = time.time() - t0 + run_hugin("verdandi", f'-o "{out_tif}" {tif_list}', cwd=work_dir) + timings["verdandi"] = time.time() - t0 # Convert to PNG out_png = os.path.join(work_dir, f"{output_name}.png")