From 218cf76705205c72b3879491748eb7dfb706d909 Mon Sep 17 00:00:00 2001 From: Dustin Freeman Date: Wed, 31 Jul 2024 12:02:03 -0400 Subject: [PATCH] more coherent version testing --- VideoStabilization/video_stabilization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VideoStabilization/video_stabilization.py b/VideoStabilization/video_stabilization.py index 62340ae4e..692442074 100644 --- a/VideoStabilization/video_stabilization.py +++ b/VideoStabilization/video_stabilization.py @@ -91,7 +91,7 @@ def fixBorder(frame): curr_pts = curr_pts[idx] #Find transformation matrix - if float((cv2.__version__)[0:3])<=3.0: + if int((cv2.__version__).split('.')[0]) <= 3: m = cv2.estimateRigidTransform(prev_pts, curr_pts, fullAffine=False) #will only work with OpenCV-3 or less else: