airtest.core.ios.mjpeg_cap module
- class MJpegcap(instruct_helper=None, ip='localhost', port=None, ori_function=None)[源代码]
基类:
object
- snapshot(ensure_orientation=True, *args, **kwargs)[源代码]
Take a screenshot and convert it into a cv2 image object
获取一张屏幕截图,并转化成cv2的图像对象 !!! 注意,该方法拿到的截图可能不是队列中最新的,除非一直在消费队列中的图像,否则可能会是过往图像内容,请谨慎使用
- 参数:
ensure_orientation – True or False whether to keep the orientation same as display
Returns: numpy.ndarray