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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user