如何使用python使用实际光标记录屏幕?

问题描述

我使用win10。 我有一个代码

fourcc = cv2.VideoWriter_fourcc(*"XVID")
out = cv2.VideoWriter(f'recording.mp4',fourcc,20.0,(self.screen_size))
while True:
    data = cv2.cvtColor(np.array(pg.screenshot()),cv2.COLOR_BGR2RGB)
    _xs,_ys = GetCursorPos()
    self.transparent_circle(data,(_xs,_ys),20,(0,255,0.5),-1)
    out.write(data)
    if self.wanna_stop:
        cv2.destroyAllWindows()
        out.release()
        break

self.transparent_circle是一种方法(我从this问题中采用了这种方法),该方法在光标位置绘制了圆圈。有没有办法绘制原始的Windows光标并使用它代替透明圆圈?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)