xxxxxxxxxx
import cv2 as cv, pyautogui as p, screeninfo, numpy as np
for monitor in screeninfo.get_monitors():
w, h = monitor.width, monitor.height
screen = np.array(p.screenshot(region=(0,0,w,h)))
cv.imwrite("Screenshot.png", screen)
cv.imshow("Screenshot", screen); cv2.waitKey(0); cv2.destroyAllWindows()