00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "config_vision.h"
00016 #include "openCVTexture.h"
00017 #include "webcamVideo.h"
00018 #include "webcamVideoCursorOpenCV.h"
00019 #include "webcamVideoOpenCV.h"
00020 #include "webcamVideoCursorV4L.h"
00021 #include "webcamVideoV4L.h"
00022
00023 #include "pandaSystem.h"
00024 #include "texturePool.h"
00025 #include "dconfig.h"
00026
00027 Configure(config_vision);
00028 NotifyCategoryDef(vision, "");
00029
00030 ConfigureFn(config_vision) {
00031 init_libvision();
00032 }
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 void
00043 init_libvision() {
00044 static bool initialized = false;
00045 if (initialized) {
00046 return;
00047 }
00048 initialized = true;
00049
00050 WebcamVideo::init_type();
00051 #ifdef HAVE_VIDEO4LINUX
00052 WebcamVideoCursorV4L::init_type();
00053 WebcamVideoV4L::init_type();
00054 #endif
00055
00056 #ifdef HAVE_OPENCV
00057 WebcamVideoCursorOpenCV::init_type();
00058 WebcamVideoOpenCV::init_type();
00059
00060 OpenCVTexture::init_type();
00061 OpenCVTexture::register_with_read_factory();
00062
00063 PandaSystem *ps = PandaSystem::get_global_ptr();
00064 ps->add_system("OpenCV");
00065
00066 TexturePool *ts = TexturePool::get_global_ptr();
00067 #ifndef HAVE_FFMPEG
00068 ts->register_texture_type(OpenCVTexture::make_texture, "avi");
00069 #endif
00070 #endif
00071 }
00072