This VideoCamera implementation provides an interface to connect to any standard DirectShow capture device. This commonly includes web cameras and DV cameras.
Here is an example that will connect to the next available capture device:
This example will connect to the capture device using the maximum provided image size:
The generic capture device implementation provides the following video camera extension commands:
|
Method |
Description |
|
video.addWebcam(id = -1 , size = video.WEBCAM_DEFAULT_SIZE ) |
Connect to the capture device at the specified id and requested size.
id is 0-based index of the capture device to connect to. If id is less than zero, then the next available capture device will be connected to.
size can be a (width,height) tuple containing the desired capture size, or one of the following size constants:
video.WEBCAM_DEFAULT_SIZE - The default size provided by the device video.WEBCAM_MAX_SIZE - The largest size supported by the device video.WEBCAM_MIN_SIZE - The smallest size supported by the device video.WEBCAM_MAX_FPS - The largest size with the fastest capture rate.
|
|
video.getWebcamNames(available=False) |
Returns a list of all the detected capture device names. If available is True, this will return a list of all the capture devices that are not already in use by Vizard. |