Panda3D
panda
src
vision
webcamVideoOpenCV.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file webcamVideoOpenCV.h
10
* @author drose
11
* @date 2010-10-20
12
*/
13
14
#ifndef WEBCAMVIDEOOPENCV_H
15
#define WEBCAMVIDEOOPENCV_H
16
17
#include "
pandabase.h
"
18
19
#ifdef HAVE_OPENCV
20
21
#include "
webcamVideo.h
"
22
23
class
WebcamVideoCursorOpenCV;
24
25
/**
26
* The OpenCV implementation of webcams. Probably won't be needed once we
27
* have a native webcam implementation for each Panda3D-supported platform.
28
* (So far, we're 2 for 3.)
29
*/
30
class
WebcamVideoOpenCV :
public
WebcamVideo
{
31
private
:
32
WebcamVideoOpenCV(
int
camera_index);
33
virtual
PT(
MovieVideoCursor
) open();
34
35
private
:
36
int
_camera_index;
37
38
public
:
39
static
TypeHandle
get_class_type() {
40
return
_type_handle;
41
}
42
static
void
init_type() {
43
WebcamVideo::init_type();
44
register_type
(_type_handle,
"WebcamVideoOpenCV"
,
45
WebcamVideo::get_class_type());
46
}
47
virtual
TypeHandle
get_type()
const
{
48
return
get_class_type();
49
}
50
virtual
TypeHandle
force_init_type() {init_type();
return
get_class_type();}
51
52
private
:
53
static
TypeHandle
_type_handle;
54
55
friend
class
WebcamVideoCursorOpenCV;
56
friend
void
find_all_webcams_opencv();
57
};
58
59
#endif // HAVE_OPENCV
60
61
#endif
MovieVideoCursor
A MovieVideo is actually any source that provides a sequence of video frames.
Definition:
movieVideoCursor.h:41
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition:
register_type.I:22
webcamVideo.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
WebcamVideo
Allows you to open a webcam or other video capture device as a video stream.
Definition:
webcamVideo.h:23
Generated on Mon Sep 14 2020 15:07:08 for Panda3D by
1.8.20