bazar  1.3.1
multigrab.h
Go to the documentation of this file.
1 #ifndef _MULTIGRAB_H
2 #define _MULTIGRAB_H
3 
4 #include "calibmodel.h"
5 
6 class MultiGrab {
7 public:
8 
10 
11  MultiGrab(const char *modelfile="model.bmp") : model(modelfile) {}
12 
13  int init(bool cacheTraining);
14  void grabFrames();
15  void allocLightCollector();
16 
17  struct Cam {
18  CvCapture *cam;
19  IplImage *frame, *gray;
23 
24  void setCam(CvCapture *c);
25  bool detect();
26 
27  Cam(CvCapture *c=0, IplImage *f=0)
28  {
29  width=0;
30  height=0;
31  cam=0;
32  lc=0;
33  if (c) setCam(c);
34  frame=f;
35  gray=0;
36  }
37  ~Cam();
38  };
39 
40  std::vector<Cam *> cams;
41 };
42 
45 IplImage *myQueryFrame(CvCapture *capture);
46 IplImage *myRetrieveFrame(CvCapture *capture);
47 
48 #endif