MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / count_frames_manual

Function count_frames_manual

imutils/video/count_frames.py:42–60  ·  view source on GitHub ↗
(video)

Source from the content-addressed store, hash-verified

40 return total
41
42def count_frames_manual(video):
43 # initialize the total number of frames read
44 total = 0
45
46 # loop over the frames of the video
47 while True:
48 # grab the current frame
49 (grabbed, frame) = video.read()
50
51 # check to see if we have reached the end of the
52 # video
53 if not grabbed:
54 break
55
56 # increment the total number of frames read
57 total += 1
58
59 # return the total number of frames in the video file
60 return total

Callers 1

count_framesFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…