Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

option for different capture device

  • Loading branch information...
commit 728ddeb868c8407b8eb3c6d88faaf09c9e165211 1 parent 63e265d
@albertz authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 facerecognition.py
View
4 facerecognition.py
@@ -60,9 +60,11 @@ def subImageScaled(im, rect, w, h):
# create windows
#cv.NamedWindow('Camera', cv.CV_WINDOW_AUTOSIZE)
+ import sys
# create capture device
device = 0 # assume we want first device
- capture = cv.CreateCameraCapture(0)
+ if len(sys.argv) > 1: device = int(sys.argv[1])
+ capture = cv.CreateCameraCapture(device)
cv.SetCaptureProperty(capture, cv.CV_CAP_PROP_FRAME_WIDTH, 640)
cv.SetCaptureProperty(capture, cv.CV_CAP_PROP_FRAME_HEIGHT, 480)
Please sign in to comment.
Something went wrong with that request. Please try again.