Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ShowCamWxVideoSourceFactory.hh
1 /*
2  * ShowCamWxVideoSourceFactory.hh
3  *
4  * Created on: 11.02.2011
5  * Author: bravo
6  */
7 
8 #ifndef SHOWCAMWXVIDEOSOURCEFACTORY_HH_
9 #define SHOWCAMWXVIDEOSOURCEFACTORY_HH_
10 
11 #include <Base/Common/BIASpragmaStart.hh>
12 #include <bias_config.h>
13 #include <Gui/VideoSource_Controller_Base.hh>
14 #include <VideoSource/VideoSource_Base.hh>
15 #include <Base/Math/Vector2.hh>
16 
17 namespace BIAS {
18 
20 public:
21 
22  enum CameraType {
23  NONE=0,
25  PMD,
29  SHM,
30  NET,
31  V4L,
32  SR,
33  XB3,
38  };
39 
40  static std::vector<std::string> CameraNames() {
41  std::vector<std::string> cameras;
42  cameras.push_back("NONE");
43  cameras.push_back("DCAM");
44  cameras.push_back("PMD");
45  cameras.push_back("PMDUSB");
46  cameras.push_back("PMDSHM");
47  cameras.push_back("UEYE");
48  cameras.push_back("SHM");
49  cameras.push_back("NET");
50  cameras.push_back("V4L");
51  cameras.push_back("SR");
52  cameras.push_back("XB3");
53  cameras.push_back("DSHOW");
54  cameras.push_back("KINECT");
55  cameras.push_back("OPENNI");
56  cameras.push_back("FREENECT2");
57  return cameras;
58  }
59 
62 
64  const std::string& title = "",
65  const wxPoint& pos = wxDefaultPosition,
66  const wxSize& size = wxDefaultSize,
67  long style = wxDEFAULT_FRAME_STYLE,
68  const wxString& name = wxFrameNameStr);
69 
71  static VideoSource* CreateFromTypeIfSupported(int type);
72 
73  static VideoSource* CreateDCAM(bool firewireB, bool user_mode, int dcam_mode=-1,
74  float fps=-1, int Format7BpP=-1, int Format7ColorMode_=-1,
75  Vector2<int> Format7LeftTop_=Vector2<int>(-1,-1), Vector2<int> Format7WidthHeight=Vector2<int>(-1,-1));
76 
77  static VideoSource* CreatePMD(std::string sourcePlugin, std::string procPlugin);
78  static VideoSource* CreatePMDZess(std::string bitfile);
79  static VideoSource* CreateUEye();
80  static VideoSource* CreateV4L();
81  static VideoSource* CreateBumbleBee();
82 
83  static int OpenDevice(int type, VideoSource* cam, std::string deviceName, int param=-1);
84  static int InitImages(int type, VideoSource* cam, ImageBase *im1, ImageBase *im2 = NULL, ImageBase *im3 = NULL, ImageBase *im4 = NULL);
85 
86 protected:
87  static int Win32DCAMNumber_;
88 
89 };
90 
91 }
92 
93 #include <Base/Common/BIASpragmaEnd.hh>
94 
95 #endif /* SHOWCAMWXVIDEOSOURCEFACTORY_HH_ */
static VideoSource * CreatePMDZess(std::string bitfile)
static VideoSource_Controller_Base * CreateController(CameraType type, VideoSource *cam, wxWindow *parent, const std::string &title="", const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
Defines a common interface to different devices.
static VideoSource * CreateDCAM(bool firewireB, bool user_mode, int dcam_mode=-1, float fps=-1, int Format7BpP=-1, int Format7ColorMode_=-1, Vector2< int > Format7LeftTop_=Vector2< int >(-1,-1), Vector2< int > Format7WidthHeight=Vector2< int >(-1,-1))
static VideoSource * CreateFromTypeIfSupported(CameraType type)
static int OpenDevice(int type, VideoSource *cam, std::string deviceName, int param=-1)
static std::vector< std::string > CameraNames()
This is the base class for images in BIAS.
Definition: ImageBase.hh:102
static int InitImages(int type, VideoSource *cam, ImageBase *im1, ImageBase *im2=NULL, ImageBase *im3=NULL, ImageBase *im4=NULL)
static VideoSource * CreatePMD(std::string sourcePlugin, std::string procPlugin)