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
The count frames function currently will resort to using manual counting instead of the cv2.CAP_PROP_FRAME_COUNT property if you use version 4+ of OpenCV. From imutils/video/count_frames.py:
try:
# check if we are using OpenCV 3ifis_cv3():
total=int(video.get(cv2.CAP_PROP_FRAME_COUNT))
# otherwise, we are using OpenCV 2.4else:
total=int(video.get(cv2.cv.CV_CAP_PROP_FRAME_COUNT))
I believe that if OpenCV 4 using the same property as OpenCV 3, so this should be as simple as changing the if statement to check if cv3 or cv4. Is there already a convenience function for checking version 4 that could be used here?
The text was updated successfully, but these errors were encountered:
The count frames function currently will resort to using manual counting instead of the
cv2.CAP_PROP_FRAME_COUNT
property if you use version 4+ of OpenCV. Fromimutils/video/count_frames.py
:I believe that if OpenCV 4 using the same property as OpenCV 3, so this should be as simple as changing the if statement to check if cv3 or cv4. Is there already a convenience function for checking version 4 that could be used here?
The text was updated successfully, but these errors were encountered: