From ef611b6798815a35302ac48912a5687db7a93425 Mon Sep 17 00:00:00 2001 From: 2ManyProjects Date: Sat, 10 Jan 2026 00:43:00 -0600 Subject: [PATCH] undid offset --- src/stitching_scanner.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stitching_scanner.py b/src/stitching_scanner.py index 32a4f2b..3efaa8f 100644 --- a/src/stitching_scanner.py +++ b/src/stitching_scanner.py @@ -161,6 +161,7 @@ class StitchingScanner: def _blend_horizontal_at_y(self, base: np.ndarray, strip: np.ndarray, blend_width: int, append_right: bool, + x_off: int = 0, y_offset: int = 0) -> np.ndarray: h_base, w_base = base.shape[:2] h_strip, w_strip = strip.shape[:2] @@ -432,12 +433,12 @@ class StitchingScanner: strip_start = max(0, w - append_width - BLEND_WIDTH) new_strip = frame[:, strip_start:] self.mosaic = self._blend_horizontal_at_y( - self.mosaic, new_strip, BLEND_WIDTH, append_right=True, y_offset=y_offset) + self.mosaic, new_strip, BLEND_WIDTH, append_right=True, x_off=int(self.state.current_x), y_offset=y_offset) else: strip_end = min(w, append_width + BLEND_WIDTH) new_strip = frame[:, :strip_end] self.mosaic = self._blend_horizontal_at_y( - self.mosaic, new_strip, BLEND_WIDTH, append_right=False, y_offset=y_offset) + self.mosaic, new_strip, BLEND_WIDTH, append_right=False, x_off=int(self.state.current_x), y_offset=y_offset) self._displacement_since_append_x = fractional_remainder self._displacement_since_append_y = 0.0 @@ -756,7 +757,7 @@ class StitchingScanner: # Done when we've moved enough if abs(total_y) >= target_displacement: self.log(f"Row transition complete: {abs(total_y):.1f}px") - self.state.current_y -= self.state.mosaic_init_width + self.state.current_y = 0 self.motion.send_command('s') time.sleep(self.config.settle_time)