Video

Count Frames

imutils.video.count_frames.count_frames(path, override=False)
imutils.video.count_frames.count_frames_manual(video)

File Video Stream

class imutils.video.filevideostream.FileVideoStream(path, transform=None, queue_size=128)
more()
read()
running()
start()
stop()
update()

FSP

class imutils.video.fps.FPS
elapsed()
fps()
start()
stop()
update()

Image Output

class imutils.video.imageoutput.ImageOutput(screen: bool = True, web_port: int = 8080)
clear()

Removes the display content

show(name, frame)

Displays an image on the display

Args:

frame (array): Image bitmap

stream(name: str, frame)

Sends image to the frame-streamer

Args:

name (str): Stream identifier name frame (array): Current frame that needs to be enqueued

waitForKey(delay: int = 0)

Blocks until a key is pressed

Pi Video Stream

Video Stream

class imutils.video.videostream.VideoStream(src=0, usePiCamera=False, resolution=(320, 240), framerate=32, **kwargs)
read()
start()
stop()
update()

Webcam Video Stream

class imutils.video.webcamvideostream.WebcamVideoStream(src=0, name='WebcamVideoStream')
read()
start()
stop()
update()