updates to algorithm
This commit is contained in:
17
screenshot.py
Normal file
17
screenshot.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import cv2
|
||||
|
||||
# Open the video file (use video file or webcam, here using webcam)
|
||||
cap = cv2.VideoCapture(0)
|
||||
|
||||
width = 1280
|
||||
height = 720
|
||||
|
||||
# Set the resolution and fps of the camera
|
||||
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
|
||||
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
|
||||
|
||||
result, image = cap.read()
|
||||
|
||||
cv2.imwrite('test.jpg', image)
|
||||
|
||||
cap.release()
|
||||
Reference in New Issue
Block a user