Add files via upload

This commit is contained in:
Moad Mohammed Elhebri 2019-01-19 05:43:59 +08:00 committed by GitHub
parent 3591334c29
commit b9a78e3a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#Needed packages
import numpy as np
import cv2
import pyautogui
#take screenshot using pyautogui
image = pyautogui.screenshot()
#since the pyautogui takes as a PIL(pillow) and in RGB we need to convert it to numpy array and BGR
#so we can write it to the disk
image = cv2.cvtColor(np.array(image),cv2.COLOR_RGB2BGR)
#writing it to the disk using opencv
cv2.imwrite("test.png",image)

BIN
Take_screenshot/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB