15 #include "webcamVideoOpenCV.h"
19 #include "webcamVideoCursorOpenCV.h"
20 #include "configVariableInt.h"
31 find_all_webcams_opencv() {
35 (
"webcam-opencv-camera-index",
"0",
36 PRC_DESC(
"Specify the space-separated list of integer camera index "
37 "numbers that are assumed to be available via OpenCV to the "
38 "WebcamVideo interface. The default camera index is 0. "
39 "Specify empty string if there are no available cameras."));
40 for (
int i = 0; i < wemcam_opencv_camera_index.get_num_words(); ++i) {
41 PT(
WebcamVideo) wc = new WebcamVideoOpenCV(wemcam_opencv_camera_index[i]);
42 WebcamVideoOpenCV::_all_webcams.push_back(wc);
52 WebcamVideoOpenCV(
int camera_index) :
53 _camera_index(camera_index)
56 strm <<
"OpenCV webcam " << _camera_index;
67 return new WebcamVideoCursorOpenCV(
this);
Allows you to open a webcam or other video capture device as a video stream.
A MovieVideo is actually any source that provides a sequence of video frames.
This is a convenience class to specialize ConfigVariable as an integer type.
TypeHandle is the identifier used to differentiate C++ class types.