我在 opencv 2.3 和 2.4 中尝试了很多组合来获取视频的帧数,但没有任何结果。似乎它根本不存在。
stream = cv.VideoCapture(avsfilename) #stream.isOpened() returns True, everything's ok
framecount = cv.GetCaptureProperty(stream, CV_CAP_PROP_FRAME_COUNT) #no
framecount = cv.GetCaptureProperty(stream, cv.CV_CAP_PROP_FRAME_COUNT) #no
framecount = stream.get(cv.CV_CAP_PROP_FRAME_COUNT) #no
framecount = stream.get(CV_CAP_PROP_FRAME_COUNT) #no
“模块”对象没有属性“CV_CAP_PROP_FRAME_COUNT”
有人通过类似的东西吗?