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:
Franck Garnier
2026-04-12 15:00:25 -04:00
parent b1737ba89d
commit 264ae1aab8
2 changed files with 6 additions and 6 deletions

View File

@@ -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")