xoffset fix
This commit is contained in:
parent
c8e6a1f506
commit
4785a99a63
1 changed files with 5 additions and 1 deletions
|
|
@ -48,6 +48,8 @@ class StitchState:
|
|||
total_rows: int = 0
|
||||
mosaic_width: int = 0
|
||||
mosaic_height: int = 0
|
||||
mosaic_init_width: int = 0
|
||||
mosaic_init_height: int = 0
|
||||
frame_count: int = 0
|
||||
append_count: int = 0
|
||||
|
||||
|
|
@ -148,6 +150,8 @@ class StitchingScanner:
|
|||
h, w = frame.shape[:2]
|
||||
self.state.mosaic_width = w
|
||||
self.state.mosaic_height = h
|
||||
self.state.mosaic_init_width = w
|
||||
self.state.mosaic_init_height = h
|
||||
self.state.frame_count = 1
|
||||
self.state.append_count = 0
|
||||
|
||||
|
|
@ -205,7 +209,7 @@ class StitchingScanner:
|
|||
h_strip, w_strip = strip.shape[:2]
|
||||
|
||||
# Clamp x_offset to valid range
|
||||
x_offset = max(0, w_base - 1)
|
||||
x_offset = max(0, w_base - self.state.mosaic_init_width)
|
||||
|
||||
# Create full-width strip with strip placed at x_offset
|
||||
full_strip = np.zeros((h_strip, w_base, 3), dtype=np.uint8)
|
||||
|
|
|
|||
Loading…
Reference in a new issue