27 find_all_webcams_opencv() {
31 (
"webcam-opencv-camera-index",
"0",
32 PRC_DESC(
"Specify the space-separated list of integer camera index " 33 "numbers that are assumed to be available via OpenCV to the " 34 "WebcamVideo interface. The default camera index is 0. " 35 "Specify empty string if there are no available cameras."));
36 for (
size_t i = 0; i < wemcam_opencv_camera_index.get_num_words(); ++i) {
37 PT(
WebcamVideo) wc =
new WebcamVideoOpenCV(wemcam_opencv_camera_index[i]);
38 WebcamVideoOpenCV::_all_webcams.push_back(wc);
46 WebcamVideoOpenCV(
int camera_index) :
47 _camera_index(camera_index)
49 std::ostringstream strm;
50 strm <<
"OpenCV webcam " << _camera_index;
59 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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
TypeHandle is the identifier used to differentiate C++ class types.