update stitch algorithm and ver to 0.3.1

This commit is contained in:
bluepulsar
2026-03-28 18:20:20 +08:00
parent b3296c4e5d
commit 97d7d55838
8 changed files with 541 additions and 572 deletions
+2 -1
View File
@@ -44,7 +44,8 @@ def draw_arrows(frame, optical_flow, fps=True, threshold=5, grid_spacing=40, arr
if mag[i] < threshold:
cv2.circle(image, pt1, radius=1, color=below_threshold_color, thickness=-1)
else:
thickness = max(1, int(2 * mag[i] / mag.max())) if mag.max() > 0 else 2
# thickness = max(1, int(2 * mag[i] / mag.max())) if mag.max() > 0 else 2
thickness = 1
cv2.arrowedLine(image, pt1, pt2, color, thickness=thickness, tipLength=0.2)
return image