Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifdef HAVE_TRICLOPS
00017 #ifndef CV_BUMBLEBEE_H
00018 #define CV_BUMBLEBEE_H
00019
00020 #include "triclops.h"
00021 #include "cxcore.h"
00022 #include "cv.h"
00023 #include "highgui.h"
00024 #include "math_types.h"
00025
00026 #define NO_DISPARITY 0xFF00
00027
00028 inline bool invalid_disparity (unsigned short disparity)
00029 {
00030 return (disparity >= NO_DISPARITY);
00031 }
00032
00033
00034
00039 class cvBumblebee
00040 {
00041 public:
00046 cvBumblebee (const std::string &conf);
00047 ~cvBumblebee ();
00048
00055 IplImage* get_disparity ();
00056
00072 vector3 get_xyz (int x, int y, bool &valid);
00073
00092 vector3 get_xyz (unsigned short disparity, int x, int y, bool &valid);
00093
00103 void set_images (IplImage *left, IplImage *right);
00104
00109 CvSize get_depth_size () const;
00110
00111 private:
00112
00113 IplImage *ipl_left, *ipl_right, *ipl_disparity;
00114 TriclopsImage16 image16;
00115
00116 TriclopsInput offline_input;
00117 TriclopsError e;
00118 TriclopsContext triclops;
00119 CvSize trisize;
00120
00121 protected:
00122 void allocate_buffers (const CvSize size);
00123 void set_stereo_parameters ();
00124 void ipl_to_buffer (IplImage *ipl, unsigned char *buffer);
00125 };
00126
00127 #endif // CV_BUMBLEBEE_H
00128 #endif // HAVE_TRICLOPS