mmpose.apis.webcam.utils.limit_max_fps¶
- mmpose.apis.webcam.utils.limit_max_fps(fps: float)[source]¶
A context manager to limit maximum frequence of entering the context.
- Parameters
fps (float) – The maximum frequence of entering the context
- Example::
>>> from mmpose.apis.webcam.utils import limit_max_fps >>> import cv2
>>> while True: ... with limit_max_fps(20): ... cv2.imshow(img) # display image at most 20 fps