Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSource_Stereo.hh
1 #ifndef __BIASVIDEOSOURCE_STEREO_hh_
2 #define __BIASVIDEOSOURCE_STEREO_hh_
3 
4 #include <VideoSource/VideoSource_Base.hh>
5 #include <Image/Camera.hh>
6 #include <Base/Image/ImageBase.hh>
7 
8 namespace BIAS {
9 
10  /** @class VideoSource_Stereo
11  @ingroup g_videosource
12  @brief bundles two video sources for stereo
13  @author woelk 04/2006 */
14  class BIASVideoSource_EXPORT VideoSource_Stereo
15  : public VideoSource
16  {
17  public:
19 
20  virtual ~VideoSource_Stereo();
21 
22  virtual int OpenDevice(const char *name);
23 
24  virtual int OpenDevice();
25 
26  virtual int PreGrab();
27  /** Returns the left image and captures the right image from the camera */
28  virtual int GrabSingle(Camera<unsigned char> &image);
29 
30  /** Returns the right image. Must be called after GrabSingle() */
32  { image = RightIm_; return 0; }
33 
34  virtual int PostGrab();
35 
36  virtual void SetSize(int w, int h, int bytesperpixel);
37 
38  virtual int CloseDevice();
39 
40  virtual int InitImage(ImageBase & img);
41 
42  protected:
45 
47 
48  /*!\brief prohibit default function (move to 'public' if needed) */
50  /*!\brief prohibit default function (move to 'public' if needed) */
52  /*!\brief prohibit default function (move to 'public' if needed) */
53  VideoSource_Stereo& operator =(const VideoSource_Stereo &source);
54  };
55 
56 }
57 
58 #endif // _VideSource_Stereo_hh_
Defines a common interface to different devices.
bundles two video sources for stereo
BIAS::Camera< unsigned char > RightIm_
This is the base class for images in BIAS.
Definition: ImageBase.hh:102
int GrabSingleRight(Camera< unsigned char > &image)
Returns the right image.