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: