undid offset
This commit is contained in:
parent
a838deb9e2
commit
ef611b6798
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue