autopc.basic.basic_opencv module

class BasicOpenCv[源代码]

基类:object

static draw_rectangle(screen, x1: int, y1: int, x2: int, y2: int, img_path: str)[源代码]

画图,根据指定范围的坐标在原图上画框,并打印到指定地址

参数:
  • screen – 图像ndarray

  • x1 – 图片左上角横坐标

  • y1 – 图片左上角纵坐标

  • x2 – 图片右下角横坐标

  • y2 – 图片右下角纵坐标

  • img_path – 图片路径

返回:

None

static draw_point(screen, pos, img_path: str)[源代码]

画图,根据指定范围的坐标在原图上画框,并打印到指定地址

参数:
  • screen – 图像 ndarray

  • pos – (横坐标,纵坐标)

  • img_path – 图片路径

返回:

None

static get_color_format(screen)[源代码]

判断数组的颜色空间格式

参数:

screen – 图像数组 ndarray

返回:

str