update raft optical flow

This commit is contained in:
bluepulsar
2026-01-31 15:22:19 +08:00
parent 2ebbe1a284
commit 58c3d97fab
7 changed files with 117 additions and 141 deletions
+5 -2
View File
@@ -28,6 +28,7 @@ class Stitcher:
self.margin=config_stitcher["margin"]
self.bound=self.nominal_ov_pos - self.margin
self.row_tol = config_stitcher["row_tol"]
self.box_size = config_stitcher["box_size"]
if self.verbose:
print(f"Stitcher initialized with config: {self.config_stitcher}")
@@ -486,8 +487,10 @@ class Stitcher:
# compute common center-crop size: use minimum width/height among boxes
widths = [b[2] for b in boxes]
heights = [b[3] for b in boxes]
target_w = max(1,int(min(widths)))
target_h = max(1,int(min(heights)))
# target_w = max(1,int(min(widths)))
# target_h = max(1,int(min(heights)))
target_w = self.box_size[0]
target_h = self.box_size[1]
# center-crop each box to (target_w, target_h) inside original box bounds
cropped_boxes = []