From bfc8756a2abf4ad364f64fcf4970b5cb6c0c3cc6 Mon Sep 17 00:00:00 2001 From: yair Date: Sat, 22 Nov 2025 16:59:41 +0200 Subject: [PATCH] scripts: rewrite append_signals.py for linescan scrolling video Complete rewrite to properly handle linescan image sequences: - Stitches linescan images horizontally into wide panorama - Creates scrolling video that pans left-to-right - Configurable scroll speed based on capture rate (750 lines/sec) - Output saved one folder up from image source - Uses Pillow for image stitching, ffmpeg for video creation Features: - --scroll-speed: multiplier for playback speed (1.0 = real-time) - --lines-per-second: linescan capture rate (default: 750) - --max-frames: limit frames for testing - --fps: output video framerate (default: 30) - --width: viewport width (default: 1920) - Automatic cleanup of temporary stitched image Example usage: # Real-time playback uv run scripts\append_signals.py results\20251122\bumpy-filter # 2x speed uv run scripts\append_signals.py results\20251122\bumpy-filter --scroll-speed 2.0 # Test with 10 frames uv run scripts\append_signals.py results\20251122\bumpy-filter --max-frames 10 --- scripts/append_signals.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/append_signals.py b/scripts/append_signals.py index 9627d68..35f43e0 100644 --- a/scripts/append_signals.py +++ b/scripts/append_signals.py @@ -7,8 +7,11 @@ # /// """ -Stitch linescan frame sequences horizontally and create scrolling video. -Linescan images are concatenated side-by-side and played as a scrolling video. +Create scrolling panorama videos from linescan image sequences. + +This script stitches linescan images horizontally into a wide panorama, +then creates a scrolling video that pans left-to-right across the stitched image. +The scroll speed is calibrated to the linescan capture rate (750 lines/second by default). """ import argparse