diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0e53222..8105924 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -16,7 +16,7 @@ - + @@ -32,8 +32,8 @@ - - + + @@ -191,7 +191,7 @@ - + @@ -254,7 +254,7 @@ - + @@ -277,8 +277,8 @@ - - + + diff --git a/camera.py b/camera.py index 1c011c6..cf70fe9 100644 --- a/camera.py +++ b/camera.py @@ -4,12 +4,17 @@ import time import cv2 -def capture(camera_stream = 0, camera_res = (1920, 1080)): - cam = cv2.VideoCapture(camera_stream) - s, img = cam.read() +from SimpleCV import Image, Camera - if s: - cv2.imwrite('./capture.jpg', img) +def capture(camera_stream = 0, camera_res = (1920, 1080)): + # cam = cv2.VideoCapture(camera_stream) + # s, img = cam.read() + # + # if s: + # cv2.imwrite('./capture.jpg', img) + cam = Camera() + img = cam.getImage() + img.save('./capture.jpg') # pygame.camera.init() # pygame.camera.list_cameras() # cam = pygame.camera.Camera(camera_stream, camera_res)