Example #1
0
 def capture_screen(self):
     try:
         self.win.activate()
     except:
         pass
     img = np.array(pyscreeze._screenshot_win32(region=self.win.box))
     img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
     return img
Example #2
0
def capture_screen():
    win = getWindowsWithTitle('dosbox 0.7')[0]
    try:
        win.activate()
    except:
        pass
    img = np.array(pyscreeze._screenshot_win32(region=win.box))
    img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
    return img