You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好:
我发现在用自己的视频,在对倒数第几张进行处理的时候,OpenCV会报错cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
于是,将81行代码改为
if alpha<frame<video_length-alpha:
ret, cur_frame = cap.read()
try:
if height != out_height or width != out_width:
cur_frame = cv2.resize(cur_frame,(out_width,out_height),interpolation=cv2.INTER_LANCZOS4)
if not ret or cur_frame is None:
break
except :
continue
The text was updated successfully, but these errors were encountered:
您好:
我发现在用自己的视频,在对倒数第几张进行处理的时候,OpenCV会报错cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4052: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
于是,将81行代码改为
if alpha<frame<video_length-alpha:
ret, cur_frame = cap.read()
try:
if height != out_height or width != out_width:
cur_frame = cv2.resize(cur_frame,(out_width,out_height),interpolation=cv2.INTER_LANCZOS4)
if not ret or cur_frame is None:
break
except :
continue
The text was updated successfully, but these errors were encountered: