screener package¶
Submodules¶
screener.screener module¶
Save or Record screen of your device.
Use this module to capture your screen for some duration of time or to capture frame by frame for dispaly or streaming.
Typical usage example:
from screener import Screener screener = Screener()
# record 30 seconds screener.record(duration=30)
# get one ndarray representing BGR image frame = screener.capture()
- class screener.screener.Screener(resolution: tuple = (1280, 720), use_pil=True)¶
Bases:
objectObject to capture screen of your device.
- capture()¶
Catpure screenshot of your device.
Captures screenshot of device in PIL format, and converts image to OpenCV/Ndarray format depending on the pil flag specified in initialization.
- Returns
screenshot of the device screen
- Return type
screenshot
- static pil_to_np(img: <module 'PIL.Image' from '/home/docs/checkouts/readthedocs.org/user_builds/screen-streamer/envs/latest/lib/python3.7/site-packages/PIL/Image.py'>) → numpy.array¶
convert PIL Image to np array (cv2 format).
- Parameters
img ([PIL.Image]) – PIL Image
- Returns
Image in ndarray format
- Return type
img_np
Module contents¶
Save or Record screen of your device.
Use this module to capture your screen for some duration of time or to capture frame by frame for dispaly or streaming.
Typical usage example:
from screener import Screener screener = Screener()
# record 30 seconds screener.record(duration=30)
# get one ndarray representing BGR image frame = screener.capture()