python截图方法
import pyautogui import cv2 import numpy as np img = pyautogui.screenshot(region=[0,0,300,300]) # x,y,w,h img.save('screenshot.png') #img = cv2.cvtColor(np.asarray(img),cv2.COLOR_RGB2BGR)
python截图方法
import pyautogui import cv2 import numpy as np img = pyautogui.screenshot(region=[0,0,300,300]) # x,y,w,h img.save('screenshot.png') #img = cv2.cvtColor(np.asarray(img),cv2.COLOR_RGB2BGR)