simplecv
This commit is contained in:
parent
f0b35991e8
commit
5a8940da7b
@ -16,7 +16,7 @@
|
||||
<entry file="file://$PROJECT_DIR$/index.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="450">
|
||||
<caret line="42" column="46" lean-forward="true" selection-start-line="42" selection-start-column="46" selection-end-line="42" selection-end-column="46" />
|
||||
<caret line="42" column="46" selection-start-line="42" selection-start-column="46" selection-end-line="42" selection-end-column="46" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
</folding>
|
||||
@ -32,8 +32,8 @@
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/camera.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="150">
|
||||
<caret line="10" column="9" lean-forward="true" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
|
||||
<state relative-caret-position="240">
|
||||
<caret line="16" column="29" selection-start-line="16" selection-start-column="29" selection-end-line="16" selection-end-column="29" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
</folding>
|
||||
@ -191,7 +191,7 @@
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Version Control" order="7" />
|
||||
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.32972974" />
|
||||
<window_info anchor="bottom" id="Terminal" order="8" weight="0.32972974" />
|
||||
<window_info anchor="bottom" id="Python Console" order="9" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
@ -254,7 +254,7 @@
|
||||
<entry file="file://$PROJECT_DIR$/index.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="450">
|
||||
<caret line="42" column="46" lean-forward="true" selection-start-line="42" selection-start-column="46" selection-end-line="42" selection-end-column="46" />
|
||||
<caret line="42" column="46" selection-start-line="42" selection-start-column="46" selection-end-line="42" selection-end-column="46" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
</folding>
|
||||
@ -277,8 +277,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/camera.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="150">
|
||||
<caret line="10" column="9" lean-forward="true" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
|
||||
<state relative-caret-position="240">
|
||||
<caret line="16" column="29" selection-start-line="16" selection-start-column="29" selection-end-line="16" selection-end-column="29" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
</folding>
|
||||
|
15
camera.py
15
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)
|
||||
|
Loading…
Reference in New Issue
Block a user