Complete from-scratch rewrite of the Insta360 X5 dual-fisheye stitching
pipeline. Previous attempt (stitch.py, compare.py) moved to old/.
Architecture: single backward-mapping remap fusing equirect projection,
per-scanline rolling shutter correction (32-point gyro-interpolated),
MEI projection (xi=2.0, 13-coeff extended model from protobuf sidecar),
Lanczos4 sampling. Blending via longitude_preference * coverage_depth
with symmetric gain correction.
PSNR vs Insta360 Studio ground truth:
22.87 dB at 1920x960, 22.41 dB at 7680x3840 (with bilateral denoise)
Key findings:
- No-flow alpha blending works as well as DIS optical flow. DIS
cannot track the repetitive mesh pattern, and the principled
longitude*depth blend handles most parallax naturally
- Multi-video IMU_TO_CAM calibration avoids single-video overfitting
- Bilateral denoise (d=9, s=40) gives +0.43-0.70 dB matching GT noise
- Translation-aware projection confirmed (sign: protobuf t_extrinsic
is FROM lens TO center) but sub-pixel effect at typical distances
- Remaining gap: scene-dependent tone mapping + 18px mesh parallax
at 3m (requires neural flow to resolve)
old/
First implementation, kept for reference. Not wired into the current pipeline.
stitch.py. First-pass stitcher. Separate undistort, remap, DP seam-find, and multiband blend passes (double resampling). Superseded by the single-remap design in../x5_pipeline.py.compare.py. Standalone ground-truth PSNR harness. Folded into the main pipeline.FINDINGS.md. Reverse-engineering notes on the.insvcontainer, the.pbsidecar, the base64 calibration string, the MEI parameters, and the IMU axis convention. The rewrite is built on these.pyproject.toml. Older dep set, beforetelemetry-parserandopencv-contrib-python.